Skip to content

test(sourcemap): fix Windows-only failures in composition fixtures#10368

Merged
graphite-app[bot] merged 1 commit into
mainfrom
07-21-test_sourcemap_fix_windows-only_failures_in_composition_fixtures
Jul 21, 2026
Merged

test(sourcemap): fix Windows-only failures in composition fixtures#10368
graphite-app[bot] merged 1 commit into
mainfrom
07-21-test_sourcemap_fix_windows-only_failures_in_composition_fixtures

Conversation

@shulaoda

Copy link
Copy Markdown
Member

Description

The node-test-windows job has been failing on every main run since 2026-07-15 (for example this run). The two fixtures added in #10249 and #10254 guard their load and transform hooks with id.endsWith('/main.js'). On Windows, module ids use backslashes, so the guard never matches and the hooks are silently skipped.

With the hooks skipped, coarse-sourcemap-composition-issue-6399 bundles the on-disk comment-only main.js into an empty chunk whose map is null, so new TraceMap(null) throws Cannot read properties of null (reading '_decodedMemo'). In explicit-unmapped-boundary, the transform never injects injected(), so code.indexOf('injected()') returns -1 and the assertion fails.

This PR drops the leading slash so the checks become id.endsWith('main.js'), which is the pattern every other fixture in the repo already uses and works with both path separators. No production code is touched.

@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 95f99fb
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6a5f4344c87cde000891a4bb

hyfdev commented Jul 21, 2026

Copy link
Copy Markdown
Member

Merge activity

  • Jul 21, 9:59 AM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jul 21, 9:59 AM UTC: hyfdev added this pull request to the Graphite merge queue.
  • Jul 21, 10:05 AM UTC: Merged by the Graphite merge queue.

…10368)

### Description

The `node-test-windows` job has been failing on every `main` run since 2026-07-15 (for example [this run](https://github.com/rolldown/rolldown/actions/runs/29795703407/job/88527096422)). The two fixtures added in #10249 and #10254 guard their `load` and `transform` hooks with `id.endsWith('/main.js')`. On Windows, module ids use backslashes, so the guard never matches and the hooks are silently skipped.

With the hooks skipped, `coarse-sourcemap-composition-issue-6399` bundles the on-disk comment-only `main.js` into an empty chunk whose `map` is `null`, so `new TraceMap(null)` throws `Cannot read properties of null (reading '_decodedMemo')`. In `explicit-unmapped-boundary`, the transform never injects `injected()`, so `code.indexOf('injected()')` returns -1 and the assertion fails.

This PR drops the leading slash so the checks become `id.endsWith('main.js')`, which is the pattern every other fixture in the repo already uses and works with both path separators. No production code is touched.
@graphite-app
graphite-app Bot force-pushed the 07-21-test_sourcemap_fix_windows-only_failures_in_composition_fixtures branch from c56f583 to 95f99fb Compare July 21, 2026 10:00
@graphite-app
graphite-app Bot merged commit 95f99fb into main Jul 21, 2026
33 checks passed
@graphite-app
graphite-app Bot deleted the 07-21-test_sourcemap_fix_windows-only_failures_in_composition_fixtures branch July 21, 2026 10:05
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