Open blimmer opened 1 week ago
Thanks @blimmer for submitting the feature request.
Thanks @khushail - I've got a PR ready for review here: https://github.com/aws/aws-cdk/pull/31770
I don't recommend developing using Bun and deploying to a Node platform. While I'm sure you'd be fine in the vast majority of cases, it could lead to some particularly annoying bugs.
Maybe I'm missing something, but it seems like this could only lead to confusion if users expect lock file support to imply Bun engine use.
Edit: After thinking on it a bit more, I think you'd likely be okay. The issues I've seen were related to moving Node projects to Bun, rather than the other way around.
This logic just allows installing dependencies from package.json
when you have a bun
lockfile. Since bun
uses the standard node_modules
resolution of packages, I think we'd be OK in the vast majority of cases.
Describe the feature
Today, NodejsFunction supports lockfiles from the following ecosystems:
bun
is gaining in popularity and has its own lockfile,bun.lockb
. It would be great ifNodejsFunction
supported using this lockfile.Use Case
We've been migrating our apps to use
bun
since it's so much faster thannode
. However, when creating anew NodejsFunction
with a bun lockfile, we get this error:For now, we'll probably move over to a supported package manager, but we'd love to see native support for
bun.lockb
.Proposed Solution
Update the bundling logic to include
bun
and supportbun install
-ing.Other Information
No response
Acknowledgements
CDK version used
2.162.1
Environment details (OS name and version, etc.)
MacOS