Skip to content
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

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

Open
Pandapip1 opened this issue Sep 13, 2023 · 10 comments · May be fixed by #16137
Open

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

Pandapip1 opened this issue Sep 13, 2023 · 10 comments · May be fixed by #16137
Labels
bun install Something that relates to the npm-compatible client enhancement New feature or request

Comments

@Pandapip1
Copy link
Contributor

Pandapip1 commented Sep 13, 2023

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, is less well documented, requires adjustment of muscle memory, and makes migration slightly harder.

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.

@Pandapip1 Pandapip1 added the enhancement New feature or request label Sep 13, 2023
@Electroid Electroid added the bun install Something that relates to the npm-compatible client label Sep 13, 2023
@madwau
Copy link

madwau commented Sep 15, 2023

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
Copy link
Contributor Author

Pandapip1 commented Sep 15, 2023

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
Copy link

nrmnqdds commented Oct 7, 2023

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
Copy link

kurucu commented Nov 9, 2023

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
Copy link

VasiliyRusin commented Dec 22, 2023

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
Copy link

make it please, it makes sense

@Confucian-e
Copy link

Any time plan for this feature?

@Pandapip1 Pandapip1 changed the title bun ci Clean Install Subcommand bun ci as an alias of bun install --frozen-lockfile Aug 8, 2024
@kelvinwop
Copy link

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

@raphael22
Copy link

+1
Useful to migrate preinstall hook script.

@kiranojhanp
Copy link

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

Just write a makefile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun install Something that relates to the npm-compatible client enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.