-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: warn message on engine mismatch #257
Closed
ruyadorno
wants to merge
3
commits into
npm:latest
from
ruyadorno:fixes-warn-message-on-engine-mismatch
Closed
fix: warn message on engine mismatch #257
ruyadorno
wants to merge
3
commits into
npm:latest
from
ruyadorno:fixes-warn-message-on-engine-mismatch
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Fixed setting engine check warnings to each package - Added proper catching of package warnings during validation phase - Added tap test that validates print of engine warn msgs Fix: https://npm.community/t/engines-and-engines-strict-ignored/4792
@npm/cli-team pushed a new implementation that uses the top tree instead:
those are the cons that made me steer away from this implementation originally but seeing the unexpected behavior (such as saving metadata) from using the manifest package I’m seeing this as a safer option now 😊 would be nice to have your insight |
isaacs
pushed a commit
that referenced
this pull request
Oct 8, 2019
PR-URL: #257 Credit: @ruyadorno Close: #257 Reviewed-by: @isaacs
Merged
This was referenced Oct 26, 2019
This was referenced Nov 5, 2019
This was referenced Nov 14, 2019
This was referenced Nov 25, 2019
This was referenced Dec 5, 2019
This was referenced Dec 18, 2019
This was referenced Jan 17, 2020
This was referenced Feb 25, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Messages for mismatching engine fields are not printed to users currently, contrary to the documented behavior, this PR fixes it by making sure that warning messages from packages containing mismatch engines are actually printed at
WARN
level for users of the cli.✏️ Changes
🔗 References
📸 Screenshots
Before
After
🔍 Testing
Manual testing
engines.node
value, eg:npm install ./engine-module
notsup
Automated testing
test/tap/validate-tree-check-warnings.js
checking that package warnings are correctly collected to top level treetest/tap/check-engine-reqs.js
validating that warning messages are printed to users uponnpm install
✅ This change has unit test coverage
✅ This change has integration test coverage
🔥 Rollback
This can be reverted at any time