Skip to content

Fix build on Windows: parameter shadowed volumeNameLen in cleanGlobPath - #548

Merged
Andrews54757 merged 1 commit into
Andrews54757:mainfrom
Nawid3333:fix/windows-build
Sep 9, 2026
Merged

Fix build on Windows: parameter shadowed volumeNameLen in cleanGlobPath#548
Andrews54757 merged 1 commit into
Andrews54757:mainfrom
Nawid3333:fix/windows-build

Conversation

@Nawid3333

Copy link
Copy Markdown
Contributor

node build.mjs currently fails immediately on Windows:

TypeError: volumeNameLen is not a function
    at miniglob.mjs:69:18
    at glob0 (miniglob.mjs:279:23)
    at glob (miniglob.mjs:34:12)
    at build.mjs:19:1

Cause

cleanGlobPath's second parameter is named volumeNameLen, which shadows the module-level volumeNameLen() function. The Windows branch then tries to call it — but the caller passes a number:

let volumeLen = volumeNameLen(pattern);      // number
;[volumeLen, dir] = cleanGlobPath(dir, volumeLen);

The POSIX branch treats that same parameter correctly as a number (return [volumeNameLen, '.']), which is why this only ever surfaced on Windows.

Fix

Renamed the parameter to vollen in both branches and dropped the redundant volumeNameLen(path) call, using the value the caller already computed.

Test plan

  • npm run build completes on Windows 11 / Node 26 — previously died before reaching build.mjs
  • Produces the same three packages as a Linux build (chrome-libre, chrome-dist, firefox-libre)
  • No behaviour change on POSIX — that branch only had a parameter rename

🤖 Generated with Claude Code

cleanGlobPath's second parameter was named volumeNameLen, shadowing the
module-level volumeNameLen() function. The Windows branch then called it
as a function, but the caller passes a number:

    let volumeLen = volumeNameLen(pattern);
    ;[volumeLen, dir] = cleanGlobPath(dir, volumeLen);

so `node build.mjs` died immediately on Windows with "volumeNameLen is
not a function". The POSIX branch treated the same parameter correctly
as a number, which is why this only ever showed up on Windows.

Renamed the parameter to vollen in both branches and dropped the
redundant call, matching what the caller already computes.

Verified: `npm run build` now completes on Windows and produces the same
three packages it produces on Linux.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nawid3333 added a commit to Nawid3333/FastStream that referenced this pull request Sep 7, 2026
…point

Phase 10 is no longer "not started": Andrews54757#548, Andrews54757#549, Andrews54757#550 and Andrews54757#551 are open
upstream, with follow-up comments on Andrews54757#547 and Andrews54757#546. The unlisted AMO
submission pipeline ran end to end on 2026-09-07 (local sign plus the
publish-amo workflow). The baseline re-capture is also recorded as done -
the workspace-level baseline now holds the modernised fork at cd728ab
(852 files, spot-verified), with the original V1.3.77 upstream build
archived separately.
@Andrews54757
Andrews54757 merged commit 8759bfa into Andrews54757:main Sep 9, 2026
@Nawid3333
Nawid3333 deleted the fix/windows-build branch September 9, 2026 11:41
Nawid3333 added a commit to Nawid3333/FastStream that referenced this pull request Sep 9, 2026
…ributes (Andrews54757#550)

Both commits are this fork's own upstream PRs coming back home.

Andrews54757#550 (.gitattributes) is a content no-op: the fork's file and Andrew's are
byte-identical, since he merged the PR as submitted.

Andrews54757#548 lands only the half the fork did not already have. The fork fixed the
WIN32 branch of cleanGlobPath in ab0719d (that was the actual Windows
build break); upstream's merge also renamed the parameter in the
non-WIN32 branch, which is what arrives here. No behaviour change on
Windows, and it removes the last divergence from upstream in miniglob.mjs.

The fork's removal of the file's blanket /* eslint-disable */ survives the
merge -- checked, not assumed.

Verified after merging: lint 0, tsc 0, 90 unit tests, all four builds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nawid3333 added a commit to Nawid3333/FastStream that referenced this pull request Sep 9, 2026
…mes in the upstream candidates queue

A1 (Windows build) and A2 (.gitattributes) merged 2026-09-09 -- mark them
`merged` instead of `queued`, since both landed and were pulled back into
dev/mv3-modernization by the same day's upstream sync.

Add A2b for Andrews54757#549 (drop the unused contextualIdentities permission), which
Andrew closed: it is provisioned ahead of an unshipped Firefox API
(Bugzilla 1917842), not dead weight. Recorded so nobody re-proposes it on
the strength of the same grep that looked convincing the first time.

Add `rejected` to the status vocabulary.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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