Skip to content

Conversation

@OscarCookeAbbott
Copy link
Contributor

Motivation

My recent transformers lacked Atlaspack V3 config parsing or any integration tests (just unit tests), this little followup remedies that.

Changes

  • Add Atlaspack V3 config parsing for recent transformers
  • Add integration tests for recent transformers

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

Add integration tests
@OscarCookeAbbott OscarCookeAbbott requested a review from a team as a code owner December 1, 2025 01:55
@changeset-bot
Copy link

changeset-bot bot commented Dec 1, 2025

🦋 Changeset detected

Latest commit: 171e77c

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

This PR includes changesets to release 10 packages
Name Type
@atlaspack/integration-tests Minor
@atlaspack/transformer-js Minor
@atlaspack/config-default Patch
atlaspack Patch
@atlaspack/config-webextension Patch
@atlaspack/cli Patch
@atlaspack/register Patch
@atlaspack/test-utils Patch
@atlaspack/inspector Patch
@atlaspack/inspector-frontend 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 Dec 1, 2025

Missing Changeset

No changeset found in PR.
Please add a changeset file (yarn changeset), or add a '[no-changeset]' tag with explanation to the PR description.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Rust Package Changeset Check

⚠️ Rust files have been changed but the @atlaspack/rust package was not bumped in your changeset.

Options:

  1. If you want your Rust changes published: Add @atlaspack/rust to your changeset
  2. If this change doesn't require publishing: Add a [no-changeset] tag to your PR description

Example: [no-changeset]: Internal refactoring that doesn't affect the public API

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

📊 Type Coverage Report

Coverage Comparison

Metric Baseline Current Change
Coverage Percentage 92.09% 92.04% 📉 -0.05%
Correctly Typed 203,751 204,181 +430
Total Expressions 221,250 221,822 +572
Untyped Expressions 17,499 17,641 +142

Files with Most Type Issues (Top 15)

File Issues Affected Lines
packages/core/integration-tests/test/javascript.ts 1141 738
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/css-modules.ts 191 107
packages/core/core/src/requests/TargetRequest.ts 190 133
packages/core/integration-tests/test/react-refresh.ts 188 65
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 Dec 1, 2025

📊 Benchmark Results

⚠️ Performance regressions detected!

📊 Benchmark Results

Overall Performance

Test Duration JS Memory Peak Native Memory Peak vs Baseline Status
Three.js Real Repository (JS) 19.73s 1.98GB 2.06GB +3.99% duration, -5.66% JS memory 🟡 Neutral
Three.js Real Repository (V3) 29.45s 3.50GB 3.92GB +15.40% duration, -5.14% JS memory 🔴 Regression

🔍 Detailed Phase Analysis

Three.js Real Repository (JS)

Phase Duration (avg) Duration (p95) Memory Peak (avg) Memory Peak (p95)
resolving 9.21s 10.26s 1.43GB 1.61GB
transforming 9.19s 10.22s 1.43GB 1.62GB
bundling 8.97s 10.01s 1.43GB 1.62GB
bundled 8.58s 9.64s 1.54GB 1.74GB
packaging 6.17s 6.90s 1.65GB 1.84GB
optimizing 5.99s 6.71s 1.98GB 2.13GB

Three.js Real Repository (V3)

Phase Duration (avg) Duration (p95) Memory Peak (avg) Memory Peak (p95)
bundling 17.98s 26.51s 2.77GB 3.12GB
bundled 17.54s 26.10s 2.95GB 3.29GB
packaging 7.72s 7.87s 3.09GB 3.48GB
optimizing 7.57s 7.71s 3.50GB 3.92GB

💾 Unified Memory Analysis

Three.js Real Repository (JS) Memory Statistics

Memory Type Metric Min Mean Median P95 P99 Max Std Dev
JavaScript RSS 1.45GB 1.81GB 1.79GB 2.13GB 2.13GB 2.13GB 209.13MB
Heap Used 80.00MB 88.32MB 91.26MB 101.71MB 101.71MB 101.71MB 7.90MB
Heap Total 94.60MB 116.09MB 126.35MB 141.64MB 141.64MB 141.64MB 17.31MB
External 38.88MB 105.96MB 173.02MB 173.02MB 173.02MB 173.02MB 67.06MB
Native (Rust) Physical Memory 1.54GB 1.76GB 1.78GB 2.02GB 2.03GB 2.06GB 142.07MB
Virtual Memory 30.07GB 30.78GB 30.80GB 31.05GB 31.06GB 31.16GB 182.02MB

Sample Counts: JS: 14, Native: 303

Three.js Real Repository (V3) Memory Statistics

Memory Type Metric Min Mean Median P95 P99 Max Std Dev
JavaScript RSS 2.40GB 3.24GB 3.24GB 3.92GB 3.92GB 3.92GB 402.93MB
Heap Used 77.17MB 78.53MB 77.98MB 87.91MB 87.91MB 87.91MB 2.62MB
Heap Total 86.20MB 92.90MB 88.70MB 121.63MB 121.63MB 121.63MB 9.13MB
External 46.07MB 172.64MB 179.71MB 185.49MB 185.49MB 185.49MB 35.22MB
Native (Rust) Physical Memory 3.05GB 3.39GB 3.38GB 3.75GB 3.92GB 3.92GB 198.41MB
Virtual Memory 30.76GB 33.42GB 33.60GB 33.92GB 34.08GB 34.08GB 715.41MB

Sample Counts: JS: 14, Native: 468

🖥️ Environment

  • Node.js: v22.17.0
  • Platform: linux (x64)
  • CPU: AMD EPYC 7763 64-Core Processor
  • Total Memory: 15.62GB
  • Git SHA: 171e77c
  • Branch: oscar/js-transformer/atlaspack-v3-compat
  • Timestamp: 2025-12-05T01:19:54.974Z

Copy link
Contributor

@marcins marcins left a comment

Choose a reason for hiding this comment

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

Nice one!

.get(&Atom::from("NATIVE_SSR_TYPEOF_REPLACEMENT"))
.is_some_and(|v| v == "true");
let global_aliasing_config = match env_vars.get(&Atom::from("NATIVE_GLOBAL_ALIASING")) {
Some(value) => match serde_json::from_str::<HashMap<String, String>>(value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to cache this value so it's not parsed on every file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's probably not worth the effort and extra maintenance given the efficiency of Serde and the miniscule scale of the configs

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