oven-sh / bun

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

Bun install does not check if package is in node_modules for git+https#sha dependency #14326

Open nojaf opened 1 month ago

nojaf commented 1 month ago

What version of Bun is running?

1.1.29+6d43b3662

What platform is your computer?

Linux 5.15.153.1-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

I'm using a git package:

  "devDependencies": {
    "@nojaf/rescript-firebase": "git+https://github.com/nojaf/rescript-firebase.git#c13a6ff48861ae9ff444013e5ffdf11064f3de95"
  },

which I updated from "git+https://github.com/nojaf/rescript-firebase.git#5a3a80e670cfe6c8fbada6e51a8660b0d8dbcdaf" to "git+https://github.com/nojaf/rescript-firebase.git#c13a6ff48861ae9ff444013e5ffdf11064f3de95".

After changing the hash in package.json it did not download anything new. So, I removed the folder in my node_modules and after another bun i it does not restore the package at all.

What is the expected behavior?

rescript-firebase is downloaded with correct hash.

What do you see instead?

Nothing happens

Additional information

No response

Jarred-Sumner commented 1 month ago

This is likely related to git dependencies. We definitely check if a version matches in node_modules ordinarily.