Skip to content

(aws-lambda-nodejs): Support bun lockfiles for NodejsFunction bundling #31753

@blimmer

Description

@blimmer

Describe the feature

Today, NodejsFunction supports lockfiles from the following ecosystems:

  • NPM
  • Yarn
  • PNPM

bun is gaining in popularity and has its own lockfile, bun.lockb. It would be great if NodejsFunction supported using this lockfile.

Use Case

We've been migrating our apps to use bun since it's so much faster than node. However, when creating a new NodejsFunction with a bun lockfile, we get this error:

Error: Cannot find a package lock file (pnpm-lock.yaml, yarn.lock or package-lock.json). Please specify it with depsLockFilePath.

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 support bun install-ing.

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.162.1

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