antfu-collective / ni

💡 Use the right package manager
MIT License
6.25k stars 208 forks source link

fix(bun): incorrect bun frozen-lockfile command #214

Closed mrsekut closed 2 months ago

mrsekut commented 2 months ago

Description

Fixed incorrect commands related to the bun frozen-lockfile option.

The original implementation incorrectly used bun install --no-save for the frozen-lockfile option. The correct command should be bun install --frozen-lockfile, as per the bun documentation.

Linked Issues

Additional context

The bun documentation under the bun install section here states:

For reproducible installs, use --frozen-lockfile. This will install the exact versions of each package specified in the lockfile. If your package.json disagrees with bun.lockb, Bun will exit with an error. The lockfile will not be updated.

$ bun install --frozen-lockfile

Additionally, the lockfile section here mentions:

Can I opt out? To install without creating a lockfile:

bun install --no-save

The previous implementation incorrectly used --no-save in the frozen-lockfile