oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.11k stars 2.77k forks source link

`bun` installs multiple non-specified version dependencies #6678

Open ACTCD opened 1 year ago

ACTCD commented 1 year ago

What version of Bun is running?

1.0.7+b0393fba6200d8573f3433fb0af258a0e33ac157


What platform is your computer?

Darwin 22.6.0 arm64 arm


What steps can reproduce the bug?

A smaller example:

`package.json` ```json { "name": "bun_pm_test1", "private": true, "type": "module", "devDependencies": { "@sveltejs/vite-plugin-svelte": "2.4.5", "svelte": "4.2.0", "vite": "4.5.0" } } ```

bun install

`bun pm ls --all` ```console bun_test1 % bun pm ls --all ./bun_test1 node_modules ├── @ampproject/remapping@2.2.1 ├── @esbuild/android-arm@0.18.20 ├── @esbuild/android-arm64@0.18.20 ├── @esbuild/android-x64@0.18.20 ├── @esbuild/darwin-arm64@0.18.20 ├── @esbuild/darwin-x64@0.18.20 ├── @esbuild/freebsd-arm64@0.18.20 ├── @esbuild/freebsd-x64@0.18.20 ├── @esbuild/linux-arm@0.18.20 ├── @esbuild/linux-arm64@0.18.20 ├── @esbuild/linux-ia32@0.18.20 ├── @esbuild/linux-loong64@0.18.20 ├── @esbuild/linux-mips64el@0.18.20 ├── @esbuild/linux-ppc64@0.18.20 ├── @esbuild/linux-riscv64@0.18.20 ├── @esbuild/linux-s390x@0.18.20 ├── @esbuild/linux-x64@0.18.20 ├── @esbuild/netbsd-x64@0.18.20 ├── @esbuild/openbsd-x64@0.18.20 ├── @esbuild/sunos-x64@0.18.20 ├── @esbuild/win32-arm64@0.18.20 ├── @esbuild/win32-ia32@0.18.20 ├── @esbuild/win32-x64@0.18.20 ├── @jridgewell/gen-mapping@0.3.3 ├── @jridgewell/resolve-uri@3.1.1 ├── @jridgewell/set-array@1.1.2 ├── @jridgewell/sourcemap-codec@1.4.15 ├── @jridgewell/trace-mapping@0.3.20 ├── @sveltejs/vite-plugin-svelte@2.4.5 │ └── svelte@4.2.2 ├── @sveltejs/vite-plugin-svelte-inspector@1.0.4 │ ├── @sveltejs/vite-plugin-svelte@2.4.6 │ │ └── svelte@4.2.0 │ └── svelte@4.2.2 ├── @types/estree@1.0.3 ├── acorn@8.10.0 ├── aria-query@5.3.0 ├── axobject-query@3.2.1 ├── code-red@1.0.4 ├── css-tree@2.3.1 ├── debug@4.3.4 ├── deepmerge@4.3.1 ├── dequal@2.0.3 ├── esbuild@0.18.20 ├── estree-walker@3.0.3 ├── fsevents@2.3.3 ├── is-reference@3.0.2 ├── kleur@4.1.5 ├── locate-character@3.0.0 ├── magic-string@0.30.5 ├── mdn-data@2.0.30 ├── ms@2.1.2 ├── nanoid@3.3.6 ├── periscopic@3.1.0 ├── picocolors@1.0.0 ├── postcss@8.4.31 ├── rollup@3.29.4 ├── source-map-js@1.0.2 ├── svelte@4.2.0 ├── svelte-hmr@0.15.3 │ └── svelte@4.2.2 ├── vite@4.5.0 └── vitefu@0.2.5 ```

========================

Another practical example:

`package.json` ```json { "name": "bun_pm_test2", "private": true, "type": "module", "devDependencies": { "@sveltejs/vite-plugin-svelte": "2.4.6", "autoprefixer": "^10.4.16", "cm-show-invisibles": "^3.1.0", "codemirror": "^5.65.15", "eslint": "^8.51.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-svelte": "^2.34.0", "postcss-html": "^1.5.0", "stylelint": "^15.10.3", "stylelint-config-html": "^1.1.0", "stylelint-config-recommended": "^13.0.0", "stylelint-config-standard": "^34.0.0", "svelte": "4.2.0", "vite": "^4.5.0" } } ```

bun install

`bun pm ls --all` ```console bun_test2 % bun pm ls --all ./bun_test2 node_modules ├── @aashutoshrathi/word-wrap@1.2.6 ├── @ampproject/remapping@2.2.1 ├── @babel/code-frame@7.22.13 │ └── chalk@2.4.2 │ ├── ansi-styles@3.2.1 │ │ └── color-convert@1.9.3 │ │ └── color-name@1.1.3 │ ├── escape-string-regexp@1.0.5 │ └── supports-color@5.5.0 │ └── has-flag@3.0.0 ├── @babel/helper-validator-identifier@7.22.20 ├── @babel/highlight@7.22.20 │ ├── chalk@2.4.2 │ │ ├── ansi-styles@3.2.1 │ │ │ └── color-convert@1.9.3 │ │ │ └── color-name@1.1.3 │ │ ├── escape-string-regexp@1.0.5 │ │ └── supports-color@5.5.0 │ │ └── has-flag@3.0.0 │ └── js-tokens@4.0.0 ├── @csstools/css-parser-algorithms@2.3.2 ├── @csstools/css-tokenizer@2.2.1 ├── @csstools/media-query-list-parser@2.1.5 ├── @csstools/selector-specificity@3.0.0 ├── @esbuild/android-arm@0.18.20 ├── @esbuild/android-arm64@0.18.20 ├── @esbuild/android-x64@0.18.20 ├── @esbuild/darwin-arm64@0.18.20 ├── @esbuild/darwin-x64@0.18.20 ├── @esbuild/freebsd-arm64@0.18.20 ├── @esbuild/freebsd-x64@0.18.20 ├── @esbuild/linux-arm@0.18.20 ├── @esbuild/linux-arm64@0.18.20 ├── @esbuild/linux-ia32@0.18.20 ├── @esbuild/linux-loong64@0.18.20 ├── @esbuild/linux-mips64el@0.18.20 ├── @esbuild/linux-ppc64@0.18.20 ├── @esbuild/linux-riscv64@0.18.20 ├── @esbuild/linux-s390x@0.18.20 ├── @esbuild/linux-x64@0.18.20 ├── @esbuild/netbsd-x64@0.18.20 ├── @esbuild/openbsd-x64@0.18.20 ├── @esbuild/sunos-x64@0.18.20 ├── @esbuild/win32-arm64@0.18.20 ├── @esbuild/win32-ia32@0.18.20 ├── @esbuild/win32-x64@0.18.20 ├── @eslint-community/eslint-utils@4.4.0 │ └── eslint@8.50.0 │ ├── @eslint/js@8.50.0 │ └── globals@13.22.0 ├── @eslint-community/regexpp@4.9.1 ├── @eslint/eslintrc@2.1.2 │ └── globals@13.22.0 ├── @eslint/js@8.51.0 ├── @humanwhocodes/config-array@0.11.11 │ └── minimatch@3.0.8 ├── @humanwhocodes/module-importer@1.0.1 ├── @humanwhocodes/object-schema@1.2.1 ├── @jridgewell/gen-mapping@0.3.3 ├── @jridgewell/resolve-uri@3.1.1 ├── @jridgewell/set-array@1.1.2 ├── @jridgewell/sourcemap-codec@1.4.15 ├── @jridgewell/trace-mapping@0.3.19 ├── @nodelib/fs.scandir@2.1.5 ├── @nodelib/fs.stat@2.0.5 ├── @nodelib/fs.walk@1.2.8 ├── @sveltejs/vite-plugin-svelte@2.4.6 │ ├── svelte@4.2.1 │ └── vite@4.4.10 ├── @sveltejs/vite-plugin-svelte-inspector@1.0.4 │ ├── svelte@4.2.1 │ └── vite@4.4.10 ├── @types/estree@1.0.2 ├── @types/json5@0.0.29 ├── @types/minimist@1.2.3 ├── @types/normalize-package-data@2.4.2 ├── acorn@8.10.0 ├── acorn-jsx@5.3.2 ├── ajv@6.12.6 ├── ansi-regex@5.0.1 ├── ansi-styles@4.3.0 ├── argparse@2.0.1 ├── aria-query@5.3.0 ├── array-buffer-byte-length@1.0.0 ├── array-includes@3.1.7 ├── array-union@2.1.0 ├── array.prototype.findlastindex@1.2.3 ├── array.prototype.flat@1.3.2 ├── array.prototype.flatmap@1.3.2 ├── arraybuffer.prototype.slice@1.0.2 ├── arrify@1.0.1 ├── astral-regex@2.0.0 ├── autoprefixer@10.4.16 ├── available-typed-arrays@1.0.5 ├── axobject-query@3.2.1 ├── balanced-match@2.0.0 ├── brace-expansion@1.1.11 │ └── balanced-match@1.0.2 ├── braces@3.0.2 ├── browserslist@4.22.1 ├── call-bind@1.0.2 ├── callsites@3.1.0 ├── camelcase@6.3.0 ├── camelcase-keys@7.0.2 │ └── type-fest@1.4.0 ├── caniuse-lite@1.0.30001543 ├── chalk@4.1.2 ├── cm-show-invisibles@3.1.0 ├── code-red@1.0.4 ├── codemirror@5.65.15 ├── color-convert@2.0.1 ├── color-name@1.1.4 ├── colord@2.9.3 ├── concat-map@0.0.1 ├── confusing-browser-globals@1.0.11 ├── cosmiconfig@8.3.6 ├── cross-spawn@7.0.3 ├── css-functions-list@3.2.0 ├── css-tree@2.3.1 ├── cssesc@3.0.0 ├── debug@4.3.4 ├── decamelize@5.0.1 ├── decamelize-keys@1.1.1 │ ├── decamelize@1.2.0 │ └── map-obj@1.0.1 ├── deep-is@0.1.4 ├── deepmerge@4.3.1 ├── define-data-property@1.1.0 ├── define-properties@1.2.1 ├── dequal@2.0.3 ├── dir-glob@3.0.1 ├── doctrine@3.0.0 ├── dom-serializer@2.0.0 ├── domelementtype@2.3.0 ├── domhandler@5.0.3 ├── domutils@3.1.0 ├── electron-to-chromium@1.4.540 ├── emoji-regex@8.0.0 ├── entities@4.5.0 ├── error-ex@1.3.2 ├── es-abstract@1.22.2 ├── es-set-tostringtag@2.0.1 ├── es-shim-unscopables@1.0.0 ├── es-to-primitive@1.2.1 ├── esbuild@0.18.20 ├── escalade@3.1.1 ├── escape-string-regexp@4.0.0 ├── eslint@8.51.0 ├── eslint-config-airbnb-base@15.0.0 │ └── eslint@8.50.0 │ ├── @eslint/js@8.50.0 │ └── globals@13.22.0 ├── eslint-import-resolver-node@0.3.9 │ └── debug@3.2.7 │ └── ms@2.1.3 ├── eslint-module-utils@2.8.0 │ └── debug@3.2.7 │ └── ms@2.1.3 ├── eslint-plugin-import@2.28.1 │ ├── debug@3.2.7 │ │ └── ms@2.1.3 │ ├── doctrine@2.1.0 │ └── eslint@8.50.0 │ ├── @eslint/js@8.50.0 │ ├── debug@4.3.4 │ ├── doctrine@3.0.0 │ └── globals@13.22.0 ├── eslint-plugin-svelte@2.34.0 │ ├── eslint@8.50.0 │ │ ├── @eslint/js@8.50.0 │ │ └── globals@13.22.0 │ └── semver@7.5.4 ├── eslint-scope@7.2.2 ├── eslint-visitor-keys@3.4.3 ├── espree@9.6.1 ├── esquery@1.5.0 ├── esrecurse@4.3.0 ├── estraverse@5.3.0 ├── estree-walker@3.0.3 ├── esutils@2.0.3 ├── fast-deep-equal@3.1.3 ├── fast-glob@3.3.1 │ └── glob-parent@5.1.2 ├── fast-json-stable-stringify@2.1.0 ├── fast-levenshtein@2.0.6 ├── fastest-levenshtein@1.0.16 ├── fastq@1.15.0 ├── file-entry-cache@6.0.1 ├── fill-range@7.0.1 ├── find-up@5.0.0 ├── flat-cache@3.1.0 ├── flatted@3.2.9 ├── for-each@0.3.3 ├── fraction.js@4.3.6 ├── fs.realpath@1.0.0 ├── fsevents@2.3.3 ├── function-bind@1.1.1 ├── function.prototype.name@1.1.6 ├── functions-have-names@1.2.3 ├── get-intrinsic@1.2.1 ├── get-symbol-description@1.0.0 ├── glob@7.2.3 ├── glob-parent@6.0.2 ├── global-modules@2.0.0 ├── global-prefix@3.0.0 │ └── which@1.3.1 ├── globals@13.23.0 ├── globalthis@1.0.3 ├── globby@11.1.0 ├── globjoin@0.1.4 ├── gopd@1.0.1 ├── graphemer@1.4.0 ├── hard-rejection@2.1.0 ├── has@1.0.4 ├── has-bigints@1.0.2 ├── has-flag@4.0.0 ├── has-property-descriptors@1.0.0 ├── has-proto@1.0.1 ├── has-symbols@1.0.3 ├── has-tostringtag@1.0.0 ├── hosted-git-info@4.1.0 ├── html-tags@3.3.1 ├── htmlparser2@8.0.2 ├── ignore@5.2.4 ├── import-fresh@3.3.0 │ └── resolve-from@4.0.0 ├── import-lazy@4.0.0 ├── imurmurhash@0.1.4 ├── indent-string@5.0.0 ├── inflight@1.0.6 ├── inherits@2.0.4 ├── ini@1.3.8 ├── internal-slot@1.0.5 ├── is-array-buffer@3.0.2 ├── is-arrayish@0.2.1 ├── is-bigint@1.0.4 ├── is-boolean-object@1.1.2 ├── is-callable@1.2.7 ├── is-core-module@2.13.0 ├── is-date-object@1.0.5 ├── is-extglob@2.1.1 ├── is-fullwidth-code-point@3.0.0 ├── is-glob@4.0.3 ├── is-negative-zero@2.0.2 ├── is-number@7.0.0 ├── is-number-object@1.0.7 ├── is-path-inside@3.0.3 ├── is-plain-obj@1.1.0 ├── is-plain-object@5.0.0 ├── is-reference@3.0.2 ├── is-regex@1.1.4 ├── is-shared-array-buffer@1.0.2 ├── is-string@1.0.7 ├── is-symbol@1.0.4 ├── is-typed-array@1.1.12 ├── is-weakref@1.0.2 ├── isarray@2.0.5 ├── isexe@2.0.0 ├── js-tokens@8.0.2 ├── js-yaml@4.1.0 ├── json-buffer@3.0.1 ├── json-parse-even-better-errors@2.3.1 ├── json-schema-traverse@0.4.1 ├── json-stable-stringify-without-jsonify@1.0.1 ├── json5@1.0.2 ├── keyv@4.5.3 ├── kind-of@6.0.3 ├── kleur@4.1.5 ├── known-css-properties@0.28.0 ├── levn@0.4.1 ├── lilconfig@2.1.0 ├── lines-and-columns@1.2.4 ├── locate-character@3.0.0 ├── locate-path@6.0.0 ├── lodash.merge@4.6.2 ├── lodash.truncate@4.4.2 ├── lru-cache@6.0.0 ├── magic-string@0.30.4 ├── map-obj@4.3.0 ├── mathml-tag-names@2.1.3 ├── mdn-data@2.0.30 ├── meow@10.1.5 │ └── type-fest@1.4.0 ├── merge2@1.4.1 ├── micromatch@4.0.5 ├── min-indent@1.0.1 ├── minimatch@3.1.2 ├── minimist@1.2.8 ├── minimist-options@4.1.0 ├── ms@2.1.2 ├── nanoid@3.3.6 ├── natural-compare@1.4.0 ├── node-releases@2.0.13 ├── normalize-package-data@3.0.3 │ └── semver@7.5.4 ├── normalize-path@3.0.0 ├── normalize-range@0.1.2 ├── object-inspect@1.12.3 ├── object-keys@1.1.1 ├── object.assign@4.1.4 ├── object.entries@1.1.7 ├── object.fromentries@2.0.7 ├── object.groupby@1.0.1 ├── object.values@1.1.7 ├── once@1.4.0 ├── optionator@0.9.3 ├── p-limit@3.1.0 ├── p-locate@5.0.0 ├── parent-module@1.0.1 ├── parse-json@5.2.0 ├── path-exists@4.0.0 ├── path-is-absolute@1.0.1 ├── path-key@3.1.1 ├── path-parse@1.0.7 ├── path-type@4.0.0 ├── periscopic@3.1.0 ├── picocolors@1.0.0 ├── picomatch@2.3.1 ├── postcss@8.4.31 ├── postcss-html@1.5.0 ├── postcss-load-config@3.1.4 ├── postcss-resolve-nested-selector@0.1.1 ├── postcss-safe-parser@6.0.0 ├── postcss-scss@4.0.9 ├── postcss-selector-parser@6.0.13 ├── postcss-value-parser@4.2.0 ├── prelude-ls@1.2.1 ├── punycode@2.3.0 ├── queue-microtask@1.2.3 ├── quick-lru@5.1.1 ├── read-pkg@6.0.0 │ └── type-fest@1.4.0 ├── read-pkg-up@8.0.0 │ └── type-fest@1.4.0 ├── redent@4.0.0 ├── regexp.prototype.flags@1.5.1 ├── require-from-string@2.0.2 ├── resolve@1.22.6 ├── resolve-from@5.0.0 ├── reusify@1.0.4 ├── rimraf@3.0.2 ├── rollup@3.29.4 ├── run-parallel@1.2.0 ├── safe-array-concat@1.0.1 ├── safe-regex-test@1.0.0 ├── semver@6.3.1 ├── set-function-name@2.0.1 ├── shebang-command@2.0.0 ├── shebang-regex@3.0.0 ├── side-channel@1.0.4 ├── signal-exit@4.1.0 ├── slash@3.0.0 ├── slice-ansi@4.0.0 ├── source-map-js@1.0.2 ├── spdx-correct@3.2.0 ├── spdx-exceptions@2.3.0 ├── spdx-expression-parse@3.0.1 ├── spdx-license-ids@3.0.15 ├── string-width@4.2.3 ├── string.prototype.trim@1.2.8 ├── string.prototype.trimend@1.0.7 ├── string.prototype.trimstart@1.0.7 ├── strip-ansi@6.0.1 ├── strip-bom@3.0.0 ├── strip-indent@4.0.0 ├── strip-json-comments@3.1.1 ├── style-search@0.1.0 ├── stylelint@15.10.3 ├── stylelint-config-html@1.1.0 ├── stylelint-config-recommended@13.0.0 ├── stylelint-config-standard@34.0.0 ├── supports-color@7.2.0 ├── supports-hyperlinks@3.0.0 ├── supports-preserve-symlinks-flag@1.0.0 ├── svelte@4.2.0 ├── svelte-eslint-parser@0.33.1 │ └── svelte@4.2.1 ├── svelte-hmr@0.15.3 │ └── svelte@4.2.1 ├── svg-tags@1.0.0 ├── table@6.8.1 │ └── ajv@8.12.0 │ └── json-schema-traverse@1.0.0 ├── text-table@0.2.0 ├── to-regex-range@5.0.1 ├── trim-newlines@4.1.1 ├── tsconfig-paths@3.14.2 ├── type-check@0.4.0 ├── type-fest@0.20.2 ├── typed-array-buffer@1.0.0 ├── typed-array-byte-length@1.0.0 ├── typed-array-byte-offset@1.0.0 ├── typed-array-length@1.0.4 ├── unbox-primitive@1.0.2 ├── update-browserslist-db@1.0.13 ├── uri-js@4.4.1 ├── util-deprecate@1.0.2 ├── validate-npm-package-license@3.0.4 ├── vite@4.5.0 ├── vitefu@0.2.4 │ └── vite@4.4.10 ├── which@2.0.2 ├── which-boxed-primitive@1.0.2 ├── which-typed-array@1.1.11 ├── wrappy@1.0.2 ├── write-file-atomic@5.0.1 ├── yallist@4.0.0 ├── yaml@1.10.2 ├── yargs-parser@20.2.9 └── yocto-queue@0.1.0 ```

What is the expected behavior?

Installs the versions of dependencies I specified in package.json, nothing more.


What do you see instead?

In the first example I explicitly specify:

"@sveltejs/vite-plugin-svelte": "2.4.5"
"svelte": "4.2.0"

But you can see in the installation that some versions exist there:

svelte@4.2.2
@sveltejs/vite-plugin-svelte@2.4.6

========================

The same issue exists in the second example, but this time there are:

svelte@4.2.1

========================

These was tested at the same time and I'm not sure why these versions were installed.


Additional information

The test results are not 100% reproducible but I'm not sure what else is interfering there since I test everything as cleanly as possible.

PS. I noticed that it could be related to a network request, but I don't see any error messages in the console.

PPS. The reason I say it's not 100% is because sometimes bun installed the correct result:

Correct result for first example ```console bun_test1 % bun pm ls --all ./bun_test1 node_modules ├── @ampproject/remapping@2.2.1 ├── @esbuild/android-arm@0.18.20 ├── @esbuild/android-arm64@0.18.20 ├── @esbuild/android-x64@0.18.20 ├── @esbuild/darwin-arm64@0.18.20 ├── @esbuild/darwin-x64@0.18.20 ├── @esbuild/freebsd-arm64@0.18.20 ├── @esbuild/freebsd-x64@0.18.20 ├── @esbuild/linux-arm@0.18.20 ├── @esbuild/linux-arm64@0.18.20 ├── @esbuild/linux-ia32@0.18.20 ├── @esbuild/linux-loong64@0.18.20 ├── @esbuild/linux-mips64el@0.18.20 ├── @esbuild/linux-ppc64@0.18.20 ├── @esbuild/linux-riscv64@0.18.20 ├── @esbuild/linux-s390x@0.18.20 ├── @esbuild/linux-x64@0.18.20 ├── @esbuild/netbsd-x64@0.18.20 ├── @esbuild/openbsd-x64@0.18.20 ├── @esbuild/sunos-x64@0.18.20 ├── @esbuild/win32-arm64@0.18.20 ├── @esbuild/win32-ia32@0.18.20 ├── @esbuild/win32-x64@0.18.20 ├── @jridgewell/gen-mapping@0.3.3 ├── @jridgewell/resolve-uri@3.1.1 ├── @jridgewell/set-array@1.1.2 ├── @jridgewell/sourcemap-codec@1.4.15 ├── @jridgewell/trace-mapping@0.3.20 ├── @sveltejs/vite-plugin-svelte@2.4.5 ├── @sveltejs/vite-plugin-svelte-inspector@1.0.4 ├── @types/estree@1.0.3 ├── acorn@8.10.0 ├── aria-query@5.3.0 ├── axobject-query@3.2.1 ├── code-red@1.0.4 ├── css-tree@2.3.1 ├── debug@4.3.4 ├── deepmerge@4.3.1 ├── dequal@2.0.3 ├── esbuild@0.18.20 ├── estree-walker@3.0.3 ├── fsevents@2.3.3 ├── is-reference@3.0.2 ├── kleur@4.1.5 ├── locate-character@3.0.0 ├── magic-string@0.30.5 ├── mdn-data@2.0.30 ├── ms@2.1.2 ├── nanoid@3.3.6 ├── periscopic@3.1.0 ├── picocolors@1.0.0 ├── postcss@8.4.31 ├── rollup@3.29.4 ├── source-map-js@1.0.2 ├── svelte@4.2.0 ├── svelte-hmr@0.15.3 ├── vite@4.5.0 └── vitefu@0.2.5 ```

And in the second example, sometimes it is svelte@4.2.1 and sometimes it is svelte@4.2.2, but none of them were specified by me.

Jarred-Sumner commented 1 year ago

Thank you for this bug report. @dylan-conway will look into it this week.

ACTCD commented 1 year ago

A minor issue that are not entirely related:

`bun i --verbose > i.log` with first example ```console LICENSE chromium-versions.js full-chromium-versions.js full-versions.js index.js versions.js chromium-versions.json full-chromium-versions.json full-versions.json package.json versions.json CHANGELOG.md README.md -- BEGIN SHA512/256(`${alphabetize(name)}@${order(version)}`) -- @ampproject/remapping@2.2.1 @esbuild/android-arm@0.18.20 @esbuild/android-arm64@0.18.20 @esbuild/android-x64@0.18.20 @esbuild/darwin-arm64@0.18.20 @esbuild/darwin-x64@0.18.20 @esbuild/freebsd-arm64@0.18.20 @esbuild/freebsd-x64@0.18.20 @esbuild/linux-arm@0.18.20 @esbuild/linux-arm64@0.18.20 @esbuild/linux-ia32@0.18.20 @esbuild/linux-loong64@0.18.20 @esbuild/linux-mips64el@0.18.20 @esbuild/linux-ppc64@0.18.20 @esbuild/linux-riscv64@0.18.20 @esbuild/linux-s390x@0.18.20 @esbuild/linux-x64@0.18.20 @esbuild/netbsd-x64@0.18.20 @esbuild/openbsd-x64@0.18.20 @esbuild/sunos-x64@0.18.20 @esbuild/win32-arm64@0.18.20 @esbuild/win32-ia32@0.18.20 @esbuild/win32-x64@0.18.20 @jridgewell/gen-mapping@0.3.3 @jridgewell/resolve-uri@3.1.1 @jridgewell/set-array@1.1.2 @jridgewell/sourcemap-codec@1.4.15 @jridgewell/trace-mapping@0.3.20 @sveltejs/vite-plugin-svelte@2.4.5 @sveltejs/vite-plugin-svelte@2.4.6 @sveltejs/vite-plugin-svelte-inspector@1.0.4 @types/estree@1.0.3 acorn@8.10.0 aria-query@5.3.0 axobject-query@3.2.1 code-red@1.0.4 css-tree@2.3.1 debug@4.3.4 deepmerge@4.3.1 dequal@2.0.3 esbuild@0.18.20 estree-walker@3.0.3 fsevents@2.3.3 is-reference@3.0.2 kleur@4.1.5 locate-character@3.0.0 magic-string@0.30.5 mdn-data@2.0.30 ms@2.1.2 nanoid@3.3.6 periscopic@3.1.0 picocolors@1.0.0 postcss@8.4.31 rollup@3.29.4 source-map-js@1.0.2 svelte@4.2.0 svelte@4.2.2 svelte-hmr@0.15.3 vite@4.5.0 vitefu@0.2.5 -- END HASH--  + @sveltejs/vite-plugin-svelte@2.4.5 (v2.4.6 available)  + svelte@4.2.0 (v4.2.2 available)  + vite@4.5.0 39 packages installed [9.71s] ```

You can see in it seems to be some strange output. (I don't mean those color instructions)

dodas commented 1 year ago

Not sure if this is the same issue, but here is what I am experiencing:

My package is specifying a dependency on @tanstack/react-query both under peerDependencies (with loose version specifier to allow consumers use broad range of versions: 4.x) as well as under devDependencies (with exact version specifier, so I have consistent version for dev: 4.24.4). Or is such practice not recommended?

  "devDependencies": {
    "@tanstack/react-query": "4.24.4"
  },
  "peerDependencies": {
    "@tanstack/react-query": "4.*"
  }

After installing with bun install -y, and inspecting the lock, I can see two different versions of @tanstack/react-query are installed:

"@tanstack/react-query@4.24.4":
  version "4.24.4"
  resolved "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.24.4.tgz"
  integrity sha512-RpaS/3T/a3pHuZJbIAzAYRu+1nkp+/enr9hfRXDS/mojwx567UiMksoqW4wUFWlwIvWTXyhot2nbIipTKEg55Q==
  dependencies:
    use-sync-external-store "^1.2.0"
    "@tanstack/query-core" "4.24.4"

"@tanstack/react-query@4.*":
  version "4.36.1"
  resolved "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.36.1.tgz"
  integrity sha512-y7ySVHFyyQblPl3J3eQBWpXZkliroki3ARnBKsdJchlgt7yJLRDUcf4B8soufgiYt3pEQIkBWBx1N9/ZPIeUWw==
  dependencies:
    use-sync-external-store "^1.2.0"
    "@tanstack/query-core" "4.36.1"

With yarn v3.6.4, only @tanstack/react-query@4.24.4 gets installed, since it satisfies both 4.24.4 and 4.*.

Is this a bug?

dylan-conway commented 11 months ago

Could you try this again with bun v1.0.13? We've merged a couple peer dependency related bugs fixes that should hopefully fix this issue

ACTCD commented 11 months ago

@dylan-conway I'm very sorry, I don't think I can.

A month ago, I tried to adopt bun for an open source project I was involved in developing, and I spent a lot of time on it. Locating the issue likewise took me a couple days. Cause initially I didn't expect the issue to be in a basic feature like the package manager. Eventually we had to abandon the adoption process.

To this day, the relevant package versions have changed a lot that I don't think I'll be able to test the issue in the same environment.

It could be happening in any other packages than my specific use case, so my tests are also uninformative as to whether the issue is resolved or not.

I think determining whether the issue is resolved requires more extensive testing on your part. Unless you have located the root cause of the issue and have resolved it.

In any case, if you guys think through testing that the issue is no longer reproducible, you can always close the issue and wait for a new report if someone encounters it again. Or you will confidently close the issue because you are sure it has been located and resolved.

Good luck and have a nice day.