Repository navigation
Minor Changes
-
8956ad4: Drop the
@swc/coreoptional dependency, and theswcast type it existed for.@swc/corewas declared optional soAstServicecould lazily import it forastType: 'swc', and its
node types were referenced from our shipped declarations. Nothing selected that path: all six analyzers
declarestatic requiredAst = 'oxc'and the baseAnalyzerdefaults to'babel', so no caller in the
repo - and no CLI flag - ever asked for an swc AST. The parser, its_getSwcOffset()span compensation
and the'swc'member ofAnalyzerAstare removed with it.Two consequences:
- The traversal (
oxc-traverse.js, and theSwcPath/SwcVisitor/SwcScope/SwcBindingtypes it
is built on) now uses our own structuralAstNodeinstead of@swc/core's node union. Those type
names are unchanged; only the node type they are built on changed. AnalyzerAstno longer accepts'swc': passing it is a type error, andAstService.getAstthrows
astType "swc" not supported.
Weight removed: 13 lock paths (11
@swc/core-<platform>binaries plus@swc/coreand@swc/types);
a freshnpm ciinstalls 5 packages / 106 MB less (48 MB linux-x64-gnu + 59 MB linux-x64-musl, and the
musl build cannot load on a glibc host at all). On top of that an interrupted binary download had left
107 MB of extract debris (node_modules/@swc/.core-linux-x64-*-<id>/) in every install of this package. - The traversal (