chore(tinyest-for-wgsl): Remove Acorn support - #2856
Conversation
|
pkg.pr.new packages benchmark commit |
Bundle size comparison (
|
| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |
|---|---|---|---|
| 0 | 325 | 0 | 0 |
import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):
| Test | tsdown |
|---|---|
| tgpu_init.ts | 263.10 kB ( |
| tgpu_initFromDevice.ts | 262.56 kB ( |
| tgpu_resolve.ts | 161.75 kB ( |
| tgpu_resolveWithContext.ts | 161.68 kB ( |
| tgpu_bindGroupLayout.ts | 62.32 kB ( |
| tgpu_mutableAccessor.ts | 57.04 kB ( |
| tgpu_accessor.ts | 57.04 kB ( |
| tgpu_privateVar.ts | 55.73 kB ( |
| tgpu_workgroupVar.ts | 55.73 kB ( |
| tgpu_const.ts | 55.15 kB ( |
| tgpu_lazy.ts | 54.95 kB ( |
| tgpu_fragmentFn.ts | 39.68 kB ( |
| tgpu_fn.ts | 39.62 kB ( |
| tgpu_vertexFn.ts | 39.50 kB ( |
| tgpu_computeFn.ts | 39.20 kB ( |
| tgpu_vertexLayout.ts | 28.33 kB ( |
| tgpu_comptime.ts | 15.93 kB ( |
| tgpu_unroll.ts | 1.75 kB ( |
| tgpu_slot.ts | 1.70 kB ( |
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.86, 1.69, 3.71, 5.51, 6.94, 10.59, 21.44, 20.56]
line [0.86, 1.71, 3.92, 5.77, 6.29, 10.15, 19.67, 21.74]
line [0.85, 1.74, 3.47, 5.62, 7.03, 11.26, 21.61, 22.38]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.31, 0.51, 0.64, 0.78, 0.98, 1.03, 1.29, 1.42]
line [0.31, 0.70, 0.66, 0.72, 0.95, 1.07, 1.19, 1.37]
line [0.33, 0.50, 0.64, 0.76, 1.02, 1.02, 1.20, 1.34]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.70, 1.94, 3.11, 6.02, 10.50, 22.81, 49.24, 99.18]
line [0.80, 1.88, 3.09, 5.96, 10.62, 23.29, 50.26, 98.29]
line [0.71, 1.84, 3.84, 7.12, 11.09, 22.98, 48.05, 97.42]
|
There was a problem hiding this comment.
ℹ️ No critical issues — one test-coverage nit inline. The Acorn removal itself is complete and internally consistent.
Reviewed changes — initial review of commit 40eee14e ("only babel"). Removes Acorn as a supported tinyest-for-wgsl input and consolidates everything onto the Babel AST:
- Dependency changes —
acorndropped entirely;@babel/typespromoted fromdevDependenciestodependencies(the public types now referencebabel.Node, so downstream type resolution needs it as a real dep). Lockfile updated; the remaining lockfile acorn entries are transitive (rolldown, acorn-jsx, micromark, recma) and expected. - Typing collapse —
JsNode = babel.Node | acorn.AnyNoderemoved;transpileFn,transpileNode,extractFunctionParts,tryFindExternalChain, andContext.visitedNodesall narrow tobabel.Node. The acorn-onlyPrivateIdentifierbranch andLiteraltranspiler are gone (Babel emits the concrete literal node types, all still covered). - Test simplification —
dualTest/parseRolluphelpers deleted; every case collapses to a singleparseBabelrun with snapshots unchanged. - Object-literal key handling — new
switchrecognizesIdentifier/StringLiteral/NumericLiteral/BigIntLiteralkeys and throws on computed/other key types. String and numeric keys previously threw on the Babel path (only acorn'sLiteralwas accepted), so this preserves the acorn-era capability and adds a dedicated test; computed identifier keys previously slipped through as literal names and now fail loudly — a strict improvement.
Verified locally: 18/18 package tests, 137/137 unplugin-typegpu tests (the only non-test consumer), clean tsc --noEmit, and repo-wide grep shows no leftover JsNode / acorn / dualTest references.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
6cf635a to
069cfef
Compare

No description provided.