swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(deploy): build package ts before Linux GNU binding tests (#11806) **Description:** This fixes the `test-linux-x64-gnu-binding` workflow path so the package under test builds its own TypeScript entrypoint before the Docker test step runs. The failing `Publish minifier@1.15.29-nightly-20260418.1 / Test bindings on Linux-x64-gnu - node@22` job from [run 24609515249](https://github.com/swc-project/swc/actions/runs/24609515249/job/71962047938) failed with: - `Error: Cannot find module '../index.js'` That happened because the job was running `yarn build:ts` from the workspace root, which only builds `packages/core`. For `@swc/minifier`, the test suite loads `packages/minifier/index.js`, so the GNU binding test never generated the entrypoint it needed. This change makes the GNU binding test mirror the package-scoped TypeScript build already used by the other binding jobs by running `yarn build:ts` in `./packages/${{ inputs.package }}`. Validation used: - inspected the failing Actions log and confirmed the missing `../index.js` error - `git submodule update --init --recursive` - `corepack enable && yarn install --mode=skip-build` - `(cd packages/minifier && yarn build:ts)` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `(cd packages/minifier && yarn build:dev && yarn test)`
main
8 hours ago
fix(deploy): build package ts before linux gnu binding tests
kdy1:kdy1/fix-linux-gnu-binding-tests
8 hours ago
fix(deploy): Fix musl binding test workflow (#11804) **Description:** This updates the `test-linux-x64-musl-binding` job in `publish-npm-package.yml` so the musl binding tests only do the work they actually need. It fixes two failure modes seen in the `Publish 1.15.28` workflow: - `node@20` failed during dependency installation because `yarn install` ran unnecessary build scripts and hit a flaky `dprint` postinstall download (`504 Gateway Time-out`) - `node@22` failed during test execution because the workflow built TypeScript from the workspace root, which only generated `packages/core` outputs and left `packages/minifier/index.js` missing The workflow change now: - uses `yarn install --mode=skip-build` in the musl test job to avoid unrelated lifecycle scripts during setup - runs `yarn build:ts` inside `./packages/${{ inputs.package }}` so the package under test gets its own generated JS entrypoint before the docker test step This keeps the fix scoped to the failing musl binding test path without changing the other binding jobs. Validation used: - disposable clone with `yarn config set supportedArchitectures.libc musl` - `yarn install --mode=skip-build` - package-level `yarn build:ts` for `minifier`, `core`, and `html` - `cargo fmt --all` - `git submodule update --init --recursive` - `cargo clippy --all --all-targets -- -D warnings` **BREAKING CHANGE:** None. **Related issue (if exists):** None.
main
8 hours ago
perf(parser): trim ts speculative parse hot path
kdy1:kdy1/ts-speculative-parse-hot-path
8 hours ago
Fix musl binding test workflow
kdy1:kdy1/fix-musl-binding-tests
8 hours ago
fix(es/parser): fix panic on JSX surrogate entities This commit fixes a panic (RuntimeError: unreachable) that occurred when the JSX parser encountered numeric entities representing UTF-16 surrogates (e.g., ��). The previous implementation used `char::from_u32(...).expect(...)`, which panics if the value is a surrogate or exceeds the Unicode range. This is now replaced with a safer `parse_from_code` helper that returns an error instead of panicking. Additionally, the lexer now supports merging consecutive JSX entities that form a UTF-16 surrogate pair into a single Unicode character. This matches the behavior of other JSX parsers and ensures that characters outside the Basic Multilingual Plane are correctly decoded when represented as surrogate pairs. Changes: - Replaced panicking `char::from_u32` with safe numeric entity parsing. - Updated `read_jsx_entity` to return `String` to support multi-code-unit characters. - Implemented merging logic for UTF-16 surrogate pairs across consecutive entities. - Added test cases covering surrogate pairs in both JSX attributes and text. Fixes #11802.
cuyl:jsx-entity
23 hours ago
fix(es/parser): fix panic on JSX surrogate entities This commit fixes a panic (RuntimeError: unreachable) that occurred when the JSX parser encountered numeric entities representing UTF-16 surrogates (e.g., ��). The previous implementation used `char::from_u32(...).expect(...)`, which panics if the value is a surrogate or exceeds the Unicode range. This is now replaced with a safer `parse_from_code` helper that returns an error instead of panicking. Additionally, the lexer now supports merging consecutive JSX entities that form a UTF-16 surrogate pair into a single Unicode character. This matches the behavior of other JSX parsers and ensures that characters outside the Basic Multilingual Plane are correctly decoded when represented as surrogate pairs. Changes: - Replaced panicking `char::from_u32` with safe numeric entity parsing. - Updated `read_jsx_entity` to return `String` to support multi-code-unit characters. - Implemented merging logic for UTF-16 surrogate pairs across consecutive entities. - Added test cases covering surrogate pairs in both JSX attributes and text. Fixes #11802.
cuyl:jsx-entity
1 day ago
fix(es/module): add opt-in symlink-preserving resolver (#11801) **Description:** This adds an opt-in `NodeImportResolver` constructor that preserves symlink paths when rewriting module specifiers. Today, `NodeImportResolver` always canonicalizes resolved real paths before converting them back into relative import specifiers. That behavior is still useful for the Bazel-related fixes around `jsc.paths`, so this PR keeps it as the default. However, it breaks callers that intentionally preserve symlink locations and need rewritten imports to stay relative to the symlink path instead of the canonicalized real path. This PR keeps the existing default constructor unchanged and adds a dedicated preserve-symlinks constructor for callers that need `resolve.symlinks: false`-style behavior. It also adds a regression test that creates a symlinked source file and asserts the opt-in boundary explicitly: the default resolver rewrites to the canonical target path, while the new constructor preserves the symlink path. **Related issue:** Closes #11584
main
1 day ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(deploy): build package ts before Linux GNU binding tests
#11806
8 hours ago
9f3b61b
kdy1:kdy1/fix-linux-gnu-binding-tests
CodSpeed Performance Gauge
-94%
perf(parser): reduce ts speculative parse overhead
#11805
8 hours ago
1129b06
kdy1:kdy1/ts-speculative-parse-hot-path
CodSpeed Performance Gauge
0%
fix(deploy): Fix musl binding test workflow
#11804
8 hours ago
5f28891
kdy1:kdy1/fix-musl-binding-tests
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs