swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Lazily compute source file hashes
hardfist:codex/remove-source-file-hashes
9 minutes ago
fix(es/resolver): Isolate non-exported nested namespaces across re-opens Address Codex P1 on #11872: the cache key for `TsModuleDecl` previously used `self.namespace_export.mark` whenever it was present, so a nested namespace declared inside an outer namespace body was always keyed to the outer's stable export mark. That made the two `Inner` declarations in namespace Outer { namespace Inner { export const a = 1 } } namespace Outer { namespace Inner { export const b = a } } collide on a single cache entry and merge, even though TypeScript keeps non-exported members local to each declaration body. The cache-parent mark now falls back to `self.current.mark` (the outer re-open's per-body mark) unless the nested namespace name is in the enclosing body's pre-scanned `namespace_export_names`. Two outer re-opens hold distinct body marks, so their non-exported `Inner` children land in disjoint cache entries and stay isolated; exported nested namespaces still key on the outer's stable export mark and merge across re-opens. Added tests/ts-resolver/namespace_reopen_nested_private exercising the Codex case (second `Inner`'s reference to `a` is unresolved, confirming isolation). nested namespaces still key on the outer's stable export mark and merge across re-opens. Added tests/ts-resolver/namespace_reopen_nested_private exercising the Codex case (second `Inner`'s reference to `a` is unresolved, confirming isolation). Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
MavenRain:fix/resolver-namespace-merge
6 hours ago
fix(es/resolver): Isolate non-exported nested namespaces across re-opens Address Codex P1 on #11872: the cache key for `TsModuleDecl` previously used `self.namespace_export.mark` whenever it was present, so a nested namespace declared inside an outer namespace body was always keyed to the outer's stable export mark. That made the two `Inner` declarations in namespace Outer { namespace Inner { export const a = 1 } } namespace Outer { namespace Inner { export const b = a } } collide on a single cache entry and merge, even though TypeScript keeps non-exported members local to each declaration body. The cache-parent mark now falls back to `self.current.mark` (the outer re-open's per-body mark) unless the nested namespace name is in the enclosing body's pre-scanned `namespace_export_names`. Two outer re-opens hold distinct body marks, so their non-exported `Inner` children land in disjoint cache entries and stay isolated; exported nested namespaces still key on the outer's stable export mark and merge across re-opens. Added tests/ts-resolver/namespace_reopen_nested_private exercising the Codex case (second `Inner`'s reference to `a` is unresolved, confirming isolation). nested namespaces still key on the outer's stable export mark and merge across re-opens. Added tests/ts-resolver/namespace_reopen_nested_private exercising the Codex case (second `Inner`'s reference to `a` is unresolved, confirming isolation). Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
MavenRain:fix/resolver-namespace-merge
6 hours ago
Revert "fix(es/minifier): respect ecma for iife temp vars (#11873)" (#11878) This reverts commit e481934a63c0ee891e4a770c4f0cd5ec3fd8624e. #11873 may break https://github.com/swc-project/swc/issues/8246 again
main
10 hours ago
chore: add changeset for minifier revert
hardfist:revert-11873-fix/minifier-ecma5-iife-temp-var
10 hours ago
Fix invalid object rest assignment validation
hardfist:codex/remove-source-file-hashes
11 hours ago
Remove unused source file hashes
hardfist:codex/remove-source-file-hashes
11 hours ago
fix(es/resolver): Restrict TS namespace merge to exported bindings Address review feedback from @magic-akari / Codex on #11872: only `export …` declarations should be shared across sibling re-opens of a TypeScript namespace, not every declaration. Each re-open now gets a fresh per-body scope for its private bindings; only exported names live in the cache-backed `NamespaceExportScope`, which the body scope exposes via a `shared` link so reference lookups still see sibling-declared exports with a stable `SyntaxContext`. A per-body pre-scan of `export` declarations drives the routing in `modify`, making the decision order-independent: TypeScript's var/function same-body merge still holds (`export var a = 1; for (var a; …)`) while a non-exported re-open of a sibling-exported name stays isolated — fixing the `namespace_004` `MyEnum.A` `1`→`2` regression Codex flagged. Added tests/ts-resolver/namespace_reopen_private covering @magic-akari's example; updated fixture snapshots accordingly (re-opened non-exported classes / enums no longer trigger the "defined multiple times" diagnostic). Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
MavenRain:fix/resolver-namespace-merge
13 hours ago
Latest Branches
CodSpeed Performance Gauge
+5%
fix(es/resolver): Merge re-opened TypeScript namespace scopes
#11872
6 hours ago
450fd85
MavenRain:fix/resolver-namespace-merge
CodSpeed Performance Gauge
0%
Revert "fix(es/minifier): respect ecma for iife temp vars (#11873)"
#11878
10 hours ago
4408e2e
hardfist:revert-11873-fix/minifier-ecma5-iife-temp-var
CodSpeed Performance Gauge
+4%
perf: Lazily compute source file hashes
#11879
11 hours ago
0412019
hardfist:codex/remove-source-file-hashes
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs