Skip to content

Commit

Permalink
fix(lambda-nodejs): do not require a frozen lockfile for bun (#32908)
Browse files Browse the repository at this point in the history
### Issue #32906

Closes #32906.

### Reason for this change

When I implemented `bun` support, I accidentally used `--frozen-lockfile`, which caused issues when the lockfile contained additional entries other than what's being bundled in the docker container.

The issue has a small repro-case.

### Description of changes

I removed the `--frozen-lockfile` flag, which resolved the problem.

### Describe any new or updated permissions being added

N/A

### Description of how you validated changes

I added an additional package to the `bun.lockb` file in the integration test. This caused the issue to occur in the test suite. Once I made the changes in this PR, the test started passing again.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
blimmer authored Mar 3, 2025
1 parent 878ad54 commit a21190e
Show file tree
Hide file tree
Showing 15 changed files with 355 additions and 179 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"/": "We call this _package.json so nx doesn't get confused. If you need to regenerate the lockfile, temporarily rename this file to package.json",
"//": "It's important to have two dependencies here (one bundled, one not) to test that the lockfile can be updated in the docker container.",
"dependencies": {
"axios": "1.7.8",
"express": "4.19.2"
}
}
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "06377804ec21f3cc33473a6b5853b2a873177c1ebe09b176c3ab1eef45287c97.zip"
"S3Key": "34a0cfe827762d92939af809d39b2595744d7d29328d6ec419935ca5a9fe9116.zip"
},
"Handler": "index.handler",
"Role": {
Expand All @@ -47,7 +47,7 @@
"Arn"
]
},
"Runtime": "nodejs20.x"
"Runtime": "nodejs22.x"
},
"DependsOn": [
"FunctionServiceRole675BB04A"
Expand Down
Loading

0 comments on commit a21190e

Please sign in to comment.