Skip to content

fix(codegen): 템플릿 리터럴 줄바꿈 이스케이프 누락 수정#600

Merged
ohah merged 2 commits into
mainfrom
fix/template-literal-newline-escape
Apr 1, 2026
Merged

fix(codegen): 템플릿 리터럴 줄바꿈 이스케이프 누락 수정#600
ohah merged 2 commits into
mainfrom
fix/template-literal-newline-escape

Conversation

@ohah
Copy link
Copy Markdown
Owner

@ohah ohah commented Apr 1, 2026

Summary

  • 템플릿 리터럴에 실제 줄바꿈(\n, \r)이 포함된 경우 ES5 다운레벨링 시 문자열 안에 줄바꿈이 그대로 출력되어 JS 구문 오류 발생
  • buildStringLiteral에서 \n\\n, \r\\r 이스케이프 추가
  • 줄바꿈/CR 포함 템플릿 리터럴 테스트 3개 추가

Before

// input
var s = `hello
world`;
// ES5 output (invalid JS - syntax error)
var s = "hello
world";

After

// ES5 output (valid JS)
var s = "hello\nworld";

Test plan

  • zig build test 통과
  • 줄바꿈만 있는 케이스, 치환+줄바꿈 케이스, CR+LF 케이스 테스트 추가

🤖 Generated with Claude Code

템플릿 리터럴에 실제 줄바꿈(\n, \r)이 포함된 경우 ES5 다운레벨링 시
문자열 리터럴 안에 줄바꿈이 그대로 출력되어 JS 구문 오류 발생.
buildStringLiteral에서 \n → \\n, \r → \\r 이스케이프 추가.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah self-assigned this Apr 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Smoke Test Results (CI)

Smoke Test Results

Project ZTS Size Time esbuild Size Time rolldown Size Time rspack Size Time Output
lodash-es OK 46KB 24ms OK 64KB 58ms OK 99KB 163ms OK 122KB 127ms MATCH
preact OK 13KB 4ms OK 15KB 9ms OK 13KB 112ms OK 13KB 117ms MATCH
date-fns OK 37KB 149ms OK 47KB 44ms OK 77KB 133ms OK 102KB 149ms MATCH
uuid OK 2.2KB 4ms OK 2.1KB 8ms OK 2.0KB 112ms OK 3.9KB 106ms MATCH
zod OK 102KB 10ms OK 119KB 16ms OK 98KB 115ms OK 147KB 123ms MATCH
axios OK 345KB 22ms FAIL 436KB 34ms OK 399KB 133ms OK 411KB 152ms MATCH
toolkit OK 65KB 10ms OK 51KB 17ms OK 39KB 126ms OK 126KB 121ms MATCH
rxjs OK 325KB 22ms OK 367KB 37ms OK 308KB 157ms OK 325KB 141ms MATCH
immer OK 18KB 5ms OK 22KB 9ms OK 19KB 106ms OK 36KB 111ms MATCH
superjson OK 23KB 6ms OK 26KB 10ms OK 24KB 107ms OK 32KB 109ms MATCH
express OK 782KB 28ms OK 1138KB 59ms OK 908KB 166ms OK 917KB 185ms MATCH
react OK 52KB 6ms OK 64KB 12ms OK 53KB 120ms OK 18KB 106ms MATCH
commander OK 68KB 7ms OK 119KB 13ms OK 100KB 119ms OK 121KB 119ms MATCH
eventemitter3 OK 6.2KB 3ms OK 7.8KB 7ms OK 9.2KB 107ms OK 10KB 109ms MATCH
ms OK 3.1KB 3ms OK 4.3KB 6ms OK 4.0KB 102ms OK 5.0KB 104ms MATCH
dotenv OK 11KB 3ms OK 14KB 7ms OK 12KB 103ms OK 14KB 104ms MATCH
jsonwebtoken OK 115KB 10ms OK 137KB 19ms OK 141KB 117ms OK 159KB 117ms MATCH
bcryptjs OK 32KB 5ms OK 46KB 9ms OK 47KB 108ms OK 60KB 108ms MATCH
clsx OK 0.6KB 3ms OK 0.6KB 6ms OK 0.7KB 102ms OK 1.5KB 105ms MATCH
tiny-invariant OK 0.5KB 2ms OK 0.6KB 5ms OK 0.6KB 103ms OK 1.5KB 105ms MATCH
tanstack-query OK 47KB 6ms OK 57KB 11ms OK 49KB 117ms OK 59KB 114ms MATCH
fast-glob OK 164KB 12ms OK 199KB 23ms OK 187KB 122ms OK 201KB 118ms MATCH
micromatch OK 81KB 7ms OK 100KB 13ms OK 100KB 114ms OK 108KB 113ms MATCH
semver OK 55KB 6ms OK 66KB 12ms OK 52KB 110ms OK 67KB 110ms MATCH
debug OK 19KB 4ms FAIL 25KB 8ms OK 24KB 104ms OK 28KB 107ms MATCH
chalk OK 13KB 4ms OK 15KB 8ms OK 14KB 114ms OK 17KB 107ms MATCH
yaml OK 209KB 12ms OK 261KB 20ms OK 228KB 131ms OK 284KB 119ms MATCH
yargs OK 167KB 11ms OK 185KB 17ms OK 167KB 133ms OK 227KB 125ms MATCH
effect OK 666KB 145ms OK 477KB 161ms OK 368KB 267ms OK 1460KB 241ms MATCH
vue OK 1622KB 72ms OK 2009KB 79ms OK 1606KB 247ms OK 1216KB 172ms MATCH
svelte OK 71KB 13ms OK 4.7KB 16ms OK 3.5KB 117ms OK 197KB 129ms MATCH
solid-js OK 0.3KB 4ms OK 2.4KB 7ms OK 2.2KB 108ms OK 23KB 109ms MATCH
three OK 246KB 61ms OK 296KB 69ms OK 276KB 174ms OK 1280KB 243ms MATCH
graphql OK 55KB 13ms OK 604KB 34ms OK 547KB 149ms OK 100KB 117ms MATCH
supabase OK 312KB 20ms OK 759KB 31ms OK 706KB 143ms OK 779KB 144ms MATCH
mobx OK 135KB 12ms OK 271KB 21ms OK 234KB 140ms OK 190KB 126ms MATCH
jotai OK 21KB 5ms OK 23KB 8ms OK 20KB 113ms OK 26KB 107ms MATCH
mitt OK 0.5KB 2ms OK 0.6KB 6ms OK 0.7KB 101ms OK 1.5KB 104ms MATCH
zustand OK 1.1KB 2ms OK 1.2KB 6ms OK 1.3KB 103ms OK 2.3KB 103ms MATCH
valtio OK 6.8KB 4ms OK 7.5KB 8ms OK 8.3KB 112ms OK 24KB 106ms MATCH
react-dom OK 1105KB 32ms OK 1355KB 38ms OK 1116KB 185ms OK 534KB 123ms MATCH
d3 OK 115KB 40ms OK 100KB 72ms OK 96KB 161ms OK 150KB 183ms MATCH
hono OK 43KB 8ms OK 59KB 13ms OK 52KB 108ms OK 68KB 111ms MATCH
dayjs OK 11KB 3ms OK 14KB 7ms OK 11KB 111ms OK 8.9KB 103ms MATCH
nanoid OK 0.8KB 3ms OK 0.9KB 6ms OK 0.9KB 106ms OK 2.6KB 105ms MATCH
zlib OK 97KB 11ms OK 112KB 15ms OK 102KB 126ms OK 222KB 123ms MATCH
fp-ts OK 8.8KB 6ms OK 70KB 13ms OK 100KB 119ms OK 50KB 112ms MATCH
neverthrow OK 11KB 3ms OK 18KB 7ms OK 13KB 105ms OK 19KB 106ms MATCH
drizzle-orm OK 20KB 32ms OK 30KB 26ms OK 14KB 113ms OK 35KB 119ms MATCH
tslib OK 0.8KB 4ms OK 0.8KB 7ms OK 0.8KB 115ms OK 18KB 107ms MATCH
iconv-lite OK 300KB 7ms OK 543KB 14ms OK 319KB 118ms OK 325KB 112ms MATCH
qs OK 78KB 10ms OK 95KB 21ms OK 81KB 114ms OK 92KB 111ms MATCH
change-case OK 3.1KB 3ms OK 3.2KB 6ms OK 3.3KB 102ms OK 8.0KB 104ms MATCH
path-to-regexp OK 11KB 3ms OK 14KB 7ms OK 8.0KB 112ms OK 15KB 104ms MATCH
mime-types OK 178KB 8ms OK 235KB 14ms OK 198KB 110ms OK 164KB 126ms MATCH
ajv OK 207KB 12ms OK 243KB 20ms OK 208KB 132ms OK 239KB 120ms MATCH
cac OK 17KB 4ms OK 18KB 8ms OK 16KB 111ms OK 19KB 107ms MATCH
defu OK 1.9KB 3ms OK 2.1KB 6ms OK 1.8KB 100ms OK 3.0KB 103ms MATCH
pathe OK 14KB 4ms OK 3.4KB 8ms OK 3.0KB 104ms OK 13KB 107ms MATCH
destr OK 2.0KB 2ms OK 2.1KB 6ms OK 1.8KB 105ms OK 3.1KB 103ms MATCH
hookable OK 5.3KB 3ms OK 5.9KB 6ms OK 5.2KB 103ms OK 9.3KB 106ms MATCH
minimatch OK 46KB 7ms OK 56KB 12ms OK 47KB 113ms OK 90KB 112ms MATCH
cheerio OK 1727KB 52ms OK 2186KB 85ms OK 1747KB 244ms OK 2387KB 211ms MATCH
is-glob OK 4.5KB 3ms OK 6.4KB 6ms OK 4.9KB 103ms OK 6.0KB 103ms MATCH
glob-parent OK 5.8KB 3ms OK 8.4KB 8ms OK 6.3KB 104ms OK 7.9KB 106ms MATCH
escape-string-regexp OK 0.3KB 3ms OK 0.4KB 6ms OK 0.4KB 110ms OK 1.5KB 105ms MATCH
fast-deep-equal OK 1.9KB 3ms OK 2.9KB 6ms OK 2.3KB 103ms OK 3.2KB 105ms MATCH
deepmerge OK 4.4KB 3ms OK 5.5KB 6ms OK 4.5KB 106ms OK 6.0KB 106ms MATCH
color-convert OK 25KB 5ms OK 30KB 9ms OK 27KB 110ms OK 27KB 110ms MATCH
picomatch OK 48KB 6ms OK 58KB 10ms OK 55KB 111ms OK 61KB 112ms MATCH
type-is OK 185KB 9ms OK 244KB 16ms OK 210KB 113ms OK 179KB 134ms MATCH
object-assign OK 2.6KB 3ms OK 3.8KB 6ms OK 2.8KB 113ms OK 4.3KB 107ms MATCH
has-flag OK 0.4KB 2ms OK 0.5KB 6ms OK 1.5KB 113ms OK 1.7KB 108ms MATCH
p-limit OK 2.6KB 3ms OK 3.0KB 6ms OK 2.7KB 114ms OK 5.2KB 108ms MATCH
strip-ansi OK 0.7KB 3ms OK 0.8KB 6ms OK 0.8KB 110ms OK 2.2KB 107ms MATCH
ansi-regex OK 0.4KB 3ms OK 0.5KB 6ms OK 0.4KB 110ms OK 1.8KB 108ms MATCH
wrap-ansi OK 32KB 5ms OK 35KB 10ms OK 34KB 121ms OK 38KB 112ms MATCH
supports-color OK 3.6KB 3ms OK 3.8KB 6ms OK 4.6KB 116ms OK 5.7KB 111ms MATCH
cross-spawn OK 14KB 5ms OK 18KB 10ms OK 15KB 111ms OK 19KB 110ms MATCH
lru-cache OK 21KB 5ms OK 23KB 8ms OK 22KB 115ms OK 18KB 113ms MATCH
signal-exit OK 5.2KB 3ms OK 6.8KB 7ms OK 6.5KB 111ms OK 12KB 108ms MATCH
which OK 7.4KB 3ms OK 9.5KB 8ms OK 7.7KB 111ms OK 8.7KB 108ms MATCH
string-width OK 23KB 4ms OK 25KB 9ms OK 25KB 107ms OK 27KB 110ms MATCH
safe-buffer OK 2.3KB 3ms OK 3.8KB 7ms OK 1.7KB 108ms OK 3.8KB 105ms MATCH
bytes OK 3.0KB 3ms OK 4.3KB 6ms OK 4.3KB 107ms OK 5.5KB 105ms MATCH
depd OK 9.2KB 3ms OK 12KB 6ms OK 11KB 109ms OK 13KB 108ms MATCH
merge-descriptors OK 1.5KB 3ms OK 2.3KB 6ms OK 1.8KB 117ms OK 2.9KB 105ms MATCH
content-type OK 4.0KB 3ms OK 5.3KB 7ms OK 4.2KB 113ms OK 6.0KB 105ms MATCH
cookie OK 7.8KB 3ms OK 9.8KB 6ms OK 5.6KB 106ms OK 13KB 107ms MATCH
on-finished OK 4.8KB 3ms OK 6.9KB 6ms OK 6.6KB 105ms OK 8.3KB 108ms MATCH
statuses OK 4.1KB 3ms OK 5.8KB 7ms OK 5.3KB 117ms OK 6.1KB 107ms MATCH
etag OK 2.4KB 3ms OK 3.7KB 6ms OK 3.3KB 103ms OK 4.6KB 103ms MATCH
vary OK 2.6KB 3ms OK 3.7KB 6ms OK 3.5KB 113ms OK 5.1KB 104ms MATCH
flat OK 1.2KB 3ms OK 1.3KB 6ms OK 1.2KB 110ms OK 4.9KB 104ms MATCH
retry OK 6.8KB 3ms OK 8.6KB 7ms OK 7.0KB 105ms OK 7.3KB 104ms MATCH
camelcase OK 3.5KB 3ms OK 3.7KB 6ms OK 3.5KB 108ms OK 4.5KB 104ms MATCH
decamelize OK 1.2KB 2ms OK 1.3KB 6ms OK 1.3KB 101ms OK 3.0KB 104ms MATCH
memoize-one OK 1.2KB 3ms OK 3.1KB 6ms OK 2.3KB 101ms OK 2.4KB 104ms MATCH
rfdc OK 6.4KB 3ms OK 8.2KB 6ms OK 6.4KB 110ms OK 7.7KB 102ms MATCH
ohash OK 3.6KB 3ms OK 4.1KB 7ms OK 3.9KB 112ms OK 4.6KB 106ms MATCH
nanoevents OK 0.5KB 2ms OK 0.5KB 6ms OK 0.5KB 100ms OK 1.6KB 103ms MATCH
typebox OK 104KB 16ms OK 116KB 29ms OK 123KB 125ms OK 182KB 145ms MATCH
ts-pattern OK 10KB 4ms OK 12KB 8ms OK 11KB 108ms OK 9.6KB 107ms MATCH
valibot OK 5.9KB 11ms OK 6.8KB 16ms OK 8.0KB 110ms OK 193KB 123ms MATCH
ts-results-es OK 19KB 4ms OK 22KB 8ms OK 26KB 102ms OK 34KB 107ms MATCH
remeda OK 2.1KB 12ms OK 2.2KB 18ms OK 2.1KB 111ms OK 3.3KB 115ms MATCH
nanostores OK 4.9KB 4ms OK 5.7KB 7ms OK 5.1KB 112ms OK 8.2KB 106ms MATCH
ky OK 26KB 5ms OK 30KB 9ms OK 30KB 106ms OK 49KB 110ms MATCH
typedi OK 13KB 4ms OK 27KB 8ms OK 28KB 109ms OK 25KB 108ms MATCH
io-ts OK 23KB 8ms OK 104KB 17ms OK 117KB 122ms OK 102KB 117ms MATCH
type-fest OK 0.1KB 2ms OK 0.1KB 5ms OK 0.1KB 101ms OK 0.9KB 100ms MATCH
arktype OK 258KB 18ms OK 297KB 30ms OK 273KB 134ms OK 382KB 150ms MATCH
kysely OK 225KB 23ms OK 371KB 39ms OK 357KB 133ms OK 471KB 166ms MATCH
lodash-es@es5 OK 13KB 20ms OK 18KB 55ms OK 28KB 141ms FAIL - 0ms MATCH
clsx@es5 OK 1.0KB 2ms OK 0.6KB 5ms OK 0.6KB 108ms FAIL - 0ms MATCH
ms@es5 OK 3.5KB 3ms OK 4.5KB 6ms OK 4.0KB 114ms FAIL - 0ms MATCH
deepmerge@es5 OK 4.8KB 3ms OK 5.7KB 6ms OK 4.5KB 110ms FAIL - 0ms MATCH
fast-deep-equal@es5 OK 2.4KB 3ms OK 3.0KB 5ms OK 2.3KB 105ms FAIL - 0ms MATCH
semver@es5 OK 58KB 6ms FAIL - 10ms OK 52KB 117ms FAIL - 0ms MATCH
lodash-es@es2015 OK 13KB 21ms OK 18KB 55ms OK 28KB 143ms FAIL - 0ms MATCH
superjson@es2015 OK 23KB 6ms OK 27KB 12ms OK 24KB 107ms FAIL - 0ms MATCH
flat@es2017 OK 1.2KB 3ms OK 1.3KB 6ms OK 1.2KB 111ms FAIL - 0ms MATCH
defu@es2017 OK 1.9KB 3ms OK 2.8KB 6ms OK 1.8KB 110ms FAIL - 0ms MATCH
picomatch@es2018 OK 48KB 5ms OK 58KB 9ms OK 55KB 107ms FAIL - 0ms MATCH
semver@es2019 OK 55KB 6ms OK 66KB 11ms OK 52KB 116ms FAIL - 0ms MATCH
clsx@es2019 OK 0.5KB 2ms OK 0.6KB 5ms OK 0.6KB 105ms FAIL - 0ms MATCH
nanoid@es2019 OK 0.8KB 3ms OK 1.0KB 6ms OK 0.9KB 109ms FAIL - 0ms MATCH
dayjs@es2020 OK 11KB 3ms OK 14KB 7ms OK 11KB 111ms FAIL - 0ms MATCH
ohash@es2020 OK 3.7KB 3ms OK 4.8KB 7ms OK 3.9KB 102ms FAIL - 0ms MATCH
lru-cache@es2021 OK 21KB 5ms OK 35KB 9ms OK 22KB 105ms FAIL - 0ms MATCH
nanostores@es2021 OK 1.8KB 3ms OK 2.3KB 7ms OK 1.9KB 103ms FAIL - 0ms MATCH
lodash-es@chrome80 OK 46KB 21ms OK 64KB 55ms OK 99KB 151ms FAIL - 0ms MATCH
clsx@chrome49 OK 1.0KB 2ms OK 0.6KB 6ms OK 0.7KB 106ms FAIL - 0ms MATCH
dayjs@safari14 OK 11KB 3ms OK 14KB 7ms OK 11KB 111ms FAIL - 0ms MATCH
nanoid@node16 OK 0.8KB 3ms OK 0.9KB 6ms OK 0.9KB 103ms FAIL - 0ms DIFF

Size Comparison (ZTS vs esbuild)

Project ZTS esbuild rolldown rspack Ratio Status
svelte 71KB 4.7KB 3.5KB 197KB 15.28x
pathe 14KB 3.4KB 3.0KB 13KB 3.96x
clsx@es5 1.0KB 0.6KB 0.6KB - 1.57x
clsx@chrome49 1.0KB 0.6KB 0.7KB - 1.56x
effect 666KB 477KB 368KB 1460KB 1.40x ⚠️
toolkit 65KB 51KB 39KB 126KB 1.28x ⚠️
type-fest 0.1KB 0.1KB 0.1KB 0.9KB 1.18x ⚠️
d3 115KB 100KB 96KB 150KB 1.15x ⚠️
uuid 2.2KB 2.1KB 2.0KB 3.9KB 1.05x
remeda 2.1KB 2.2KB 2.1KB 3.3KB 0.97x
camelcase 3.5KB 3.7KB 3.5KB 4.5KB 0.96x
change-case 3.1KB 3.2KB 3.3KB 8.0KB 0.95x
string-width 23KB 25KB 25KB 27KB 0.94x
destr 2.0KB 2.1KB 1.8KB 3.1KB 0.94x
flat@es2017 1.2KB 1.3KB 1.2KB - 0.94x
flat 1.2KB 1.3KB 1.2KB 4.9KB 0.94x
supports-color 3.6KB 3.8KB 4.6KB 5.7KB 0.94x
zustand 1.1KB 1.2KB 1.3KB 2.3KB 0.93x
decamelize 1.2KB 1.3KB 1.3KB 3.0KB 0.93x
tslib 0.8KB 0.8KB 0.8KB 18KB 0.93x
lru-cache 21KB 23KB 22KB 18KB 0.92x
cac 17KB 18KB 16KB 19KB 0.92x
wrap-ansi 32KB 35KB 34KB 38KB 0.92x
valtio 6.8KB 7.5KB 8.3KB 24KB 0.91x
ansi-regex 0.4KB 0.5KB 0.4KB 1.8KB 0.91x
hookable 5.3KB 5.9KB 5.2KB 9.3KB 0.91x
has-flag 0.4KB 0.5KB 1.5KB 1.7KB 0.91x
yargs 167KB 185KB 167KB 227KB 0.90x
clsx 0.6KB 0.6KB 0.7KB 1.5KB 0.90x
jotai 21KB 23KB 20KB 26KB 0.90x
clsx@es2019 0.5KB 0.6KB 0.6KB - 0.90x
defu 1.9KB 2.1KB 1.8KB 3.0KB 0.89x
typebox 104KB 116KB 123KB 182KB 0.89x
ts-pattern 10KB 12KB 11KB 9.6KB 0.89x
rxjs 325KB 367KB 308KB 325KB 0.89x
superjson 23KB 26KB 24KB 32KB 0.89x
ohash 3.6KB 4.1KB 3.9KB 4.6KB 0.88x
ky 26KB 30KB 30KB 49KB 0.88x
strip-ansi 0.7KB 0.8KB 0.8KB 2.2KB 0.88x
superjson@es2015 23KB 27KB 24KB - 0.87x
zlib 97KB 112KB 102KB 222KB 0.87x
chalk 13KB 15KB 14KB 17KB 0.87x
arktype 258KB 297KB 273KB 382KB 0.87x
tiny-invariant 0.5KB 0.6KB 0.6KB 1.5KB 0.87x
valibot 5.9KB 6.8KB 8.0KB 193KB 0.87x
preact 13KB 15KB 13KB 13KB 0.86x
p-limit 2.6KB 3.0KB 2.7KB 5.2KB 0.86x
ts-results-es 19KB 22KB 26KB 34KB 0.86x
zod 102KB 119KB 98KB 147KB 0.86x
nanostores 4.9KB 5.7KB 5.1KB 8.2KB 0.85x
ajv 207KB 243KB 208KB 239KB 0.85x
mitt 0.5KB 0.6KB 0.7KB 1.5KB 0.85x
deepmerge@es5 4.8KB 5.7KB 4.5KB - 0.85x
nanoevents 0.5KB 0.5KB 0.5KB 1.6KB 0.85x
immer 18KB 22KB 19KB 36KB 0.84x
jsonwebtoken 115KB 137KB 141KB 159KB 0.84x
three 246KB 296KB 276KB 1280KB 0.83x
color-convert 25KB 30KB 27KB 27KB 0.83x
semver@es2019 55KB 66KB 52KB - 0.83x
semver 55KB 66KB 52KB 67KB 0.83x
react 52KB 64KB 53KB 18KB 0.82x
fast-glob 164KB 199KB 187KB 201KB 0.82x
tanstack-query 47KB 57KB 49KB 59KB 0.82x
picomatch@es2018 48KB 58KB 55KB - 0.82x
picomatch 48KB 58KB 55KB 61KB 0.82x
qs 78KB 95KB 81KB 92KB 0.82x
micromatch 81KB 100KB 100KB 108KB 0.82x
react-dom 1105KB 1355KB 1116KB 534KB 0.82x
escape-string-regexp 0.3KB 0.4KB 0.4KB 1.5KB 0.81x
minimatch 46KB 56KB 47KB 90KB 0.81x
path-to-regexp 11KB 14KB 8.0KB 15KB 0.81x
vue 1622KB 2009KB 1606KB 1216KB 0.81x
nanoid@es2019 0.8KB 1.0KB 0.9KB - 0.80x
cookie 7.8KB 9.8KB 5.6KB 13KB 0.80x
deepmerge 4.4KB 5.5KB 4.5KB 6.0KB 0.80x
nanoid 0.8KB 0.9KB 0.9KB 2.6KB 0.80x
dotenv 11KB 14KB 12KB 14KB 0.80x
nanoid@node16 0.8KB 0.9KB 0.9KB - 0.80x
nanostores@es2021 1.8KB 2.3KB 1.9KB - 0.80x
eventemitter3 6.2KB 7.8KB 9.2KB 10KB 0.80x
yaml 209KB 261KB 228KB 284KB 0.80x
cheerio 1727KB 2186KB 1747KB 2387KB 0.79x
date-fns 37KB 47KB 77KB 102KB 0.79x
rfdc 6.4KB 8.2KB 6.4KB 7.7KB 0.79x
ms@es5 3.5KB 4.5KB 4.0KB - 0.79x
retry 6.8KB 8.6KB 7.0KB 7.3KB 0.79x
depd 9.2KB 12KB 11KB 13KB 0.78x
which 7.4KB 9.5KB 7.7KB 8.7KB 0.77x
fast-deep-equal@es5 2.4KB 3.0KB 2.3KB - 0.77x
cross-spawn 14KB 18KB 15KB 19KB 0.77x
signal-exit 5.2KB 6.8KB 6.5KB 12KB 0.77x
ohash@es2020 3.7KB 4.8KB 3.9KB - 0.77x
dayjs@es2020 11KB 14KB 11KB - 0.77x
dayjs 11KB 14KB 11KB 8.9KB 0.77x
dayjs@safari14 11KB 14KB 11KB - 0.77x
type-is 185KB 244KB 210KB 179KB 0.76x
mime-types 178KB 235KB 198KB 164KB 0.76x
content-type 4.0KB 5.3KB 4.2KB 6.0KB 0.75x
hono 43KB 59KB 52KB 68KB 0.73x
ms 3.1KB 4.3KB 4.0KB 5.0KB 0.72x
lodash-es@chrome80 46KB 64KB 99KB - 0.72x
lodash-es 46KB 64KB 99KB 122KB 0.72x
statuses 4.1KB 5.8KB 5.3KB 6.1KB 0.72x
bytes 3.0KB 4.3KB 4.3KB 5.5KB 0.72x
lodash-es@es2015 13KB 18KB 28KB - 0.70x
lodash-es@es5 13KB 18KB 28KB - 0.70x
is-glob 4.5KB 6.4KB 4.9KB 6.0KB 0.70x
vary 2.6KB 3.7KB 3.5KB 5.1KB 0.70x
bcryptjs 32KB 46KB 47KB 60KB 0.69x
on-finished 4.8KB 6.9KB 6.6KB 8.3KB 0.69x
object-assign 2.6KB 3.8KB 2.8KB 4.3KB 0.69x
glob-parent 5.8KB 8.4KB 6.3KB 7.9KB 0.69x
express 782KB 1138KB 908KB 917KB 0.69x
defu@es2017 1.9KB 2.8KB 1.8KB - 0.68x
fast-deep-equal 1.9KB 2.9KB 2.3KB 3.2KB 0.68x
drizzle-orm 20KB 30KB 14KB 35KB 0.67x
etag 2.4KB 3.7KB 3.3KB 4.6KB 0.64x
merge-descriptors 1.5KB 2.3KB 1.8KB 2.9KB 0.64x
neverthrow 11KB 18KB 13KB 19KB 0.62x
safe-buffer 2.3KB 3.8KB 1.7KB 3.8KB 0.61x
kysely 225KB 371KB 357KB 471KB 0.61x
lru-cache@es2021 21KB 35KB 22KB - 0.60x
commander 68KB 119KB 100KB 121KB 0.57x
iconv-lite 300KB 543KB 319KB 325KB 0.55x
mobx 135KB 271KB 234KB 190KB 0.50x
typedi 13KB 27KB 28KB 25KB 0.49x
supabase 312KB 759KB 706KB 779KB 0.41x
memoize-one 1.2KB 3.1KB 2.3KB 2.4KB 0.39x
io-ts 23KB 104KB 117KB 102KB 0.22x
solid-js 0.3KB 2.4KB 2.2KB 23KB 0.14x
fp-ts 8.8KB 70KB 100KB 50KB 0.13x
graphql 55KB 604KB 547KB 100KB 0.09x

Average ratio: 0.94x | Smaller: 123 | Similar(±10%): 1 | Larger: 8

Auto-generated by CI on 2026-04-01 19:17 UTC

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Benchmark Results (CI)

macos-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 2 4 1.0x
esbuild 4 4 4 1.3x
Bun 5 5 7 1.7x
oxc (node) 60 55 71 20.0x
SWC 106 103 114 35.3x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 3 4 1.0x
esbuild 4 4 4 1.3x
Bun 7 5 8 2.3x
oxc (node) 61 56 65 20.3x
SWC 109 105 115 36.3x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 4 4 4 1.0x
ZTS 8 8 8 2.0x
Bun 9 8 11 2.3x
oxc (node) 60 55 67 15.0x
SWC 121 115 127 30.3x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 3 4 1.0x
esbuild 7 6 7 2.3x
Bun 7 5 8 2.3x
rolldown 105 103 108 35.0x
rspack 113 111 116 37.7x
webpack 358 326 375 119.3x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 3 4 1.0x
Bun 6 6 7 2.0x
esbuild 9 8 10 3.0x
rolldown 112 106 119 37.3x
rspack 152 125 172 50.7x
webpack 422 394 451 140.7x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 7 6 7 1.0x
Bun 10 9 10 1.4x
esbuild 13 12 15 1.9x
rolldown 147 123 172 21.0x

ubuntu-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 1 1 2 1.0x
esbuild 2 2 2 2.0x
Bun 2 2 2 2.0x
oxc (node) 26 26 27 26.0x
SWC 78 76 79 78.0x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 2 2 2 1.0x
Bun 3 3 4 1.5x
ZTS 4 4 4 2.0x
oxc (node) 27 26 27 13.5x
SWC 83 80 86 41.5x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 2 2 2 1.0x
Bun 9 9 10 4.5x
ZTS 14 14 14 7.0x
oxc (node) 26 26 27 13.0x
SWC 111 102 129 55.5x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 2 2 2 1.0x
Bun 4 3 4 2.0x
esbuild 5 5 5 2.5x
rolldown 99 95 104 49.5x
rspack 99 98 100 49.5x
webpack 457 450 465 228.5x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 3 3 1.0x
Bun 4 4 5 1.3x
esbuild 6 6 6 2.0x
rolldown 98 96 101 32.7x
rspack 104 104 105 34.7x
webpack 456 452 463 152.0x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 6 6 6 1.0x
Bun 7 7 8 1.2x
esbuild 13 12 13 2.2x
rolldown 105 102 113 17.5x

windows-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 10 9 10 1.0x
Bun 18 18 19 1.8x
oxc (node) 62 60 68 6.2x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 12 11 12 1.0x
Bun 18 17 20 1.5x
oxc (node) 60 59 62 5.0x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
Bun 18 17 18 1.0x
ZTS 22 22 22 1.2x
oxc (node) 60 59 61 3.3x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 13 13 13 1.0x
Bun 31 31 31 2.4x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 17 17 17 1.0x
Bun 35 34 35 2.1x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 32 31 32 1.0x
Bun 46 44 49 1.4x

Auto-generated by CI on 2026-04-01 19:19 UTC

ES5 문자열 리터럴에서 U+2028(Line Separator), U+2029(Paragraph Separator)는
줄바꿈으로 취급되어 구문 오류 발생. \u2028/\u2029로 이스케이프 추가.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah merged commit 14b99a3 into main Apr 1, 2026
17 checks passed
@ohah ohah deleted the fix/template-literal-newline-escape branch April 1, 2026 19:22
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