Skip to content

Conversation

@JakeLane
Copy link
Contributor

@JakeLane JakeLane commented Nov 14, 2025

Motivation

We need to have a partial migration step for using Compiled SWC in production. This approach uses hashing to detect which files are safe to use.

Changes

  • Bring in a newer version of the SWC plugin
  • Add a transformer pass that checks the hash in a JSON file
  • Add a reporter to generate the JSON file (only to be used to commit to VCS).

Checklist

  • Existing or new tests cover this change
  • There is a changeset for this change, or one is not required
  • Added documentation for any new features to the docs/ folder

@changeset-bot
Copy link

changeset-bot bot commented Nov 14, 2025

🦋 Changeset detected

Latest commit: 6e35775

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 77 packages
Name Type
@atlaspack/reporter-compiled-css-in-js-migration-map Patch
@atlaspack/transformer-compiled-css-in-js Patch
@atlaspack/compiled-css-in-js-example Patch
@atlaspack/rust Patch
@atlaspack/bundler-experimental Patch
@atlaspack/bundler-default Patch
atlaspack Patch
@atlaspack/cache Patch
@atlaspack/core Patch
@atlaspack/fs Patch
@atlaspack/logger Patch
@atlaspack/utils Patch
@atlaspack/link Patch
@atlaspack/optimizer-image Patch
@atlaspack/optimizer-inline-requires Patch
@atlaspack/packager-js Patch
@atlaspack/transformer-html Patch
@atlaspack/transformer-js Patch
@atlaspack/transformer-postcss Patch
@atlaspack/transformer-svg Patch
@atlaspack/transformer-tokens Patch
@atlaspack/node-resolver-core Patch
@atlaspack/config-default Patch
@atlaspack/test-utils Patch
@atlaspack/inspector Patch
@atlaspack/query Patch
@atlaspack/config-webextension Patch
@atlaspack/cli Patch
@atlaspack/register Patch
@atlaspack/bundle-stats Patch
@atlaspack/reporter-bundle-stats Patch
@atlaspack/transformer-image Patch
@atlaspack/inspector-frontend Patch
@atlaspack/package-manager Patch
@atlaspack/workers Patch
@atlaspack/watcher-watchman-js Patch
@atlaspack/optimizer-blob-url Patch
@atlaspack/optimizer-css Patch
@atlaspack/optimizer-data-url Patch
@atlaspack/optimizer-svgo Patch
@atlaspack/optimizer-swc Patch
@atlaspack/optimizer-terser Patch
@atlaspack/packager-css Patch
@atlaspack/packager-html Patch
@atlaspack/packager-raw-url Patch
@atlaspack/packager-svg Patch
@atlaspack/packager-webextension Patch
@atlaspack/packager-xml Patch
@atlaspack/reporter-build-metrics Patch
@atlaspack/reporter-bundle-analyzer Patch
@atlaspack/reporter-cli Patch
@atlaspack/reporter-dev-server-sw Patch
@atlaspack/reporter-dev-server Patch
@atlaspack/reporter-json Patch
@atlaspack/reporter-lsp Patch
@atlaspack/reporter-sourcemap-visualiser Patch
@atlaspack/reporter-tracer Patch
@atlaspack/resolver-glob Patch
@atlaspack/runtime-browser-hmr Patch
@atlaspack/runtime-js Patch
@atlaspack/runtime-react-refresh Patch
@atlaspack/runtime-service-worker Patch
@atlaspack/runtime-webextension Patch
@atlaspack/transformer-babel Patch
@atlaspack/transformer-css Patch
@atlaspack/transformer-posthtml Patch
@atlaspack/transformer-react-refresh-wrap Patch
@atlaspack/transformer-typescript-types Patch
@atlaspack/transformer-webextension Patch
@atlaspack/transformer-webmanifest Patch
@atlaspack/validator-eslint Patch
@atlaspack/validator-typescript Patch
@atlaspack/resolver-default Patch
@atlaspack/resolver-tesseract Patch
@atlaspack/types Patch
@atlaspack/packager-ts Patch
@atlaspack/transformer-jsonld Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

📊 Type Coverage Report

Coverage Comparison

Metric Baseline Current Change
Coverage Percentage 92.03% 92.04% 📈 +0.01%
Correctly Typed 201,286 201,604 +318
Total Expressions 218,697 219,017 +320
Untyped Expressions 17,411 17,413 +2

Files with Most Type Issues (Top 15)

File Issues Affected Lines
packages/core/integration-tests/test/javascript.ts 983 648
packages/core/integration-tests/test/cache.ts 885 626
packages/core/integration-tests/test/scope-hoisting.ts 623 490
packages/utils/node-resolver-core/test/resolver.ts 476 177
packages/core/integration-tests/test/html.ts 468 294
packages/core/integration-tests/test/sourcemaps.ts 356 176
packages/core/test-utils/src/utils.ts 330 205
packages/core/integration-tests/test/incremental-bundling.ts 298 206
packages/core/core/src/dumpGraphToGraphViz.ts 251 108
packages/core/integration-tests/test/output-formats.ts 227 161
packages/transformers/webextension/src/WebExtensionTransformer.ts 210 80
packages/core/integration-tests/test/react-refresh.ts 197 71
packages/core/integration-tests/test/css-modules.ts 191 107
packages/core/core/src/requests/TargetRequest.ts 190 133
packages/core/integration-tests/test/babel.ts 187 115

This report was generated by the Type Coverage GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

📊 Benchmark Results

No significant performance changes detected.

📊 Benchmark Results

Overall Performance

Test Duration JS Memory Peak Native Memory Peak vs Baseline Status
Three.js Real Repository (JS) 16.63s 1.78GB 1.85GB -1.80% duration, -12.86% JS memory 🟡 Neutral
Three.js Real Repository (Native) 26.96s 3.22GB 3.44GB +4.94% duration, -12.31% JS memory 🟡 Neutral

🔍 Detailed Phase Analysis

Three.js Real Repository (JS)

Phase Duration (avg) Duration (p95) Memory Peak (avg) Memory Peak (p95)
resolving 8.78s 9.22s 1.15GB 1.18GB
transforming 8.78s 9.21s 1.15GB 1.19GB
bundling 8.55s 8.97s 1.15GB 1.19GB
bundled 8.14s 8.57s 1.26GB 1.30GB
packaging 6.00s 6.34s 1.37GB 1.42GB
optimizing 5.82s 6.15s 1.78GB 1.86GB

Three.js Real Repository (Native)

Phase Duration (avg) Duration (p95) Memory Peak (avg) Memory Peak (p95)
bundling 17.08s 23.53s 2.38GB 2.64GB
bundled 16.70s 23.10s 2.57GB 2.81GB
packaging 7.56s 8.48s 2.81GB 3.03GB
optimizing 7.41s 8.37s 3.22GB 3.44GB

💾 Unified Memory Analysis

Three.js Real Repository (JS) Memory Statistics

Memory Type Metric Min Mean Median P95 P99 Max Std Dev
JavaScript RSS 1.29GB 1.58GB 1.74GB 1.86GB 1.86GB 1.86GB 222.18MB
Heap Used 79.43MB 85.41MB 80.74MB 98.26MB 98.26MB 98.26MB 7.56MB
Heap Total 94.85MB 123.28MB 129.43MB 173.10MB 173.10MB 173.10MB 27.46MB
External 38.94MB 106.05MB 173.09MB 173.15MB 173.15MB 173.15MB 67.06MB
Native (Rust) Physical Memory 1.13GB 1.38GB 1.35GB 1.70GB 1.83GB 1.85GB 205.39MB
Virtual Memory 29.12GB 29.91GB 29.81GB 31.02GB 31.16GB 31.27GB 470.47MB

Sample Counts: JS: 6, Native: 262

Three.js Real Repository (Native) Memory Statistics

Memory Type Metric Min Mean Median P95 P99 Max Std Dev
JavaScript RSS 2.39GB 2.93GB 3.00GB 3.44GB 3.44GB 3.44GB 356.58MB
Heap Used 76.56MB 77.13MB 77.20MB 77.62MB 77.62MB 77.62MB 0.32MB
Heap Total 87.70MB 92.40MB 90.95MB 99.45MB 99.45MB 99.45MB 4.65MB
External 179.53MB 182.44MB 185.32MB 185.34MB 185.34MB 185.34MB 2.89MB
Native (Rust) Physical Memory 2.48GB 2.86GB 2.88GB 3.22GB 3.44GB 3.44GB 231.17MB
Virtual Memory 30.69GB 33.36GB 33.47GB 33.81GB 34.02GB 34.02GB 487.32MB

Sample Counts: JS: 6, Native: 634

🖥️ Environment

  • Node.js: v22.17.0
  • Platform: linux (x64)
  • CPU: AMD EPYC 7763 64-Core Processor
  • Total Memory: 15.62GB
  • Git SHA: b95a7d7
  • Branch: compiled-plugin-hash-migration
  • Timestamp: 2025-11-14T06:27:29.024Z

@JakeLane JakeLane force-pushed the compiled-plugin-hash-migration branch from cbbcc84 to f757134 Compare November 14, 2025 05:29
@JakeLane JakeLane marked this pull request as ready for review November 14, 2025 06:26
@JakeLane JakeLane requested a review from a team as a code owner November 14, 2025 06:26
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.

2 participants