-
-
Notifications
You must be signed in to change notification settings - Fork 746
chore: bump swc_experimental to fix parsing utf8 in template
#12431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rspack canceled.
|
There was a problem hiding this 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 bumps the swc_experimental packages from version 0.1.1 to 0.3.1 to fix UTF-8 boundary checking issues in the template parsing logic. The newer version adds proper UTF-8 boundary checks in the bump function that were previously missing, preventing potential panics when parsing code with UTF-8 characters.
Key changes:
- Updated three
swc_experimentalpackages to version 0.3.1 - Migrated code to use new API methods introduced in the updated version
- Replaced raw scope ID manipulation with safer conversion methods
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Cargo.toml | Bumped versions of swc_experimental_ecma_ast, swc_experimental_ecma_parser, and swc_experimental_ecma_semantic from 0.1.1 to 0.3.1 |
| Cargo.lock | Updated dependency checksums and consolidated dependencies (packages now use swc_core instead of individual swc packages) |
| crates/rspack_core/src/concatenated_module.rs | Migrated to new API: replaced FromNodeId trait with NodeIdTrait, changed UNRESOLVED_SCOPE_ID constant to unresolved_scope_id() method, updated scope ID to context conversions to use to_ctxt() method, and changed node.kind field access to node.kind() method calls |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Binary Size-limit
🎉 Size decreased by 12.25KB from 48.22MB to 48.20MB (⬇️0.02%) |
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
CodSpeed Performance ReportMerging #12431 will not alter performanceComparing Summary
|
Summary
See: CPunisher/swc-experimental@be7913b
SWC doesn't add utf8 boundary check in
bumpfunction, although it still works in this cases.SWC-experimental add utf8 boundary check, thus panic here.
There are some other changes in this pr due to the breaking of SWC-experimental
Checklist