chore(tinyest-for-wgsl): remove the deprecated transpileFn and transpileNode - #3038
dchaudhari7177 wants to merge 1 commit into
Conversation
…ileNode Both were the legacy parser's entry points, kept behind a @deprecated tag after transpileAcornFn/transpileBabelFn (and their Node variants) replaced them. Removing them also removes createLegacyTraspilers, whose only job was to merge the acorn and babel object-expression handling for the combined parser, and the 'legacy' kind of createParser. The four object-expression tests that only ran through the legacy parser now run through dualTest, so both parsers are covered and every inline snapshot is unchanged.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Removed the deprecated
transpileFn/transpileNode— dropped fromsrc/index.tsandsrc/parsers.ts, along withcreateLegacyTraspilers(), the'legacy'parser kind, and the lazylegacyParsersingleton. - Simplified
createParser— itskindparameter is now'acorn' | 'babel'; the now-unusedtranspileAcornProperty/transpileBabelObjectPropertyimports were dropped (they remain in use insidetranspilers.ts). - Migrated the legacy tests to
dualTest— the four object-expression cases (identifier/literal keys, computed props, spread rejection, object-method rejection) now run through bothtranspileBabelFnandtranspileAcornFnwith unchanged inline snapshots, so the coverage is strictly wider than before.
I ran the package's unit tests (26 passed) and test:types (clean), and confirmed no in-repo consumer imports the removed names — unplugin-typegpu uses transpileBabelFn, and no legacy/Legacy references remain.
ℹ️ On the missing changeset
The repo has no changeset tooling — there is no .changeset/ directory, and the root pnpm changes script (tgpu-dev-cli changes) only lists changed packages between release and main to help write release notes. Version bumps are done manually at release time per CONTRIBUTING.md, so no changeset file is expected here. The breaking removal is intentional and already tracked by #3002's breaking change label.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Thank you, but it has to wait for typegpu@0.14.0 |

Description
Closes #3002.
transpileFnandtranspileNodewere the legacy parser's entry points, kept behind a@deprecatedtag aftertranspileAcornFn/transpileBabelFn(and theirNodevariants) replaced them. This removes them, and with them:createLegacyTraspilers(), whose only job was to merge the acorn and babel object-expression handling so one parser could take either node kind;'legacy'kind ofcreateParser, and the lazily builtlegacyParserit was for;transpileAcornProperty/transpileBabelObjectPropertyimports inparsers.ts(they are still used by the acorn and babel transpilers themselves, intranspilers.ts).packages/tinyest-for-wgsl/src/index.tsstops re-exporting the two names.The
legacy transpileFndescribe block was the only caller left in the repo. Its four tests are real coverage — object keys of every kind, computed properties, and the spread / object-method rejections — so instead of deleting them they now run throughdualTest, which exercises the acorn and babel parsers. Every inline snapshot is unchanged, i.e. both parsers already produce exactly what the legacy one did for these inputs.Testing
pnpm test:unitalso reports 4 failures intgpu-gen'soutputPathCompiler.test.tsand the docsprobabilityexample. Those reproduce identically onmainwith this branch stashed, so they are not from this change.I did not add a changeset, since
tinyest-for-wgsl's deprecated surface is internal tooling rather than the documentedtypegpuAPI — happy to add one if you'd rather record it.