Repository navigation
ci: detect if package-lock.json is up to date and generated with correct npm version - #11827
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
commit: |
PR Code Suggestions ✨Latest suggestions up to cfc5ae1
Previous suggestionsSuggestions up to commit 6537568
Suggestions up to commit a9ebbd7
|
|||||||||||||||||||||||||||
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
|
I normally use the built-in Maybe In the long term we need a fixed version (down to the patch) of a package manager - that is quite easy with e.g. |
| "name": "npm", | ||
| "version": ">=10.1.0", | ||
| "version": "10", | ||
| "onFail": "error" |
There was a problem hiding this comment.
| "onFail": "error" | |
| "onFail": "warn" |
"download" is not yet supported by npm
There was a problem hiding this comment.
This would not prevent messing up with lockfile. If we do warn we might as well remove the whole devEngines section...
What we could to alternativelly, is have a dedicated step validating if lockfile has been created using npm@10...
The difference between npm 10 and 11 are rather cosmetic. They both use the same lockfileVersion: 3, so they should be compatible. But I understand you want to avoid unnecessary diffs on packakge-lock, which make sense...
|
The tests uncover an interesting case: the default node 24's Btw how does npm@10 handle |
As this is the same But if we allow different lockfile versions, we might end-up with some unnecessary diffs... Not a major issue I would say... |
|
This whole discussion led me to discover our current So I added new CI step, which would detect if package-lock:
Here are some tests:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
PR Code Suggestions ✨No code suggestions found for the PR. |
gioboa
left a comment
There was a problem hiding this comment.
Thanks for the clarification 👍
LGTM
|
This only makes things more complicated 🤷🏻 anyway, we'll fix it sometime |
Hmm, I was expecting
Maybe because they say "dependencies" - both
So they aren't identical as I thought. |
…ect npm version (typeorm#11827) Co-authored-by: Lucian Mocanu <[email protected]>
…ect npm version (typeorm#11827) Co-authored-by: Lucian Mocanu <[email protected]>
…ect npm version (typeorm#11827) Co-authored-by: Lucian Mocanu <[email protected]>
…ect npm version (typeorm#11827) Co-authored-by: Lucian Mocanu <[email protected]>
…ect npm version (typeorm#11827) Co-authored-by: Lucian Mocanu <[email protected]>
…ect npm version (typeorm#11827) Co-authored-by: Lucian Mocanu <[email protected]>
Description of change
New CI step detecting if
package-lock.json:.nvmrcPull-Request Checklist
masterbranchFixes #00000tests/**.test.ts)docs/docs/**.md)