fix: update swc to fix serde 1.0.220+ compatiblity#319
fix: update swc to fix serde 1.0.220+ compatiblity#319Foorack wants to merge 2 commits intodenoland:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates SWC dependencies to fix serde 1.0.220+ compatibility issues and repairs the maintenance script used for updating these dependencies. The main changes include bumping multiple SWC crates to their latest versions (notably swc_config from 3.1.1 to 3.1.2) and fixing the update_swc_deps.ts script by changing import.meta to import.meta.url.
- Updates 11 SWC dependencies to their latest versions for serde compatibility
- Fixes the
update_swc_deps.tsscript to useimport.meta.urlinstead ofimport.meta - Improves code formatting in the maintenance script
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Cargo.toml | Updates SWC dependency versions to fix serde compatibility |
| scripts/update_swc_deps.ts | Fixes import.meta usage and improves code formatting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| swc_graph_analyzer = { version = "=14.0.1", optional = true } | ||
| swc_macros_common = { version = "=1.0.1", optional = true } | ||
| swc_sourcemap = { version = "9.3.4", optional = true } | ||
| swc_sourcemap = { version = "=9.3.4", optional = true } |
There was a problem hiding this comment.
The swc_sourcemap dependency changed from version 9.3.4 to =9.3.4 (adding the = prefix). This inconsistency suggests it should either maintain the same versioning strategy as other dependencies or there's a specific reason for the exact version requirement that should be documented.
| swc_ecma_transforms_base = { version = "=25.0.0", features = ["inline-helpers"], optional = true } | ||
| swc_ecma_transforms_classes = { version = "=25.0.0", optional = true } | ||
| swc_ecma_transforms_compat = { version = "=27.0.0", optional = true } | ||
| swc_ecma_parser = "=24.0.1" |
There was a problem hiding this comment.
Is it possible to not bump any swc major versions? Maybe we can only bump the patch for swc_common? If so, that would be preferable because swc upgrades are very involved otherwise in order to make sure everything works properly in all the deno repos. Just bumping the patch in swc_common seems low risk though.
There was a problem hiding this comment.
@dsherret I absolutely agree! I didn't touch the swc versions manually, I just ran the script as the comment said. I will break this up into two PR's instead.
Fixes serde 1.0.220+ compatibility by updating SWC dependencies (specifically
swc_configfrom=3.1.1to=3.1.2).🔰 Additionally I was not able to get the
update_swc_deps.tsmaintenance script working unless I changedimport.metatoimport.meta.url. I am not sure if this was just incompetence on my side though. Please let me know if you want me to split this into two separate PR's!