-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Sometimes not installing latest semver-compat version #5914
Comments
Thanks for all the detail! Indeed it looks like there is a problem with how |
We are seeing the same issue in our project. It's the only reason we haven't switched over from npm yet! After $ npm install --silent && npm explain lines-and-columns
[email protected]
node_modules/lines-and-columns
lines-and-columns@"^1.1.6" from [email protected]
node_modules/parse-json
parse-json@"^5.2.0" from [email protected]
node_modules/jest-config
jest-config@"^28.1.3" from @jest/[email protected]
node_modules/@jest/core
@jest/core@"^28.1.1" from [email protected]
node_modules/jest
peer jest@"^28.0.0" from [email protected]
node_modules/ts-jest
dev ts-jest@"28.0.5" from the root project After $ bun install --silent && npm explain lines-and-columns
[email protected]
node_modules/lines-and-columns
lines-and-columns@"^1.1.6" from [email protected]
node_modules/parse-json
parse-json@"^5.2.0" from [email protected]
node_modules/jest-config
jest-config@"^28.1.3" from [email protected]
node_modules/jest-cli
jest-cli@"^28.1.1" from [email protected]
node_modules/jest
peer jest@"^28.0.0" from [email protected]
node_modules/ts-jest
dev ts-jest@"28.0.5" from the root project |
Still happening in 1.0.4. |
Still happening in 1.0.5. |
Still happening in 1.0.6. |
I added a test that shows this issue: #6489 |
I think I found the location of the bug: https://github.com/oven-sh/bun/blob/main/src/install/npm.zig#L804-L852 We're not sorting the available versions, we're just returning the first match. The versions returned by the registry are not necessarily in semver order. |
What version of Bun is running?
1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a (and 1.0.0, 1.0.1, 1.0.2)
What platform is your computer?
Darwin 22.6.0 x86_64 i386
What steps can reproduce the bug?
This is happening in a monorepo with many dependencies on different versions of
parse-json
, which depends onlines-and-columns@^1.1.6
.some of the dependencies that use `parse-json`
What is the expected behavior?
The newest version compatible with
^1.1.6
is installed, which is1.2.4
.What do you see instead?
1.2.0
is installed.deprecated
(displaying deprecation notices is a separate discussion).(log cut)
Additional information
Bun's request as a curl command
JSON Result from Curl
This is coming from Artifactory. I don't see any problems with the data, and it works fine in
yarn@v1
andpnpm
.bun's generated yarn.lock only has one entry for lines-and-columns
yarn why lines-and-columns in same monorepo installed with yarn v1
The text was updated successfully, but these errors were encountered: