Skip to content

Update swc_core to 50.0.0#53

Merged
Thisen merged 3 commits intopmndrs:mainfrom
CPunisher:12-05-chore/bump-swc
Dec 5, 2025
Merged

Update swc_core to 50.0.0#53
Thisen merged 3 commits intopmndrs:mainfrom
CPunisher:12-05-chore/bump-swc

Conversation

@CPunisher
Copy link
Contributor

@CPunisher CPunisher commented Dec 5, 2025

I also improve the compatibility according to https://swc.rs/docs/plugin/ecmascript/compatibility

@dai-shi
Copy link
Member

dai-shi commented Dec 5, 2025

@vhfmag Would you like to review this?

Copy link

@vhfmag vhfmag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dai-shi
Copy link
Member

dai-shi commented Dec 5, 2025

Thanks. Would anyone else like to review?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates swc_core from version 32.0.0 to 50.0.0 and adapts the codebase to maintain compatibility with the new API changes according to SWC's plugin compatibility guidelines.

Key changes:

  • Updated swc_core to version 50.0.0 and testing library to 19.0.0
  • Adapted string handling APIs to use to_string_lossy() and handle Option<&str> returns from as_str()
  • Added forward compatibility patterns with #[cfg(swc_ast_unknown)] for unknown AST node variants
  • Configured rustflags for wasm32 targets to enable the swc_ast_unknown cfg flag

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Cargo.toml Updated swc_core to 50.0.0 and testing to 19.0.0 as workspace dependencies
.cargo/config.toml Added rustflags configuration to enable swc_ast_unknown cfg for wasm32 targets
crates/react_refresh/Cargo.toml Converted testing dependency to use workspace version and added lint configuration for unexpected_cfgs
crates/react_refresh/src/lib.rs Adapted to new string APIs (to_string_lossy, as_str returning Option), added cfg-guarded catch-all patterns
crates/debug_label/Cargo.toml Converted testing dependency to use workspace version
crates/debug_label/src/lib.rs Updated Str value assignment to use .into() for type conversion
crates/common/src/atom_import_map.rs Updated namespace import handling to use to_atom_lossy().into_owned()
Cargo.lock Updated all transitive dependencies to match the new swc_core and testing versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dai-shi
Copy link
Member

dai-shi commented Dec 5, 2025

Let's see if @Thisen responds in a couple of days. Otherwise, I'll ask @vhfmag something.

@Thisen Thisen merged commit 3483972 into pmndrs:main Dec 5, 2025
10 checks passed
@dai-shi
Copy link
Member

dai-shi commented Dec 5, 2025

@Thisen Thanks. Could you make a release? I made a slight change in CD, which hasn't tested, and this will be the first time.

@dai-shi
Copy link
Member

dai-shi commented Dec 9, 2025

@vhfmag Could you open a new PR for the release? I think all you need is to update the version numbers. (and I will then merge and tag.)

@chase chase mentioned this pull request Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants