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
Commit fa80627
Browse filesBrowse the repository at this point in the historyBrowse files
chore(sveltekit): replace recast + @babel/parser with acorn
Replaces recast and @babel/parser with acorn and @sveltejs/acorn-typescript
for AST parsing in the auto-instrumentation plugin. Since the code only reads
the AST (never transforms or prints), the full recast pipeline is unnecessary.
Key changes:
- Delete recastTypescriptParser.ts (no longer needed)
- Use acorn Parser.extend(tsPlugin()) for TypeScript parsing
- Use @sveltejs/acorn-typescript (actively maintained) instead of TyrealHu's
abandoned acorn-typescript
- Fix StringLiteral -> Literal node type check (ESTree compliance)
- Fix ast.program -> ast (acorn returns Program directly)
- Use try/catch for parse errors instead of null program check
Removes ~8 transitive dependencies (recast, ast-types, esprima, source-map,
tslib, tiny-invariant, @babel/parser, @babel/types).
Ref: #19447
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments