Skip to content

feat(flow): RN 50/50 전체 통과 — 중첩 함수 타입 + conditional + type guard + infer + keyof + JSX 주석#597

Merged
ohah merged 3 commits into
mainfrom
fix/flow-parser-round3
Apr 1, 2026
Merged

feat(flow): RN 50/50 전체 통과 — 중첩 함수 타입 + conditional + type guard + infer + keyof + JSX 주석#597
ohah merged 3 commits into
mainfrom
fix/flow-parser-round3

Conversation

@ohah
Copy link
Copy Markdown
Owner

@ohah ohah commented Apr 1, 2026

Summary

Flow 파서를 대폭 강화하여 React Native fixtures 50개 파일 전체 통과를 달성합니다.

수정 내용

# 구문 영향
1 중첩 괄호 함수 타입 ((err: Error) => void) +3 파일
2 Conditional type T extends X ? Y : Z +1 파일
3 Type guard value is Type +1 파일
4 infer T (conditional 타입 추론) +1 파일
5 keyof T (타입 연산자) +1 파일
6 interface {} (inline interface 타입) +1 파일
7 JSX element 내 // 주석 스킵 +1 파일
8 flow_in_return_type 범위 조정 shorthand 반환 타입 허용
9 skipBalancedBraces 헬퍼 코드 재사용
10 Speculative 파싱 → lookahead 기반 판별 안정성

flow_in_return_type 범위 조정

  • 이전: tryParseReturnType에서 설정 → 모든 반환 타입에서 shorthand 금지
  • 이후: parseTypedArrowParams에서만 설정 → arrow 반환 타입에서만 금지
  • 메서드 반환 타입 (): number => OutputT는 shorthand 함수 타입으로 정상 파싱

RN 호환성

47/50 → 50/50 (전체 통과)

Test plan

  • zig build test 전체 통과
  • 파서 테스트 11개 추가
  • flow-rn.test.ts 50개 전부 expectPass
  • CI Build & Test
  • CI Integration Tests

🤖 Generated with Claude Code

Flow 파서 미지원 구문 4건 추가:

1. 중첩 괄호 함수 타입: ((err: Error) => void), Function | ((a: T) => void)
   - parseParenOrFunctionType에서 lookahead 기반 판별로 교체
   - speculative 파싱의 rollback 문제 해결

2. Conditional type: T extends X ? Y : Z
   - parseType에서 extends 키워드 감지 후 ? : 분기 파싱

3. Type guard predicate: value is Type
   - tryParseReturnType에서 'is' contextual keyword 처리

4. Speculative 파싱 안정화:
   - is_likely_fn lookahead로 불필요한 speculative 시도 제거
   - 괄호로 시작하는 타입은 직접 parseType으로 처리

RN fixtures: 43/50 → 47/50 (+4개)
테스트 4개 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah added the enhancement New feature or request label Apr 1, 2026
@ohah ohah self-assigned this Apr 1, 2026
@ohah ohah added the enhancement New feature or request label 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 64ms OK 99KB 162ms OK 122KB 126ms MATCH
preact OK 13KB 4ms OK 15KB 7ms OK 13KB 109ms OK 13KB 110ms MATCH
date-fns OK 37KB 146ms OK 47KB 50ms OK 77KB 123ms OK 102KB 149ms MATCH
uuid OK 2.2KB 4ms OK 2.1KB 7ms OK 2.0KB 111ms OK 3.9KB 107ms MATCH
zod OK 102KB 9ms OK 119KB 16ms OK 98KB 114ms OK 147KB 122ms MATCH
axios OK 345KB 20ms FAIL 436KB 35ms OK 399KB 132ms OK 411KB 153ms MATCH
toolkit OK 65KB 10ms OK 51KB 18ms OK 39KB 117ms OK 126KB 121ms MATCH
rxjs OK 325KB 21ms OK 367KB 39ms OK 308KB 146ms OK 325KB 139ms MATCH
immer OK 18KB 5ms OK 22KB 9ms OK 19KB 108ms OK 36KB 108ms MATCH
superjson OK 23KB 6ms OK 26KB 11ms OK 24KB 108ms OK 32KB 109ms MATCH
express OK 782KB 26ms OK 1138KB 58ms OK 908KB 165ms OK 917KB 165ms MATCH
react OK 52KB 5ms OK 64KB 9ms OK 53KB 107ms OK 18KB 104ms MATCH
commander OK 68KB 7ms OK 119KB 11ms OK 100KB 114ms OK 121KB 110ms MATCH
eventemitter3 OK 6.2KB 3ms OK 7.8KB 7ms OK 9.2KB 124ms OK 10KB 105ms MATCH
ms OK 3.1KB 3ms OK 4.3KB 6ms OK 4.0KB 106ms OK 4.9KB 103ms MATCH
dotenv OK 11KB 3ms OK 14KB 7ms OK 12KB 109ms OK 14KB 104ms MATCH
jsonwebtoken OK 115KB 10ms OK 137KB 19ms OK 141KB 116ms OK 159KB 118ms MATCH
bcryptjs OK 32KB 5ms OK 46KB 9ms OK 47KB 107ms OK 60KB 107ms MATCH
clsx OK 0.6KB 2ms OK 0.6KB 6ms OK 0.7KB 110ms OK 1.5KB 105ms MATCH
tiny-invariant OK 0.5KB 2ms OK 0.6KB 6ms OK 0.6KB 108ms OK 1.5KB 104ms MATCH
tanstack-query OK 47KB 6ms OK 57KB 12ms OK 49KB 108ms OK 59KB 114ms MATCH
fast-glob OK 158KB 11ms OK 192KB 23ms OK 181KB 123ms OK 195KB 121ms MATCH
micromatch OK 75KB 7ms OK 93KB 13ms OK 94KB 116ms OK 102KB 111ms MATCH
semver OK 55KB 6ms OK 66KB 12ms OK 52KB 120ms OK 67KB 111ms MATCH
debug OK 19KB 4ms FAIL 25KB 9ms OK 24KB 105ms OK 28KB 110ms MATCH
chalk OK 13KB 4ms OK 15KB 8ms OK 14KB 106ms OK 17KB 106ms MATCH
yaml OK 209KB 12ms OK 261KB 20ms OK 227KB 132ms OK 284KB 119ms MATCH
yargs OK 167KB 11ms OK 185KB 17ms OK 167KB 131ms OK 227KB 124ms MATCH
effect OK 666KB 141ms OK 477KB 209ms OK 367KB 288ms OK 1460KB 284ms MATCH
vue OK 1622KB 71ms OK 2009KB 90ms OK 1606KB 250ms OK 1216KB 177ms MATCH
svelte OK 71KB 12ms OK 4.7KB 17ms OK 3.5KB 112ms OK 196KB 128ms MATCH
solid-js OK 0.3KB 4ms OK 2.4KB 8ms OK 2.2KB 105ms OK 23KB 108ms MATCH
three OK 246KB 62ms OK 296KB 68ms OK 276KB 166ms OK 1280KB 237ms MATCH
graphql OK 55KB 13ms OK 604KB 34ms OK 547KB 152ms OK 100KB 115ms MATCH
supabase OK 311KB 20ms OK 758KB 33ms OK 705KB 144ms OK 779KB 142ms MATCH
mobx OK 135KB 13ms OK 271KB 22ms OK 234KB 130ms OK 190KB 126ms MATCH
jotai OK 21KB 5ms OK 23KB 9ms OK 20KB 114ms OK 26KB 108ms MATCH
mitt OK 0.5KB 3ms OK 0.6KB 6ms OK 0.7KB 110ms OK 1.5KB 103ms MATCH
zustand OK 1.1KB 2ms OK 1.2KB 6ms OK 1.3KB 103ms OK 2.3KB 104ms MATCH
valtio OK 6.8KB 4ms OK 7.5KB 8ms OK 8.3KB 116ms OK 24KB 109ms MATCH
react-dom OK 1105KB 32ms OK 1355KB 41ms OK 1116KB 185ms OK 534KB 123ms MATCH
d3 OK 115KB 43ms OK 100KB 73ms OK 96KB 163ms OK 150KB 182ms MATCH
hono OK 43KB 8ms OK 59KB 13ms OK 52KB 112ms OK 68KB 113ms MATCH
dayjs OK 11KB 3ms OK 14KB 7ms OK 11KB 103ms OK 8.9KB 104ms MATCH
nanoid OK 0.8KB 3ms OK 0.9KB 6ms OK 0.9KB 101ms OK 2.6KB 105ms MATCH
zlib OK 97KB 11ms OK 112KB 15ms OK 102KB 125ms OK 222KB 121ms MATCH
fp-ts OK 8.8KB 6ms OK 70KB 12ms OK 100KB 118ms OK 50KB 113ms MATCH
neverthrow OK 11KB 3ms OK 18KB 8ms OK 13KB 106ms OK 19KB 107ms MATCH
drizzle-orm OK 20KB 31ms OK 30KB 27ms OK 25KB 120ms OK 35KB 120ms MATCH
tslib OK 0.8KB 4ms OK 0.8KB 7ms OK 0.8KB 106ms OK 18KB 106ms MATCH
iconv-lite OK 300KB 7ms OK 543KB 13ms OK 319KB 113ms OK 325KB 112ms MATCH
qs OK 78KB 9ms OK 95KB 21ms OK 81KB 120ms OK 92KB 112ms MATCH
change-case OK 3.1KB 3ms OK 3.2KB 7ms OK 3.3KB 101ms OK 8.0KB 104ms MATCH
path-to-regexp OK 12KB 3ms OK 15KB 7ms OK 8.8KB 103ms OK 16KB 104ms MATCH
mime-types OK 178KB 9ms OK 235KB 13ms OK 198KB 120ms OK 164KB 129ms MATCH
ajv OK 207KB 13ms OK 243KB 20ms OK 208KB 130ms OK 239KB 122ms MATCH
cac OK 17KB 4ms OK 18KB 7ms OK 16KB 112ms OK 19KB 106ms MATCH
defu OK 1.9KB 2ms OK 2.1KB 6ms OK 1.8KB 102ms OK 3.0KB 103ms MATCH
pathe OK 14KB 4ms OK 3.4KB 8ms OK 3.0KB 102ms OK 13KB 110ms MATCH
destr OK 2.0KB 3ms OK 2.1KB 6ms OK 1.8KB 103ms OK 3.1KB 103ms MATCH
hookable OK 5.3KB 3ms OK 5.9KB 6ms OK 5.2KB 104ms OK 9.3KB 106ms MATCH
minimatch OK 46KB 7ms OK 57KB 12ms OK 47KB 116ms OK 90KB 113ms MATCH
cheerio OK 1727KB 52ms OK 2185KB 88ms OK 1747KB 248ms OK 2387KB 208ms MATCH
is-glob OK 4.5KB 3ms OK 6.4KB 7ms OK 4.9KB 109ms OK 6.0KB 102ms MATCH
glob-parent OK 5.8KB 3ms OK 8.4KB 7ms OK 6.3KB 103ms OK 7.9KB 102ms MATCH
escape-string-regexp OK 0.3KB 2ms OK 0.4KB 6ms OK 0.4KB 99ms OK 1.5KB 103ms MATCH
fast-deep-equal OK 1.9KB 2ms OK 2.9KB 6ms OK 2.3KB 104ms OK 3.2KB 101ms MATCH
deepmerge OK 4.4KB 3ms OK 5.5KB 6ms OK 4.5KB 109ms OK 6.0KB 102ms MATCH
color-convert OK 25KB 5ms OK 30KB 8ms OK 27KB 110ms OK 27KB 107ms MATCH
picomatch OK 48KB 5ms OK 58KB 9ms OK 55KB 107ms OK 61KB 108ms MATCH
type-is OK 185KB 9ms OK 244KB 16ms OK 210KB 114ms OK 179KB 130ms MATCH
object-assign OK 2.6KB 3ms OK 3.8KB 6ms OK 2.8KB 101ms OK 4.3KB 102ms MATCH
has-flag OK 0.4KB 2ms OK 0.5KB 5ms OK 1.5KB 104ms OK 1.7KB 107ms MATCH
p-limit OK 2.6KB 3ms OK 3.0KB 7ms OK 2.7KB 108ms OK 5.2KB 104ms MATCH
strip-ansi OK 0.7KB 3ms OK 0.8KB 6ms OK 0.8KB 102ms OK 2.2KB 106ms MATCH
ansi-regex OK 0.4KB 2ms OK 0.5KB 6ms OK 0.4KB 111ms OK 1.8KB 103ms MATCH
wrap-ansi OK 32KB 4ms OK 35KB 10ms OK 34KB 106ms OK 38KB 108ms MATCH
supports-color OK 3.6KB 3ms OK 3.8KB 5ms OK 4.6KB 109ms OK 5.7KB 105ms MATCH
cross-spawn OK 14KB 4ms OK 18KB 10ms OK 15KB 103ms OK 19KB 105ms MATCH
lru-cache OK 21KB 4ms OK 23KB 9ms OK 22KB 105ms OK 18KB 106ms MATCH
signal-exit OK 5.2KB 3ms OK 6.8KB 7ms OK 6.5KB 105ms OK 12KB 105ms MATCH
which OK 7.4KB 3ms OK 9.5KB 7ms OK 7.7KB 109ms OK 8.7KB 103ms MATCH
string-width OK 23KB 4ms OK 25KB 8ms OK 25KB 102ms OK 27KB 106ms MATCH
safe-buffer OK 2.3KB 3ms OK 3.8KB 6ms OK 1.7KB 102ms OK 3.8KB 105ms MATCH
bytes OK 3.0KB 3ms OK 4.3KB 7ms OK 4.3KB 103ms OK 5.5KB 104ms MATCH
depd OK 9.2KB 3ms OK 12KB 7ms OK 11KB 105ms OK 13KB 105ms MATCH
merge-descriptors OK 1.5KB 2ms OK 2.3KB 6ms OK 1.8KB 104ms OK 2.9KB 104ms MATCH
content-type OK 4.0KB 3ms OK 5.3KB 6ms OK 4.2KB 103ms OK 6.0KB 105ms MATCH
cookie OK 7.8KB 3ms OK 9.8KB 6ms OK 5.6KB 103ms OK 13KB 104ms MATCH
on-finished OK 4.8KB 3ms OK 6.9KB 7ms OK 6.6KB 105ms OK 8.3KB 104ms MATCH
statuses OK 4.1KB 3ms OK 5.8KB 6ms OK 5.3KB 103ms OK 6.1KB 104ms MATCH
etag OK 2.4KB 3ms OK 3.7KB 6ms OK 3.3KB 105ms OK 4.6KB 103ms MATCH
vary OK 2.6KB 3ms OK 3.7KB 6ms OK 3.5KB 102ms OK 5.1KB 102ms MATCH
flat OK 1.2KB 3ms OK 1.3KB 6ms OK 1.2KB 107ms OK 4.9KB 104ms MATCH
retry OK 6.8KB 3ms OK 8.6KB 6ms OK 7.0KB 111ms OK 7.3KB 104ms MATCH
camelcase OK 3.5KB 3ms OK 3.7KB 6ms OK 3.5KB 102ms OK 4.5KB 104ms MATCH
decamelize OK 1.2KB 3ms OK 1.3KB 6ms OK 1.3KB 110ms OK 3.0KB 103ms MATCH
memoize-one OK 1.2KB 2ms OK 3.1KB 7ms OK 2.3KB 104ms OK 2.4KB 105ms MATCH
rfdc OK 6.4KB 3ms OK 8.2KB 7ms OK 6.4KB 110ms OK 7.7KB 103ms MATCH
ohash OK 3.6KB 3ms OK 4.1KB 7ms OK 3.9KB 120ms OK 4.6KB 105ms MATCH
nanoevents OK 0.5KB 2ms OK 0.5KB 6ms OK 0.5KB 107ms OK 1.6KB 105ms MATCH
typebox OK 104KB 16ms OK 116KB 29ms OK 123KB 137ms OK 182KB 148ms MATCH
ts-pattern OK 10KB 4ms OK 12KB 8ms OK 11KB 105ms OK 9.6KB 106ms MATCH
valibot OK 5.9KB 12ms OK 6.8KB 17ms OK 8.0KB 121ms OK 193KB 128ms MATCH
ts-results-es OK 19KB 4ms OK 22KB 8ms OK 26KB 115ms OK 34KB 109ms MATCH
remeda OK 2.1KB 11ms OK 2.2KB 19ms OK 2.1KB 119ms OK 3.3KB 118ms MATCH
nanostores OK 4.9KB 4ms OK 5.7KB 8ms OK 5.1KB 103ms OK 8.2KB 107ms MATCH
ky OK 26KB 5ms OK 30KB 10ms OK 30KB 109ms OK 49KB 110ms MATCH
typedi OK 13KB 4ms OK 27KB 8ms OK 28KB 115ms OK 25KB 107ms MATCH
io-ts OK 23KB 8ms OK 104KB 16ms OK 117KB 113ms OK 102KB 118ms MATCH
type-fest OK 0.1KB 2ms OK 0.1KB 5ms OK 0.1KB 103ms OK 0.9KB 101ms MATCH
arktype OK 258KB 19ms OK 297KB 29ms OK 273KB 142ms OK 382KB 153ms MATCH
kysely OK 225KB 23ms OK 371KB 39ms OK 357KB 143ms OK 471KB 167ms MATCH
lodash-es@es5 OK 13KB 23ms OK 18KB 54ms OK 28KB 137ms FAIL - 0ms MATCH
clsx@es5 OK 1.0KB 2ms OK 0.6KB 5ms OK 0.6KB 101ms FAIL - 0ms MATCH
ms@es5 OK 3.5KB 2ms OK 4.5KB 6ms OK 4.0KB 100ms FAIL - 0ms MATCH
deepmerge@es5 OK 4.8KB 2ms OK 5.7KB 6ms OK 4.5KB 101ms FAIL - 0ms MATCH
fast-deep-equal@es5 OK 2.4KB 2ms OK 3.0KB 6ms OK 2.3KB 101ms FAIL - 0ms MATCH
semver@es5 OK 58KB 6ms FAIL - 10ms OK 52KB 111ms FAIL - 0ms MATCH
lodash-es@es2015 OK 13KB 21ms OK 18KB 54ms OK 28KB 135ms FAIL - 0ms MATCH
superjson@es2015 OK 23KB 6ms OK 27KB 11ms OK 24KB 107ms FAIL - 0ms MATCH
flat@es2017 OK 1.2KB 3ms OK 1.3KB 6ms OK 1.2KB 107ms FAIL - 0ms MATCH
defu@es2017 OK 1.9KB 2ms OK 2.1KB 6ms OK 1.8KB 107ms FAIL - 0ms MATCH
picomatch@es2018 OK 48KB 5ms OK 58KB 9ms OK 55KB 109ms FAIL - 0ms MATCH
semver@es2019 OK 55KB 6ms OK 66KB 12ms OK 52KB 110ms FAIL - 0ms MATCH
clsx@es2019 OK 0.5KB 2ms OK 0.6KB 6ms OK 0.6KB 100ms FAIL - 0ms MATCH
nanoid@es2019 OK 0.8KB 3ms OK 1.0KB 6ms OK 0.9KB 111ms FAIL - 0ms MATCH
dayjs@es2020 OK 11KB 3ms OK 14KB 7ms OK 11KB 103ms 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 4ms OK 35KB 9ms OK 22KB 105ms FAIL - 0ms MATCH
nanostores@es2021 OK 1.8KB 3ms OK 2.3KB 8ms OK 1.9KB 105ms FAIL - 0ms MATCH
lodash-es@chrome80 OK 46KB 24ms OK 64KB 56ms OK 99KB 140ms FAIL - 0ms MATCH
clsx@chrome49 OK 1.0KB 2ms OK 0.6KB 5ms OK 0.7KB 108ms FAIL - 0ms MATCH
dayjs@safari14 OK 11KB 3ms OK 14KB 8ms OK 11KB 103ms FAIL - 0ms MATCH
nanoid@node16 OK 0.8KB 3ms OK 0.9KB 6ms OK 0.9KB 102ms FAIL - 0ms DIFF

Size Comparison (ZTS vs esbuild)

Project ZTS esbuild rolldown rspack Ratio Status
svelte 71KB 4.7KB 3.5KB 196KB 15.15x
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 367KB 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@es2017 1.9KB 2.1KB 1.8KB - 0.89x
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 158KB 192KB 181KB 195KB 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
react-dom 1105KB 1355KB 1116KB 534KB 0.82x
micromatch 75KB 93KB 94KB 102KB 0.81x
escape-string-regexp 0.3KB 0.4KB 0.4KB 1.5KB 0.81x
minimatch 46KB 57KB 47KB 90KB 0.81x
vue 1622KB 2009KB 1606KB 1216KB 0.81x
path-to-regexp 12KB 15KB 8.8KB 16KB 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 227KB 284KB 0.80x
cheerio 1727KB 2185KB 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 4.9KB 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
fast-deep-equal 1.9KB 2.9KB 2.3KB 3.2KB 0.68x
drizzle-orm 20KB 30KB 25KB 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 311KB 758KB 705KB 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 09:53 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 4 3 4 1.0x
esbuild 9 6 11 2.3x
Bun 12 8 16 3.0x
oxc (node) 89 78 105 22.3x
SWC 152 131 185 38.0x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 5 5 6 1.0x
Bun 6 6 6 1.2x
esbuild 7 6 9 1.4x
oxc (node) 81 64 93 16.2x
SWC 161 134 225 32.2x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 6 5 6 1.0x
ZTS 10 9 11 1.7x
Bun 10 9 12 1.7x
oxc (node) 72 62 87 12.0x
SWC 154 128 190 25.7x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 3 3 1.0x
esbuild 7 7 8 2.3x
Bun 7 6 7 2.3x
rspack 118 113 123 39.3x
rolldown 161 125 195 53.7x
webpack 397 369 422 132.3x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 4 3 4 1.0x
esbuild 9 8 10 2.3x
Bun 15 7 22 3.8x
rolldown 126 109 141 31.5x
rspack 163 136 178 40.8x
webpack 446 383 528 111.5x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 7 7 7 1.0x
Bun 10 10 10 1.4x
esbuild 13 12 14 1.9x
rolldown 134 112 158 19.1x

ubuntu-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 2 1 2 1.0x
esbuild 2 2 2 1.0x
Bun 2 2 3 1.0x
oxc (node) 29 29 29 14.5x
SWC 118 88 223 59.0x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 2 2 2 1.0x
ZTS 4 4 4 2.0x
Bun 4 4 4 2.0x
oxc (node) 29 29 29 14.5x
SWC 96 94 99 48.0x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 2 2 2 1.0x
Bun 10 10 10 5.0x
ZTS 16 16 16 8.0x
oxc (node) 30 29 31 15.0x
SWC 115 114 116 57.5x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 2 2 2 1.0x
Bun 4 4 4 2.0x
esbuild 6 5 6 3.0x
rspack 111 110 111 55.5x
rolldown 114 105 117 57.0x
webpack 538 520 563 269.0x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 3 3 1.0x
Bun 5 5 5 1.7x
esbuild 7 7 8 2.3x
rolldown 111 107 116 37.0x
rspack 118 116 121 39.3x
webpack 527 522 531 175.7x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 8 8 9 1.0x
Bun 9 9 9 1.1x
esbuild 16 14 18 2.0x
rolldown 122 114 127 15.3x

windows-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 10 9 12 1.0x
Bun 17 17 18 1.7x
oxc (node) 63 59 68 6.3x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 11 11 12 1.0x
Bun 17 16 17 1.5x
oxc (node) 65 63 67 5.9x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
Bun 16 15 17 1.0x
ZTS 21 21 21 1.3x
oxc (node) 64 60 68 4.0x

bundle — small (10 modules)

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

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 18 17 19 1.0x
Bun 36 34 38 2.0x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 34 33 35 1.0x
Bun 46 44 48 1.4x

Auto-generated by CI on 2026-04-01 09:55 UTC

추가 수정 7건:

1. JSX element 내 // 주석 스킵 (nextInsideJSXElement에서 line/block comment 처리)
2. infer T — conditional type 타입 추론 변수
3. keyof T — 타입 연산자
4. interface {} — inline interface 타입 (balanced brace skip)
5. flow_in_return_type → arrow 파라미터 반환 타입에서만 적용
   - 메서드 반환 타입에서 shorthand 함수 타입 허용: (): number => OutputT
   - arrow 반환 타입에서 shorthand 금지: (x): any => {} (arrow body)
6. skipBalancedBraces 헬퍼 추가
7. 중첩 괄호 함수 타입 + speculative 파싱 안정화

RN fixtures: 47/50 → 50/50 (전체 통과)
테스트 7개 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah changed the title feat(flow): 중첩 괄호 함수 타입 + conditional type + type guard feat(flow): RN 50/50 전체 통과 — 중첩 함수 타입 + conditional + type guard + infer + keyof + JSX 주석 Apr 1, 2026
…wline

- parser.zig: flow_in_return_type 복원에 defer 사용 (에러 경로 플래그 누수 수정)
- flow.zig: skipBalancedParens/skipBalancedBraces → skipBalanced(open, close) 통합
- scanner.zig: JSX line comment 뒤 has_newline_before 설정

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah merged commit b76ff75 into main Apr 1, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant