Skip to content

update examples.md for Bun v1.2 lockfile format #1605

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

loic-bellinger
Copy link

@loic-bellinger loic-bellinger commented May 14, 2025

Description

Updated the action-cache examples in examples.md to reflect Bun v1.2’s switch from the binary lockfile bun.lockb to the new text-based bun.lock.

Note: If you’re on Bun < v1.2 you’ll need to continue caching the legacy bun.lockb file or bump your version to take advantage of the new format. Maybe that should be specified in the .md?

Motivation and Context

Bun v1.2 introduced a potentially breaking change in its default lockfile format. Workflows that look for the legacy lockfile bun.lockb could silently miss cache hits when running on Bun >= v1.2, leading to slower installs and unexpected rebuilds. This documentation update ensures that users following examples will cache and restore dependencies correctly on newer Bun versions.

How Has This Been Tested?

Not yet tested in CI — these changes are strictly to documentation.

Users should apply the updated examples to their workflows and verify that the cache key correctly picks up bun.lock (e.g. by inspecting the Actions “Cache hit” log).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (add or update README or docs)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Bun v1.2 now uses the text-based `bun.lock` as its default lockfile format. Adjusted the action-cache examples to reference and cache `bun.lock` instead of the previous binary format.
@loic-bellinger loic-bellinger requested a review from a team as a code owner May 14, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant