Skip to content

fix: bump tempura to 1.0.1 - #89

Merged
lukeed merged 1 commit into
mainfrom
fix/tempura-1.0.1
Oct 26, 2026
Merged

lukeed merged 1 commit into
mainfrom
fix/tempura-1.0.1

Conversation

@lukeed

@lukeed lukeed commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

Bumps tempura to 1.0.1, which reads a regex literal in a template tag as a regex.

tempura 1.0.0 read a quote or a brace in a regex as the start of a string. The "string" then ran into the next tag that had the same character, and the template failed to compile. A user hit this when migrating a Markdown site:

{{ lede.replace(/`/g, '') }} … {{ lede.replace(/`/g, '') }}
Error compiling "html.hbs" layout: Unexpected token '}'. Expected ')' to end an argument list.

One such regex worked; a second one broke the whole layout. A ' or " in a regex had the same problem. In 1.0.1, a / starts a regex where an expression can start, and stays division after a value.

Changes

  • packages/bongo/package.json: tempura ^1.0.0 → ^1.0.1.
  • bun.lock: tempura 1.0.1. The versions of the workspace packages also catch up to 1.1.0, as bun install wrote them; they were stale since the v1.1.0 release.
  • A regression test in build.test.ts ("layout text"): two regexes with a backtick, one with a quote and a brace, and a division, in one layout.

Test plan

  • The new test fails on tempura 1.0.0 with the error above, and passes on 1.0.1
  • bun run build, bun test (883 pass), bunx tsc -p ., bunx tsc -p build
  • The 10k-page bench site renders the same bytes as on main (sha256 749c3b333f7eb60d)
  • The docs and the example site build

tempura 1.0.0 read a quote or a brace in a regex literal as the start of
a string, so a second regex with a backtick in one template broke it:
"Unexpected token '}'. Expected ')' to end an argument list".
@lukeed
lukeed merged commit 9c79ea5 into main Oct 26, 2026
4 checks passed
@lukeed
lukeed deleted the fix/tempura-1.0.1 branch October 26, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant