-
Notifications
You must be signed in to change notification settings - Fork 30k
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
src: omit non-string values of package.json main field #50965
Conversation
It's not just boolean values that were ignored. I don't know exactly what is the current behavior but at least numbers and |
d2ea291
to
61523db
Compare
I see. I updated the PR. Thank you @targos |
61523db
to
7e3b1b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoudn't it be wip
until tests are added?
If this is excluded in v20 release, I'll spend more time to add tests in this PR. If not, we can merge it as it is to unblock the release. |
I’m not really sure it needs tests, to be honest, because Node itself doesn’t take a position on non-string values of |
Can the PR title be updated to match the current PR’s behavior? |
It would not, it's definitely OK to change tests in semver-major PRs. Not having a test only gives a chance that such breaking change slips through in a semver-minor or semver-patch PR. |
If we add tests, any change we make in the future will be semver-major but we don't claim that we support non-string use cases since they are invalid. I think this is the correct approach. |
The tests don't map to claimed support though, do they? |
It's better to catch regression in tests instead of citgm |
Landed in 0229502 |
Depends on #50322 |
@targos Why did we add don't-land-on-v21? The dependent PR issue is fixed in this PR and therefore, we can remove the do not land issues on this PR and parent PR. |
Feel free to change labels on both PRs if that's the correct thing to do. I just acted based on the parent PR labels. |
PR-URL: #50965 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
to land on v20 dependes on #50965 |
Omit
"main": false
in package.json and do not throw an error for it.FYI: This PR has missing tests.
cc @RafaelGSS @targos @nodejs/loaders