Skip to content

fix: update swc to fix serde 1.0.220+ compatiblity#319

Closed
Foorack wants to merge 2 commits intodenoland:mainfrom
Foorack:upgrade-swc-20250916
Closed

fix: update swc to fix serde 1.0.220+ compatiblity#319
Foorack wants to merge 2 commits intodenoland:mainfrom
Foorack:upgrade-swc-20250916

Conversation

@Foorack
Copy link
Contributor

@Foorack Foorack commented Sep 16, 2025

Fixes serde 1.0.220+ compatibility by updating SWC dependencies (specifically swc_config from =3.1.1 to =3.1.2).

🔰 Additionally I was not able to get the update_swc_deps.ts maintenance script working unless I changed import.meta to import.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!

Copilot AI review requested due to automatic review settings September 16, 2025 18:33
@CLAassistant
Copy link

CLAassistant commented Sep 16, 2025

CLA assistant check
All committers have signed the CLA.

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 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.ts script to use import.meta.url instead of import.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 }
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@dsherret dsherret changed the title chore: bump SWC dependencies and fix update_swc_deps.ts script fix: update swc to fix serde 1.0.220+ compatiblity Sep 17, 2025
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

See comment.

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"
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@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.

@Foorack Foorack closed this Sep 17, 2025
@Foorack
Copy link
Contributor Author

Foorack commented Sep 17, 2025

@dsherret Split it into:

Fix update_swc_deps.ts utility script - #320

Fix Serde 220+ compat - #321

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.

4 participants