build: Update swc_core to v76.0.0 - #649
Conversation
Releases: @swc/plugin-react-remove-properties@12.19.0 @swc/plugin-styled-components@12.19.0 @swc/plugin-transform-imports@12.19.0 @swc/plugin-swc-confidential@11.19.0 @swc-contrib/mut-cjs-exports@14.19.0 @swc/plugin-remove-console@12.19.0 @swc/plugin-experimental-feature-flags@0.18.0 @swc/plugin-styled-jsx@13.19.0 @swc/plugin-swc-magic@12.19.0 @swc/plugin-formatjs@9.19.0 @swc/plugin-prefresh@12.19.0 @swc/plugin-emotion@14.19.0 @swc/plugin-swc-sdk@12.19.0 @swc/plugin-relay@12.19.0 @swc-contrib/plugin-graphql-codegen-client-preset@0.31.0 @swc/plugin-jest@12.19.0 @swc/plugin-loadable-components@11.19.0 @swc/plugin-noop@12.19.0 [skip ci]
|
Review:
|
| Check | Result |
|---|---|
cargo check --workspace --all-targets |
✅ clean, no new warnings |
cargo metadata --locked |
✅ Cargo.lock in sync with the manifests |
Path-dep version fields vs. actual crate versions (14 of them) |
✅ all match |
Duplicate swc_* versions in Cargo.lock |
✅ none (single swc_common 25, swc_ecma_ast 28, swc_atoms 10, …) |
| npm package/CHANGELOG bumps | ✅ all 16 packages/* + 2 contrib/* bumped consistently |
packages/emotion wasm integration test (real @swc/core load) |
✅ 8/8 passing |
Notably swc_ecma_ast 27→28 and swc_plugin_macro 1.1.1→2.0.0 landed with zero source changes required — worth calling out since the previous bump (#647) needed a fix in packages/emotion/transform/src/lib.rs. The --cfg swc_ast_unknown build flag is doing its job here.
The Cargo.lock diff is also reassuringly boring: transitive version updates only, one crate dropped (minimal-lexical, via the nom update), zero crates added. Nothing to flag from a supply-chain angle, and Socket Security agrees.
Notes (all non-blocking)
1. @swc/core devDependency lags the plugin ABI
package.json pins "@swc/core": "^1.15.43" (published 2026-06-22), while swc_core 76.0.0 was published today. Since CI runs pnpm i with CI=1 (frozen lockfile), the integration tests exercise plugins built on swc_core 76 against a host built on roughly swc_core 71/72.
That's not broken — I confirmed locally that the emotion wasm plugin loads and transforms correctly under 1.15.43 — but it does mean the "newest host" path is untested. @swc/core 1.15.47 (2026-07-29) is available; bumping the devDependency would test against a host closer to the plugin's own core version. Worth doing in a follow-up rather than here.
2. Changesets say "Minor" for what is a major Rust bump
Every changeset is ### Minor Changes, so consumers get e.g. @swc/plugin-emotion 14.18.0 → 14.19.0. This matches the repo's established convention (#647 did the same), so no change requested — but for a bump that crosses a breaking swc_ecma_ast boundary, a sentence in the changeset naming the minimum compatible @swc/core would save users a confusing plugin-load error after an innocuous-looking minor upgrade.
3. Stale contrib/graphql-codegen-client-preset/Cargo.lock (pre-existing)
That crate is a root-workspace member (members = [..., "contrib/*"]) and uses swc_core = { workspace = true }, so its local Cargo.lock is never consulted — yet it still pins swc_core = "0.75.33". Harmless today, but "0.75.x" sitting next to a 75→76 bump is exactly the kind of thing that costs someone ten minutes later. Suggest deleting it in a cleanup PR.
Not introduced here
crates/swc_feature_flags/src/stats.rs:114 and :164 emit unreachable pattern warnings for the _ => arms on Lit and Callee. I checked out main and reproduced both against swc_core 75, so this predates the PR — mentioning only so it isn't mistaken for fallout from the AST bump.
Test coverage
No new tests warranted for a version bump; the existing per-package wasm integration suites are the right gate and they cover the risk. All CI checks green at time of review (Integration Test ubuntu + macOS, cargo test, and the swc_ast_unknown check).
LGTM — ship it. 🚀
No description provided.