swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(visit): panic on invalid AST paths (#12154) **Description:** `swc_visit::wrong_ast_path` used unchecked unreachable behavior behind a safe function, allowing invalid public AST-path states to trigger undefined behavior in optimized builds. This change: - retains the existing safe `wrong_ast_path()` signature for compatibility with published visitor crates; - makes invalid AST paths panic deterministically in debug and release builds; - adds regression coverage for the safe call; - removes the now-unused `new_debug_unreachable` dependency; and - avoids unrelated visitor regeneration, preserving the CSS, HTML, and XML hook APIs. Validation: - `cargo test -p swc_visit` - `cargo test --release -p swc_visit wrong_ast_path_panics` - `cargo clippy -p swc_visit --all-targets -- -D warnings` - `cargo fmt --all` The full workspace Clippy baseline reached the affected visitor crates but could not complete because this hosted runner disables submodule initialization; the absent HTML5Lib fixtures cause the HTML parser fixture macros to report `No test found`. **Related issue (if exists):** Closes #12082 --------- Co-authored-by: Labor0 Bot <279936132+labor0-bot[bot]@users.noreply.github.com>
main
20 minutes ago
chore: Add changeset
mameikagou:fix/object-rest-for-of-var-scope-v2
56 minutes ago
fix(es/parser): Preserve await grammar boundaries
fix/parse-unambiguous-followup
8 hours ago
fix(es/parser): Preserve await grammar boundaries
fix/parse-unambiguous-followup
9 hours ago
fix(es/typescript): Keep mutable ambient enum reads opaque A plain ambient enum is a runtime object that can be reassigned like any other non-const enum, but the ambient-record fallback resolved its members unconditionally: under `tsEnumIsMutable`, an enum member reading one was folded to the declared value while every other read of it stayed a runtime read. Gate the ambient fallback — in member lookup and in the sibling arm — on the const-enum rule the option already applies elsewhere. The primary record is untouched: how concrete enum reads behave under the option predates this PR and is tracked in #12151.
baltasarblanco:fix/11715-ts-enum-const-var-folding
10 hours ago
fix(es/parser): Preserve await grammar boundaries
fix/parse-unambiguous-followup
11 hours ago
fix(es/parser): Preserve await grammar boundaries
fix/parse-unambiguous-followup
13 hours ago
fix(es/parser): Preserve await grammar boundaries
fix/parse-unambiguous-followup
14 hours ago
Latest Branches
CodSpeed Performance Gauge
+2%
fix(es/compat): preserve for-of var binding scope
#12158
1 hour ago
900e9fd
mameikagou:fix/object-rest-for-of-var-scope-v2
CodSpeed Performance Gauge
0%
fix(es/parser): Preserve await grammar boundaries
#12156
1 day ago
c1e50f2
fix/parse-unambiguous-followup
CodSpeed Performance Gauge
+2%
fix(es/typescript): Treat const variable references as enum constants
#12101
10 hours ago
7385335
baltasarblanco:fix/11715-ts-enum-const-var-folding
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs