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

Performance History

Latest Results

fix(es/codegen): Escape inline script markers in regex literals (#12614) <!-- Note: CI script will automatically rebase your PR so please do not rebase unless required --> <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Description:** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> With `inline_script` enabled, regex literals can emit HTML-sensitive markers. Minification can also combine `<` or `<<` with a regex to form `</script>`, which closes an inline script element. Escape closing script tags and HTML comment markers within regex patterns. Keep a space before a leading regex whose pattern starts with `script` after `<` or `<<`. Preserve existing escapes and leave regex output unchanged when `inline_script` is disabled. Add fixtures for readable and minified output, ASCII-only output, case-insensitive closing tags, character classes, existing escapes, and token boundaries. The fixtures check for HTML-sensitive markers and compare execution results in Node.js. Validation passed on `88040e10f64fd180e69d3508297443adf89fd7d1`: - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test -p swc_ecma_codegen` (4,218 passed, 2 ignored) The new enabled fixtures failed before the fix. CI and review have not been verified. **Related issue (if exists):** Closes #12592
main
9 hours ago
chore: Add changeset
kdy1/babel-compatible-fix-12576
10 hours ago
fix(deps): update npm (#12461) **Description:** Update compatible npm tooling and development dependencies. Keep pnpm 10, Babel 7, TypeScript 5, Expect 27, legacy ESLint configuration support, and the existing ecosystem runner APIs until their migrations can be tested separately. - Regenerate the workspace and minifier lockfiles with pnpm 10.33.3. pnpm 12 could not start through Corepack in CI. - Keep the polyfill data generator on its supported Babel package layout. Babel 8 also caused declaration conflicts in the Node package build. - Preserve minifier fixture inputs by excluding their directory from Prettier. - Migrate Husky initialization and the commit hook to Husky 9 and pnpm. - Enable WebAssembly imports in the Webpack 5 example. - Add the ecosystem runner's missing semver type dependency and use TypeScript 5 for the bot. - Update the workspace lockfile to Tokio 1.53.3 to resolve RUSTSEC-2026-0386. Keep the Tokio 1.x manifest requirement compatible with independently locked consumer fixtures. - Keep Expect 27 for the existing CommonJS and ESM execution fixture harness. **BREAKING CHANGE:** None. The runtime dependency update stays on the Tokio 1.x release line. **Related issue (if exists):** None. **Validation:** - Crate tests after merging main: dbg-swc, jsdoc, swc-ast-explorer, swc_cli_impl, swc_ecma_loader, and swc_native_addon. Native cache tests used a canonical TMPDIR on macOS to avoid the /var symlink. - `cargo test -p swc_core --features ecma_quote --features common --features ecma_utils` (9 passed, including NAPI and Wasm consumer builds) - Release changeset parser tests - Transform suites: ES2015 library (33 passed), decorators with all features (116 passed), ES2015 block scoping (56 passed), and TypeScript proposal decorators (3 passed) - `pnpm install --frozen-lockfile` - `cargo deny check` - `cargo test -p swc` with CI's Node 20: execution fixtures passed; `source_map::issue_622` fails with an empty mappings assertion. The same failure reproduces with the PR's original Cargo manifest and lockfile. - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test -p swc_ecma_minifier` (8,057 passed) - Node binding build and tests (119 passed, 3 skipped) - Bot and ecosystem runner type checks - Native release contract tests (23 passed, 1 skipped) - Core Wasm tests (11 passed) and the Webpack 5 example bundle All four required Wasm package test scripts passed locally (core, minifier, TypeScript, and AST viewer). Tool versions that require Node 22 are limited to their Node 20-compatible major versions: lint-staged 16, cspell 9, npm-run-all2 8, and webpack-dev-server 5. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: DongYun Kang <kdy.1997.dev@gmail.com>
main
13 hours ago
fix(node): Restrict cache DELETE exemption to filesystem roots (#12610) <!-- Note: CI script will automatically rebase your PR so please do not rebase unless required --> <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Description:** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> Addresses the review finding in #12609, which is already merged. A parentless drive path can name an ordinary directory through SUBST. Treating that path as a volume root incorrectly exempts untrusted DELETE grants from native cache validation. Inspect the opened directory with GetFinalPathNameByHandleW and VOLUME_NAME_NONE. Apply the DELETE exemption only when its volume-relative path is the root separator. Keep DELETE protection for directory-backed drive aliases, and retain the other owner, DACL, and reparse-point checks. Ordinary non-root ancestors need no additional handle query. Query failures reject the cache candidate. Add fixtures that create a real directory-backed DOS drive mapping and test both normal and verbatim drive paths. Check that a real volume root accepts a synthetic DELETE grant while mapped directories reject it. These tests do not change the host volume's ACL. Document the security boundary and add the required swc_core patch changeset; swc_native_addon itself is private. **Validation:** Validation covers the Rust source in commit 90277902c6. The subsequent commit adds only the changeset. - Confirmed that the SUBST regression fixture fails with the previous lexical-root classification and passes with the handle-based classification. - One complete Windows run of cargo test -p swc_native_addon passed: 33 tests passed and five existing filesystem-specific tests were ignored. After restoring the same source from the regression experiment, the unit tests passed again, but Windows application control blocked the cache integration executable on the final full rerun (OS error 4551). - cargo fmt -p swc_native_addon and its check mode passed. cargo fmt --all could not launch rustfmt because the Windows command line exceeded its length limit (OS error 206). - cargo clippy --all --all-targets -- -D warnings was blocked by Windows application control when launching the schemars v0.8.21 build script (OS error 4551). - Strict crate-level Clippy reports the existing clippy::needless_return in src/cache.rs:151. The same crate-level check passed with only that lint allowed. Existing MSRV configuration warnings remain. - git diff --check passed. - Node integration validation could not start because pnpm is not installed on PATH. CI and external review are pending. **BREAKING CHANGE:** <!-- If this PR introduces a breaking change, it must contain a notice for it to be included in the CHANGELOG. Add description or remove entirely if not breaking. You may need to update `MIGRATION.md` for the breaking changes. --> None. **Related issue (if exists):** Refs #12563
main
14 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
fix(es/helpers): Convert Map and Set values to arrays#12616
10 hours ago
1c360fd
kdy1/babel-compatible-fix-12576
CodSpeed Performance Gauge
0%
fix(es/hygiene): preserve scoped function expression names#12615
10 hours ago
c2cf5ac
kdy1/fix-issue-12528
CodSpeed Performance Gauge
0%
10 hours ago
88040e1
kdy1/fix-issue-12592
© 2026 CodSpeed Technology
Home Terms Privacy Docs