From 8f01674ada99ce977e06e29e96e2af03726227a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:55:31 +0000 Subject: [PATCH 1/2] feat: update bun runtime to v1.4.5 --- .bun-version | 2 +- README.md | 2 +- src/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bun-version b/.bun-version index 1c99cf0..e516bb9 100644 --- a/.bun-version +++ b/.bun-version @@ -1 +1 @@ -1.4.4 +1.4.5 diff --git a/README.md b/README.md index 0912672..c292a9b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A custom [Bun](https://bun.sh) runtime for AWS Lambda with CDK constructs for ea > [!NOTE] > **v3 is ESM-only and no longer published as a jsii package.** Polyglot CDK support (Python, Java, .NET) has been removed — there were zero consumers. If you need the layer without CDK, the zip is available as a GitHub Release asset. See [ADR: Drop jsii](docs/adr-drop-jsii.md) for the full rationale. -Current bun version: [1.4.4](https://bun.sh/blog/bun-v1.4.4) +Current bun version: [1.4.5](https://bun.sh/blog/bun-v1.4.5) ## Installation diff --git a/src/index.ts b/src/index.ts index 9c392c3..5bd26cc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ import type { LayerVersionProps } from "aws-cdk-lib/aws-lambda"; import { LogGroup, RetentionDays } from "aws-cdk-lib/aws-logs"; import type { Construct } from "constructs"; -const bunVersion = "1.4.4"; +const bunVersion = "1.4.5"; export interface BunFunctionProps extends Omit< FunctionProps, From f040b3be4d66152e50661a15c3f68ea47b57b44f Mon Sep 17 00:00:00 2001 From: Ivan Barlog Date: Thu, 19 Nov 2026 23:32:25 +0100 Subject: [PATCH 2/2] fix(test): prefix generated handler identifiers to avoid reserved words --- test/runtime.test.ts | 53 +++++--------------------------------------- 1 file changed, 5 insertions(+), 48 deletions(-) diff --git a/test/runtime.test.ts b/test/runtime.test.ts index 25d76a0..7245611 100644 --- a/test/runtime.test.ts +++ b/test/runtime.test.ts @@ -66,57 +66,14 @@ async function waitFor(props: { condition: () => boolean; timeoutMs: number }): } } -// JS reserved words cannot be used as a `const`/`function` binding name, so a -// generated handler like `export const in = ...` is a syntax error. Excluding -// them keeps the generated identifiers valid (otherwise the test is flaky). -const reservedWords = new Set([ - "break", - "case", - "catch", - "class", - "const", - "continue", - "debugger", - "default", - "delete", - "do", - "else", - "enum", - "export", - "extends", - "false", - "finally", - "for", - "function", - "if", - "import", - "in", - "instanceof", - "new", - "null", - "return", - "super", - "switch", - "this", - "throw", - "true", - "try", - "typeof", - "var", - "void", - "while", - "with", - "yield", - "let", - "static", - "await", - "async", -]); - +// The "h" prefix guarantees a valid identifier: a bare generated name can be a +// reserved word in strict-mode ESM (e.g. `in`, `public`, `eval`), which makes +// the generated handler module a syntax error and the test flaky. function validIdentifier(props: { minLength: number; maxLength: number }): fc.Arbitrary { return fc .string({ minLength: props.minLength, maxLength: props.maxLength }) - .filter((value) => /^[a-zA-Z][a-zA-Z0-9]*$/.test(value) && !reservedWords.has(value)); + .filter((value) => /^[a-zA-Z0-9]+$/.test(value)) + .map((value) => `h${value}`); } describe("handler string resolution (Property 1)", () => {