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

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

Open
1 of 2 tasks
blimmer opened this issue Feb 2, 2025 · 1 comment
Open
1 of 2 tasks

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

blimmer opened this issue Feb 2, 2025 · 1 comment
Labels
@aws-cdk/aws-lambda-nodejs effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@blimmer
Copy link
Contributor

blimmer commented Feb 2, 2025

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 bun@1.1.30

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

@blimmer blimmer added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 2, 2025
@pahud
Copy link
Contributor

pahud commented Feb 3, 2025

Yes we should consider this support. Thank you for your PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-nodejs effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

2 participants