oven-sh / bun

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

`bun ci` as an alias of `bun install --frozen-lockfile` #5283

Open Pandapip1 opened 1 year ago

Pandapip1 commented 1 year ago

What is the problem this feature would solve?

NPM has a command, npm ci, that installs the exact packages in the lockfile for reproducible builds. Bun's command, bun install --frozen-lockfile, is much more verbose.

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

A new subcommand, bun ci, which is just an alias for bun install --frozen-lockfile.

What alternatives have you considered?

bun install could do a clean install by default.

madwau commented 1 year ago

I believe this already exists in Bun as an option:

bun install --frozen-lockfile

From the docs:

To install with reproducible dependencies, use --frozen-lockfile. If your package.json disagrees with bun.lockb, Bun will exit with an error. This is useful for production builds and CI environments.

Pandapip1 commented 1 year ago

Could you make bun ci an alias of that, since I wasn't easily able to find that subcommand and it's one that would see really common use?

nrmnqdds commented 11 months ago

I believe this already exists in Bun as an option:

bun install --frozen-lockfile

From the docs:

To install with reproducible dependencies, use --frozen-lockfile. If your package.json disagrees with bun.lockb, Bun will exit with an error. This is useful for production builds and CI environments.

im getting error

error: lockfile had changes, but lockfile is frozen

when trying to execute it in my github actions like this - run: bun install --frozen-lockfile && bun run build

kurucu commented 10 months ago

I believe this already exists in Bun as an option:

bun install --frozen-lockfile

From the docs:

To install with reproducible dependencies, use --frozen-lockfile. If your package.json disagrees with bun.lockb, Bun will exit with an error. This is useful for production builds and CI environments.

im getting error

error: lockfile had changes, but lockfile is frozen

when trying to execute it in my github actions like this - run: bun install --frozen-lockfile && bun run build

That would happen with npm ci too - both fail with an error if your lockfile doesn't match package.json.

VasiliyRusin commented 9 months ago

Lots of CI scripts already use npm ci, of course bun has flag, but I'm sure that change npm to bun will be more clear for non JS developers or DevOpsers. Moreover, bun already do it for other npm commands.

craigcosmo commented 5 months ago

make it please, it makes sense

Confucian-e commented 1 month ago

Any time plan for this feature?

kelvinwop commented 1 month ago

yeah... bun install --frozen-lockfile is long af why not just bun ci its so short and memorable