Conversation
|
@vhfmag Would you like to review this? |
|
Thanks. Would anyone else like to review? |
There was a problem hiding this comment.
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 handleOption<&str>returns fromas_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_unknowncfg 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.
|
@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. |
|
@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.) |
I also improve the compatibility according to https://swc.rs/docs/plugin/ecmascript/compatibility