Skip to content

test: cover template literal concatenation minification#1

Draft
vercel-gh-bot-3[bot] wants to merge 1 commit into
e2e/upstream-canary-95900-v2from
next-maintainer-agent/issue-95900-5e86f82fca50
Draft

test: cover template literal concatenation minification#1
vercel-gh-bot-3[bot] wants to merge 1 commit into
e2e/upstream-canary-95900-v2from
next-maintainer-agent/issue-95900-5e86f82fca50

Conversation

@vercel-gh-bot-3

@vercel-gh-bot-3 vercel-gh-bot-3 Bot commented Jul 20, 2026

Copy link
Copy Markdown

Summary

Adds a focused unit regression test for template-literal concatenation during SWC minification. The test uses the public minify() binding with the validated trigger—two interpolated template literals followed by a dynamic suffix—and asserts that the left template's trailing LTAIL> quasi remains in the folded output.

This is test-only and does not include a product fix.

Issue: vercel#95900

Validated behavior

The reporter reproduction was validated unchanged at dd667193b811bfe8a9942da299ddeba441e00f3d:

  • Next.js 16.2.10 emitted export function f(o){return"A640B400<r 640RTAIL>"+o}, dropping LTAIL>.
  • Next.js 16.3.0-canary.94 emitted export function f(o){return"A640B400LTAIL><r 640RTAIL>"+o}, preserving it.

The test copies that exact minifier input and checks the missing boundary directly.

Validation

pnpm build --filter=next
pnpm jest test/unit/next-swc.test.ts --runInBand
pnpm prettier --check test/unit/next-swc.test.ts
pnpm eslint --config eslint.cli.config.mjs test/unit/next-swc.test.ts

The focused Jest run passed all 4 tests (including the new minifier case), with 2 snapshots.

Base snapshot

The fork base contains the source tree from upstream canary at 89c94877667f1692ae979cc553bf86c763b0a6b0; only the fork's existing .github/workflows/build_reusable.yml is retained because the publishing token cannot update workflow files.

@vercel-gh-bot-3
vercel-gh-bot-3 Bot force-pushed the next-maintainer-agent/issue-95900-5e86f82fca50 branch from eb3e022 to 7aac8aa Compare July 23, 2026 01:48
Adds a focused regression test for vercel#95900 using the public SWC minify binding.
@vercel-gh-bot-3
vercel-gh-bot-3 Bot changed the base branch from next-maintainer-agent/base-163e45e401df to e2e/upstream-canary-95900-v2 July 23, 2026 01:48
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.

0 participants