Skip to content

chore: bump swc_core from 58 to 59#13434

Merged
hardfist merged 5 commits intomainfrom
03-23-chore/bump-swc-20
Mar 23, 2026
Merged

chore: bump swc_core from 58 to 59#13434
hardfist merged 5 commits intomainfrom
03-23-chore/bump-swc-20

Conversation

@CPunisher
Copy link
Contributor

@CPunisher CPunisher commented Mar 23, 2026

Summary

Pre-allocate token vectors with Capturing::with_capacity(lexer, source_len + 1) to improve the performance.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings March 23, 2026 03:53
Copy link
Contributor

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

Updates the SWC toolchain and adjusts token capturing to pre-allocate token storage based on source length for improved parsing performance.

Changes:

  • Bump swc_core (and related SWC crates) to newer major/minor versions.
  • Change parsing APIs to pass an optional source-length hint for token capturing (Option<usize>), enabling Capturing::with_capacity(...).
  • Update generated workspace metadata to reflect the new swc_core version.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

File Description
crates/rspack_workspace/src/generated.rs Updates the recorded swc_core version string used by the workspace.
crates/rspack_plugin_javascript/src/parser_and_generator/mod.rs Passes a source-length hint to the parser to pre-allocate token storage.
crates/rspack_javascript_compiler/src/compiler/parse.rs Changes token-capture flag to an optional length hint and uses Capturing::with_capacity.
Cargo.toml Bumps swc_core and multiple related SWC dependencies.

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 23, 2026

Rsdoctor Bundle Diff Analysis

⚠️ Note: The latest commit (33cc780124) does not have baseline artifacts. Using commit b873498060 for baseline comparison instead. If this seems incorrect, please wait a few minutes and try rerunning the workflow.

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 826.2 KB 0
rome 984.2 KB 0
react-5k 2.7 MB 0
ui-components 2.3 MB 0

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Mar 23, 2026

📦 Binary Size-limit

Comparing 804b4d6 to fix(esm-lib): use package name for node_modules short name in dynamic imports (#13406) by Fy

❌ Size increased by 170.63KB from 48.79MB to 48.96MB (⬆️0.34%)

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Mar 23, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 23, 2026

Merging this PR will not alter performance

✅ 23 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing 03-23-chore/bump-swc-20 (804b4d6) with main (b873498)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@CPunisher CPunisher marked this pull request as draft March 23, 2026 05:15
@CPunisher CPunisher marked this pull request as ready for review March 23, 2026 06:10
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 804b4d6597

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@CPunisher CPunisher enabled auto-merge (squash) March 23, 2026 06:14
@hardfist hardfist disabled auto-merge March 23, 2026 06:20
@hardfist hardfist merged commit a3fd0ff into main Mar 23, 2026
45 of 47 checks passed
@hardfist hardfist deleted the 03-23-chore/bump-swc-20 branch March 23, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants