Avatar for the swc-project user
swc-project
swc
BlogDocsChangelog

Performance History

Latest Results

fix(parser): do not treat TsImportEquals as ESM module syntax Fixes #9694 ## Problem `import x = require('mod')` (TsImportEquals) was incorrectly marking a file as an ECMAScript module, even though this is TypeScript's CommonJS-style import syntax, not an ESM import. With module:nodenext, TypeScript transforms this to a _createRequire call, treating it as a script/CommonJS. ## Solution - Remove enter_import_module_context() call when parsing TsImportEquals - Update has_module_syntax() to return false for TsImportEquals, TsExportAssignment, and TsNamespaceExport (these are all TypeScript- specific constructs, not ESM syntax) - `export import`, `export =`, and `export as namespace` already trigger module context via the export keyword parsing at line 406-409, so those cases still work correctly
dajiaohuang:fix/9694-ts-import-equals-module-detection
3 hours ago
revert(es/minifier): Revert #12384 (#12419) **Description:** Revert #12384 in full. The PR introduced per-site `/*#__PURE__*/` handling for property reads and destructuring patterns, alongside an optimization that drops unused member accesses under `pure_getters`. Both changes are removed. [Austaras's review comment](https://github.com/swc-project/swc/pull/12384#issuecomment-5744534581) questions adding the annotation behavior when esbuild and Terser do not support it; the [follow-up](https://github.com/swc-project/swc/pull/12384#issuecomment-5756752307) argues that SWC should not be its sole implementer. These comments are the reason for this revert. The conflict with follow-up PR #12386 is resolved by keeping its safety fix: a PURE annotation on an initializer does not make destructuring safe to remove. The four Terser fixtures enabled by #12384 return to the postponed list. A new SWC fixture checks that annotated property reads and patterns remain while existing PURE call handling still works. **BREAKING CHANGE:** The already published per-site PURE behavior for property reads and destructuring patterns is removed. `pure_getters` no longer drops unused member accesses in statement position. The changeset lists `swc_ecma_minifier` and `swc_core` as major. **Related issue (if exists):** #12384 **Testing:** - `cargo test -p swc_ecma_minifier` - `(cd crates/swc_ecma_minifier && ./scripts/exec.sh)` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings`
main
4 hours ago
chore: Add changeset
kdy1/revert-pr-12384
5 hours ago
fix(native): pass tar archives through stdin file handles
codex/fix-native-release-ci
5 hours ago
check strict mode
Austaras:main
5 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
fix(parser): do not treat TsImportEquals as ESM module syntax#12421
3 hours ago
e9da4c3
dajiaohuang:fix/9694-ts-import-equals-module-detection
CodSpeed Performance Gauge
-2%
3 hours ago
80bb95c
dajiaohuang:fix/9655-dynamic-musl-path
CodSpeed Performance Gauge
0%
revert(es/minifier): Revert #12384#12419
5 hours ago
30bcd16
kdy1/revert-pr-12384
© 2026 CodSpeed Technology
Home Terms Privacy Docs