swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(bindings/node): Preserve source context for AST transforms (#11920) **Description:** This fixes the Node `@swc/core` AST handoff path so source maps do not depend on a process-global `Compiler`/`SourceMap` when JavaScript receives a parsed `Program` and later passes it back to `transform` or `print`. The native parser now returns an internal envelope with the parsed `Program` plus the original source context. The public JS wrapper unwraps it back to the normal AST shape and stores the source context as non-enumerable metadata. When the AST is passed back to native code, the wrapper sends the envelope; native code restores the source file in a fresh compiler and rebases AST spans into that new source map. Legacy raw `Program` JSON input still falls back to the old behavior. This also stops parser calls from writing comments into the global compiler comment store, and adds regression coverage for the MUI box-drawing comment case, `print(parse(...))`, and concurrent plugin transforms. Validation: - `git submodule update --init --recursive` - `cargo test -p binding_core_node` - `pnpm --dir packages/core build:dev` - `pnpm --dir packages/core exec rstest __tests__/transform/sourcemap_test.js` - `pnpm --dir packages/core test` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` **BREAKING CHANGE:** None. **Related issue (if exists):** Follow-up to #11919. Root cause for the Next.js MUI sourcemap panic originally observed while investigating #11918.
main
11 hours ago
fix(es/fixer): preserve new tagged template callee parens (#11922) **Description:** Fixes #11921. This preserves the explicit grouping required for `new (foo()`bar`)()` after fixer removes the original `ParenExpr`. When a `NewExpr` callee is a tagged template whose tag is a call expression, fixer now wraps the full tagged template expression so it does not print as `new foo()`bar`()`, which has different binding. Added focused resolver coverage and an end-to-end compiler fixture for the issue. **Related issue:** - Closes #11921 Verification: - `git submodule update --init --recursive` - `cargo test -p swc_ecma_transforms_base` - targeted 11921 resolver fixture - targeted 11921 swc fixture - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` Note: full `cargo test -p swc` and `UPDATE=1 cargo test -p swc` hit an existing unrelated `source_map::issue_622` failure from `sourcemap-validator` under Node.js v24.14.0: `There were no mappings in the file`.
main
11 hours ago
Delete .changeset/fix-node-ast-source-context.md
kdy1/fix-node-ast-source-context-race
12 hours ago
fix(es): preserve nested tagged template new grouping
kdy1/fix-11921-tagged-template-new
12 hours ago
fix(es): handle nested tagged template new callees
kdy1/fix-11921-tagged-template-new
13 hours ago
chore: add changeset for issue 11921 fix
kdy1/fix-11921-tagged-template-new
13 hours ago
chore(react-compiler): avoid preserving nested TS types
feat/react-compiler
21 hours ago
fix(es): preserve new tagged template callee parens
kdy1/fix-11921-tagged-template-new
22 hours ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(bindings/node): Preserve source context for AST transforms
#11920
12 hours ago
87bc074
kdy1/fix-node-ast-source-context-race
CodSpeed Performance Gauge
0%
fix(es/fixer): preserve new tagged template callee parens
#11922
12 hours ago
a2d6f38
kdy1/fix-11921-tagged-template-new
CodSpeed Performance Gauge
0%
feat(ecma/react-compiler): Add React Compiler
#11917
22 hours ago
d3a25d2
feat/react-compiler
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs