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

add an explicit bun install flag to disable frozen lockfiles #16387

Open
blimmer opened this issue Jan 14, 2025 · 2 comments
Open

add an explicit bun install flag to disable frozen lockfiles #16387

blimmer opened this issue Jan 14, 2025 · 2 comments
Labels
bun install Something that relates to the npm-compatible client enhancement New feature or request

Comments

@blimmer
Copy link
Contributor

blimmer commented Jan 14, 2025

What is the problem this feature would solve?

Many other package managers have a flag to disable --frozen-lockfile:

  • pnpm: --no-prefer-frozen-lockfile
  • yarn: --no-immutable

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

Ensures 100% that you don't enforce frozen lockfile - see aws/aws-cdk#32906

According to this GitHub search, people already seem to think we can do this:

Image

..can we? does the CLI automatically invert all flags with --no-<regular-flag>? I couldn't find docs on that.

What alternatives have you considered?

No response

@blimmer blimmer added the enhancement New feature or request label Jan 14, 2025
@RiskyMH RiskyMH added the bun install Something that relates to the npm-compatible client label Jan 14, 2025
@RiskyMH
Copy link
Member

RiskyMH commented Jan 14, 2025

it seems like the only time frozen-lockfile will be enabled by default is if you use --production, so what would this flag do? Are you possibly passing both at same time and want --no-prefer-frozen-lockfile to override and make it not do frozen?

@blimmer
Copy link
Contributor Author

blimmer commented Jan 14, 2025

Today, bun install doesn't assume a frozen lockfile unless you specify it. However, I could see bun going the direction of many other package managers and automatically enabling --frozen-lockfile if CI=true in the environment.

Image

Image

The context that made me bring this up is here: https://github.com/aws/aws-cdk/blob/fb2b229912f7400f810959eeb51008e680216718/packages/aws-cdk-lib/aws-lambda-nodejs/lib/package-manager.ts#L34-L49 where we're disabling the frozen-lockfile behavior for those package managers.

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

No branches or pull requests

2 participants