(aws-lambda-nodejs): Support Bun 1.2 text lockfile #33270
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
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 eitherbun.lockb
orbun.lock
.Use Case
Newer
bun
users will produce thebun.lock
file, notbun.lockb
. Our current implementation will not identify this file during bundling.Proposed Solution
Currently, we only pay attention to
bun.lockb
aws-cdk/packages/aws-cdk-lib/aws-lambda-nodejs/lib/package-manager.ts
Line 15 in 6b9e47a
As noted in the release notes,
bun
will supportbun.lockb
andbun.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 theDockerfile
to >= 1.2aws-cdk/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile
Lines 12 to 13 in 6b9e47a
Other Information
No response
Acknowledgements
CDK version used
2.177.0
Environment details (OS name and version, etc.)
MacOS
The text was updated successfully, but these errors were encountered: