chore(tinyest-for-wgsl): Remove Acorn support - #2856
Conversation
|
pkg.pr.new packages benchmark commit |
Bundle size comparison (
|
| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |
|---|---|---|---|
| 0 | 324 | 0 | 0 |
import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):
| Test | tsdown |
|---|---|
| tgpu_init.ts | 274.56 kB ( |
| tgpu_initFromDevice.ts | 274.01 kB ( |
| tgpu_resolve.ts | 174.85 kB ( |
| tgpu_resolveWithContext.ts | 174.78 kB ( |
| tgpu_bindGroupLayout.ts | 74.47 kB ( |
| tgpu_mutableAccessor.ts | 69.19 kB ( |
| tgpu_accessor.ts | 69.19 kB ( |
| tgpu_privateVar.ts | 67.88 kB ( |
| tgpu_workgroupVar.ts | 67.88 kB ( |
| tgpu_const.ts | 67.30 kB ( |
| tgpu_lazy.ts | 67.10 kB ( |
| tgpu_fragmentFn.ts | 39.65 kB ( |
| tgpu_fn.ts | 39.60 kB ( |
| tgpu_vertexFn.ts | 39.47 kB ( |
| tgpu_computeFn.ts | 39.17 kB ( |
| tgpu_vertexLayout.ts | 28.30 kB ( |
| tgpu_comptime.ts | 15.91 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.65, 1.28, 3.03, 4.23, 5.07, 9.24, 17.17, 18.01]
line [0.75, 1.42, 2.84, 4.70, 4.90, 9.16, 17.21, 18.44]
line [0.70, 1.33, 2.98, 4.55, 5.02, 8.63, 16.87, 17.61]
---
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.21, 0.33, 0.45, 0.53, 0.70, 0.80, 0.92, 1.10]
line [0.22, 0.39, 0.55, 0.64, 0.86, 0.87, 1.08, 1.13]
line [0.24, 0.41, 0.53, 0.65, 0.87, 0.89, 1.07, 1.15]
---
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.68, 1.50, 2.64, 4.66, 8.30, 18.26, 39.84, 79.02]
line [0.55, 1.45, 2.45, 5.03, 8.13, 18.79, 39.58, 79.73]
line [0.56, 1.56, 2.67, 4.68, 8.41, 18.60, 38.55, 79.66]
|
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) | 𝕏

No description provided.