-
Notifications
You must be signed in to change notification settings - Fork 10
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
Release 3.1.0 does not correctly normalize package bins #35
Comments
Cross-posting this comment to get the issue on the right repo (I think!) This issue was breaking a build for me, because Google App Engine automatically picks up npm 9.7.0 even though it is deprecated. Working around it by pinning to npm 9.6.7 in package.json.
|
lukekarrys
added a commit
that referenced
this issue
Jun 1, 2023
Full list of changes are as follows: - ignore `directories.bin` if `bin` is present - walk up filesystem to look for git directory - log a warning for inaccessible bin entries but dont delete These changes will be tracked in npm/statusboard#487 to see if they should be made as breaking changes with npm 10. These changes are tested by including `read-package-json` as a dev dependency and running the `test/prepare.js` test suite against both packages. This test can be removed once we have decided to make these breaking changes. Ref: npm/cli#6470 Fixes: #35
lukekarrys
added a commit
that referenced
this issue
Jun 1, 2023
Full list of changes are as follows: - ignore `directories.bin` if `bin` is present - walk up filesystem to look for git directory - log a warning for inaccessible bin entries but dont delete These changes will be tracked in npm/statusboard#487 to see if they should be made as breaking changes with npm 10. These changes are tested by including `read-package-json` as a dev dependency and running the `test/prepare.js` test suite against both packages. This test can be removed once we have decided to make these breaking changes. Ref: npm/cli#6470 Fixes: #35
lukekarrys
added a commit
that referenced
this issue
Jun 1, 2023
…ackages Due to npm/cli#6470, I added `read-package-json` and `read-package-json-fast` to this repo as dev deps to run the new tests from #31 against those packages. I found a few discrepancies which I fixed in this PR. Full list of changes are as follows: **`normalize` / `read-package-json-fast`** - convert `bundleDependencies: false` to `[]` **`prepare` / `read-package-json`** - ignore `directories.bin` if `bin` is present - walk up filesystem to look for git directory - log a warning for inaccessible bin entries but dont delete These changes will be tracked in npm/statusboard#487 to see if they should be made as breaking changes with npm 10. These legacy tests can be removed once we have decided to make these breaking changes. Ref: npm/cli#6470 Fixes: #35
lukekarrys
added a commit
that referenced
this issue
Jun 2, 2023
…ackages Due to npm/cli#6470, I added `read-package-json` and `read-package-json-fast` to this repo as dev deps to run the new tests from #31 against those packages. I found a few discrepancies which I fixed in this PR. Full list of changes are as follows: **`normalize` / `read-package-json-fast`** - convert `bundleDependencies: false` to `[]` **`prepare` / `read-package-json`** - ignore `directories.bin` if `bin` is present - walk up filesystem to look for git directory - log a warning for inaccessible bin entries but dont delete These changes will be tracked in npm/statusboard#487 to see if they should be made as breaking changes with npm 10. These legacy tests can be removed once we have decided to make these breaking changes. Ref: npm/cli#6470 Fixes: #35
lukekarrys
added a commit
that referenced
this issue
Jun 6, 2023
…ackages Due to npm/cli#6470, I added `read-package-json` and `read-package-json-fast` to this repo as dev deps to run the new tests from #31 against those packages. I found a few discrepancies which I fixed in this PR. Full list of changes are as follows: **`normalize` / `read-package-json-fast`** - convert `bundleDependencies: false` to `[]` **`prepare` / `read-package-json`** - ignore `directories.bin` if `bin` is present - walk up filesystem to look for git directory - log a warning for inaccessible bin entries but dont delete These changes will be tracked in npm/statusboard#487 to see if they should be made as breaking changes with npm 10. These legacy tests can be removed once we have decided to make these breaking changes. Ref: npm/cli#6470 Fixes: #35
Thanks for the quick fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[email protected]
was published but never taggedlatest
due to a bug found during release. below is a root cause of the bug, but thetl;dr
is that[email protected]
will be deprecated and[email protected]
will be published once the bug is fixed.we switched from
read-package-json
to@npmcli/package-json
which recently received an update to bring all the features from the former to the latter. lost in this port was a minor change to normalizing package bins. previously we would not parsepackage.json#directories.bin
if apackage.json#bin
was present (ref: https://github.com/npm/read-package-json/blob/main/lib/read-json.js#L351-L353) but now we do regardless of whether a bin object is there (ref: https://github.com/npm/package-json/blob/main/lib/normalize.js#L161)next steps:
[email protected]
. this version exists on the registry and contains breaking changes that would impact users if you publish packages using bothbin
anddirectories.bin
@npmcli/package.json
read-package-json
and@npmcli/package-json
and assert this behavior in news tests to ensure no other breaking changes occurred[email protected]
Originally posted by @lukekarrys in npm/cli#6470 (comment)
The text was updated successfully, but these errors were encountered: