You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(pack): align SWC helpers for named RegExp groups - #3433
Production builds targeting older browsers can fail with Can't resolve '@swc/helpers/_/_wrap_reg_exp' when SWC lowers named RegExp capture groups. Pack still pins helpers to 0.5.15, which does not export the helper emitted by its compiler.
Pin @swc/helpers to 0.5.23 and add a real production-build regression covering named groups, backreferences, and named replacements. The test checks that the helper is emitted and executes the generated bundle.
Test Plan
Reproduced the missing-helper failure with 0.5.15; the new regression passes with 0.5.23, using the published Pack 1.5.35 native binding for both runs.
npm run build:js --workspace @utoo/pack
npm test --workspace @utoo/pack-shared (6 tests passed)
cargo fmt --check, npx tombi format --check, npx biome ci, typos, and git diff --check
Shows when each build phase is active and how much CPU it consumes. Self-Time is the time spent exclusively in that phase (excluding children).
Phase
Spans
Inclusive (ms)
Self-Time (ms)
Wall Range (ms)
Resolve
51,372
9,423.8
2,776.8
4,616.5
Parse
8,184
1,721.3
1,278.4
7,724.8
Analyze
154,181
61,811.4
13,900.0
7,636.7
Chunk
5,422
7,610.3
1,219.1
2,776.5
Codegen
16,074
2,944.4
1,865.8
2,346.2
Emit
29
44.7
22.4
9.8
Other
3,813
7,756.9
4,329.5
8,439.0
Workload Distribution by Diagnostic Tier
Category
Spans
Inclusive (ms)
% Work
Self-Time (ms)
% Self
P0: Scheduling & Resolution
206,401
71,860.9
266.2%
16,919.4
62.7%
P1: I/O & Heavy Tasks
2,889
132.6
0.5%
110.2
0.4%
P2: Architecture (Locks/Memory)
0
0.0
0.0%
0.0
0.0%
P3: Asset Pipeline
28,287
12,306.0
45.6%
4,369.0
16.2%
P4: Bridge/Interop
0
0.0
0.0%
0.0
0.0%
Other
1,498
7,013.5
26.0%
3,993.3
14.8%
Top 20 Tasks by Self-Time
Self-time is the exclusive duration: time spent in the task itself, not in sub-tasks.
This is the most accurate indicator of where CPU cycles are actually spent.
Self (ms)
Inclusive (ms)
Count
Avg Self (us)
P95 Self (ms)
Max Self (ms)
% Work
Task Name
Top Caller
7,306.3
38,320.9
104,992
69.6
0.1
16.2
27.1%
module
module (64%)
3,060.0
3,253.3
2,604
1175.1
4.2
336.1
11.3%
analyze ecmascript module
module (67%)
2,654.6
2,811.8
17
156154.0
374.2
514.9
9.8%
save snapshot
persist (6%)
2,264.8
18,611.2
36,504
62.0
0.1
8.8
8.4%
process module
process module (82%)
1,757.9
4,425.6
28,048
62.7
0.1
6.1
6.5%
internal resolving
internal resolving (77%)
1,207.2
1,650.1
6,014
200.7
0.8
46.2
4.5%
parse ecmascript
parse ecmascript (65%)
1,115.0
1,233.9
13,732
81.2
0.4
9.8
4.1%
precompute code generation
generate merged code (39%)
1,105.7
1,291.1
7,416
149.1
0.7
122.2
4.1%
compute async module info
compute async module info (57%)
1,071.3
7,339.9
4,085
262.3
0.6
109.3
4.0%
chunking
chunking (52%)
1,002.3
4,981.6
22,634
44.3
0.0
6.0
3.7%
resolving
module (56%)
771.6
2,488.0
1,237
623.7
1.4
206.1
2.9%
generate merged code
chunking (35%)
482.8
482.8
329
1467.5
1.5
283.1
1.8%
generate source map
code generation (83%)
386.0
854.9
134
2880.4
5.0
216.0
1.4%
emit code
emit code (43%)
313.6
670.0
1,828
171.5
0.1
160.4
1.2%
write all entrypoints to disk
write all entrypoints to disk (17%)
268.0
1,227.7
2,013
133.1
0.3
56.2
1.0%
code generation
code generation (83%)
157.3
157.3
5
31453.3
121.4
150.3
0.6%
blocking
save snapshot (80%)
143.3
265.3
1,278
112.1
0.1
13.5
0.5%
compute async chunks
compute async chunks (39%)
76.9
101.2
777
99.0
0.1
35.4
0.3%
compute binding usage info
compute binding usage info (51%)
72.8
124.2
1,871
38.9
0.0
26.5
0.3%
collect mergeable modules
collect mergeable modules (100%)
71.1
71.1
2,168
32.8
0.0
3.1
0.3%
read file
parse ecmascript (91%)
Critical Path Analysis
The longest sequential dependency chains that determine wall-clock time.
Focus on reducing the depth of these chains to improve parallelism.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Production builds targeting older browsers can fail with
Can't resolve '@swc/helpers/_/_wrap_reg_exp'when SWC lowers named RegExp capture groups. Pack still pins helpers to0.5.15, which does not export the helper emitted by its compiler.Pin
@swc/helpersto0.5.23and add a real production-build regression covering named groups, backreferences, and named replacements. The test checks that the helper is emitted and executes the generated bundle.Test Plan
0.5.15; the new regression passes with0.5.23, using the published Pack1.5.35native binding for both runs.npm run build:js --workspace @utoo/packnpm test --workspace @utoo/pack-shared(6 tests passed)cargo fmt --check,npx tombi format --check,npx biome ci,typos, andgit diff --check