Skip to content

(aws-lambda-nodejs): Support Bun 1.2 text lockfile #33270

@blimmer

Description

@blimmer

Describe the feature

With Bun 1.2, the default lockfile produced is a text-based lockfile (bun.lock) instead of the binary (bun.lockb). The Bun 1.2 release blog post provides context on this change.

TLDR; bun should be identified by either bun.lockb or bun.lock.

Use Case

Newer bun users will produce the bun.lock file, not bun.lockb. Our current implementation will not identify this file during bundling.

Proposed Solution

Currently, we only pay attention to bun.lockb

As noted in the release notes, bun will support bun.lockb and bun.lock for the foreseeable future. This will require a refactor in our existing logic because there's currently a 1:1 relationship between a package manager and its lockfile.

Additionally, we'll want to bump the bun version in the Dockerfile to >= 1.2

# Install bun
RUN npm install --global [email protected]

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.177.0

Environment details (OS name and version, etc.)

MacOS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions