test(sourcemap): fix Windows-only failures in composition fixtures#10368
Merged
graphite-app[bot] merged 1 commit intoJul 21, 2026
Conversation
✅ Deploy Preview for rolldown-rs canceled.
|
hyfdev
approved these changes
Jul 21, 2026
Member
Merge activity
|
…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
Bot
force-pushed
the
07-21-test_sourcemap_fix_windows-only_failures_in_composition_fixtures
branch
from
July 21, 2026 10:00
c56f583 to
95f99fb
Compare
graphite-app
Bot
deleted the
07-21-test_sourcemap_fix_windows-only_failures_in_composition_fixtures
branch
July 21, 2026 10:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
node-test-windowsjob has been failing on everymainrun since 2026-07-15 (for example this run). The two fixtures added in #10249 and #10254 guard theirloadandtransformhooks withid.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-6399bundles the on-disk comment-onlymain.jsinto an empty chunk whosemapisnull, sonew TraceMap(null)throwsCannot read properties of null (reading '_decodedMemo'). Inexplicit-unmapped-boundary, the transform never injectsinjected(), socode.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.