oven-sh / bun

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

Support `pnpm-lock.yaml` in `bun pm migrate` #7157

Open rosszurowski opened 12 months ago

rosszurowski commented 12 months ago

What is the problem this feature would solve?

Similar to https://github.com/oven-sh/bun/issues/6409, I'd like to migrate from a pnpm lockfile to a bun lockfile. This will help me use pnpm's stable workspace/monorepo features locally, but deploy using bun with confidence I'm getting the exact same versions of dependencies in production.

What is the feature you are proposing to solve the problem?

bun pm migrate should supported creating a bun.lockb file from a pnpm-lock.yaml file.

What alternatives have you considered?

No response

cah4a commented 9 months ago

Is there any progress here?

mirao commented 8 months ago

If I understand well, now if I have devDependencies in package.json, e.g.

"playwright": "^1.41.1"
"codeceptjs": "^3.5.10"

then I need to add dependencies this way

bun add playwright@1.41.1
bun add codeceptjs@3.5.10

to get the "current" versions from package.json. If I use simple bun i or bun add playwright, bun will install the latest versions (and obviously ignores pnpm-lock.yaml) which is not expected.

coolcorexix commented 2 months ago

currently, if you want to migrate from pnpm to bun:

  1. create the package-lock.json first by npm install --package-lock-only
  2. run bun pm migrate