Visitar URL original
Comparing 0.44.0...0.45.0 · vercel/ncc · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vercel/ncc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.44.0
Choose a base ref
...
head repository: vercel/ncc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.45.0
Choose a head ref
  • 6 commits
  • 67 files changed
  • 6 contributors

Commits on Jun 9, 2026

  1. chore: Update vm2 to latest version (3.11.5) (#1333)

    Bumps `vm2` from `^3.10.3` to `^3.11.5` via `pnpm install vm2@latest`.
    
    - Updated version specifier in `package.json`
    - Regenerated `pnpm-lock.yaml`
    
    > **Note:** vm2 has been deprecated and archived upstream. A future
    migration to `isolated-vm` or another sandboxing solution should be
    considered.
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Copilot authored Jun 9, 2026
    Configuration menu
    Copy the full SHA
    b9c6310 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2026

  1. fix: preserve runtime createRequire in ESM builds (#1334)

    ## Problem
    
    Since 0.38.2, an ESM build can replace a runtime
    `createRequire(...)` binding with `undefined`, causing the later runtime
    `require(...)` call to throw.
    
    ## Change
    
    - Disable Webpack's `createRequire` parser handling in ncc so Node
    evaluates
      the call at runtime.
    - Add a normal integration fixture with an `.mjs` entry that imports the
      TypeScript runtime payload and loads a runtime-selected JSON module.
    
    This keeps the fix at ncc's Webpack configuration boundary and covers
    the
    reported runtime behavior without changing dependency tracing.
    
    ## Validation
    
    - `node scripts/build.js --no-cache`
    - `node --expose-gc --max_old_space_size=4096
    node_modules/jest/bin/jest.js test/integration.test.js --runInBand
    --testNamePattern create-require-runtime`
      - 1 passed
    - `pnpm test -- test/unit.test.js`
      - 28 passed
    - `node --expose-gc --max_old_space_size=4096
    node_modules/jest/bin/jest.js --runInBand test/integration.test.js
    --testNamePattern='^(?!should execute "ncc run
    (?:axios\.js|canvas\.js|isomorphic-unfetch\.js|request-ts\.ts|request\.js|sharp\.js|socket\.io\.js)"$).*'`
      - 62 passed; 7 local environment-dependent cases skipped
    - Negative control with Webpack's `createRequire` parsing restored
    reproduced
      `TypeError: input_require is not a function`.
    
    ## Risk
    
    The parser option applies to all JavaScript handled by ncc. It
    intentionally
    preserves `createRequire` for Node to evaluate at runtime, so modules
    selected
    only at runtime must still be deployed with the bundle.
    
    The cross-platform Node 22/24/26 matrix remains for CI. A local CLI
    watch test
    failed with Watchpack `EMFILE` errors and reproduced identically on
    `origin/main`, so it is not attributed to this change.
    
    ## Out of scope
    
    - Changing how ncc traces or deploys runtime-selected modules.
    - Dependency or lockfile updates.
    
    ## Issue linkage
    
    Fixes #1312
    Jaksenc authored Jun 29, 2026
    Configuration menu
    Copy the full SHA
    8f0aefd View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2026

  1. Configuration menu
    Copy the full SHA
    063c592 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2026

  1. chore(deps): Bump actions/setup-node from 6 to 7 (#1339)

    Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6
    to 7.
    <details>
    <summary>Release notes</summary>
    <p><em>Sourced from <a
    href="https://github.com/actions/setup-node/releases">actions/setup-node's
    releases</a>.</em></p>
    <blockquote>
    <h2>v7.0.0</h2>
    <h2>What's Changed</h2>
    <h3>Enhancements:</h3>
    <ul>
    <li>Add cache-primary-key and cache-matched-key as outputs by <a
    href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a> in
    <a
    href="https://redirect.github.com/actions/setup-node/pull/1577">actions/setup-node#1577</a></li>
    <li>Migrate to ESM and upgrade dependencies by <a
    href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a> in
    <a
    href="https://redirect.github.com/actions/setup-node/pull/1574">actions/setup-node#1574</a></li>
    </ul>
    <h3>Bug fixes:</h3>
    <ul>
    <li>Remove dummy NODE_AUTH_TOKEN export by <a
    href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a> in
    <a
    href="https://redirect.github.com/actions/setup-node/pull/1558">actions/setup-node#1558</a></li>
    <li>Only use <code>mirrorToken</code> in <code>getManifest</code> if
    it's provided by <a
    href="https://github.com/deiga"><code>@​deiga</code></a> in <a
    href="https://redirect.github.com/actions/setup-node/pull/1548">actions/setup-node#1548</a></li>
    </ul>
    <h3>Documentation updates:</h3>
    <ul>
    <li>Add documentation for publishing to npm with Trusted Publisher
    (OIDC) by <a
    href="https://github.com/chiranjib-swain"><code>@​chiranjib-swain</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-node/pull/1536">actions/setup-node#1536</a></li>
    <li>docs: Update restore-only cache documentation by <a
    href="https://github.com/priya-kinthali"><code>@​priya-kinthali</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-node/pull/1550">actions/setup-node#1550</a></li>
    <li>docs: Update caching recommendations to mitigate cache poisoning
    risks by <a
    href="https://github.com/chiranjib-swain"><code>@​chiranjib-swain</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-node/pull/1567">actions/setup-node#1567</a></li>
    </ul>
    <h3>Dependency update:</h3>
    <ul>
    <li>Upgrade <code>@​actions/cache</code> to 5.1.0, log cache write
    denied by <a
    href="https://github.com/jasongin"><code>@​jasongin</code></a> in <a
    href="https://redirect.github.com/actions/setup-node/pull/1569">actions/setup-node#1569</a></li>
    </ul>
    <h2>New Contributors</h2>
    <ul>
    <li><a
    href="https://github.com/chiranjib-swain"><code>@​chiranjib-swain</code></a>
    made their first contribution in <a
    href="https://redirect.github.com/actions/setup-node/pull/1536">actions/setup-node#1536</a></li>
    <li><a href="https://github.com/deiga"><code>@​deiga</code></a> made
    their first contribution in <a
    href="https://redirect.github.com/actions/setup-node/pull/1548">actions/setup-node#1548</a></li>
    <li><a href="https://github.com/jasongin"><code>@​jasongin</code></a>
    made their first contribution in <a
    href="https://redirect.github.com/actions/setup-node/pull/1569">actions/setup-node#1569</a></li>
    </ul>
    <p><strong>Full Changelog</strong>: <a
    href="https://github.com/actions/setup-node/compare/v6...v7.0.0">https://github.com/actions/setup-node/compare/v6...v7.0.0</a></p>
    <h2>v6.5.0</h2>
    <h2>What's Changed</h2>
    <ul>
    <li>Update <code>@​actions/cache</code> to 5.1.0 and add security
    overrides for undici and fast-xml-parser by <a
    href="https://github.com/HarithaVattikuti"><code>@​HarithaVattikuti</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-node/pull/1579">actions/setup-node#1579</a></li>
    </ul>
    <p><strong>Full Changelog</strong>: <a
    href="https://github.com/actions/setup-node/compare/v6.4.0...v6.5.0">https://github.com/actions/setup-node/compare/v6.4.0...v6.5.0</a></p>
    <h2>v6.4.0</h2>
    <h2>What's Changed</h2>
    <h3>Dependency updates:</h3>
    <ul>
    <li>Upgrade <a
    href="https://github.com/actions"><code>@​actions</code></a>
    dependencies by <a
    href="https://github.com/Copilot"><code>@​Copilot</code></a> in <a
    href="https://redirect.github.com/actions/setup-node/pull/1525">actions/setup-node#1525</a></li>
    <li>Update Node.js versions in versions.yml and bump package to v6.4.0
    by <a
    href="https://github.com/priya-kinthali"><code>@​priya-kinthali</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-node/pull/1533">actions/setup-node#1533</a></li>
    </ul>
    <h2>New Contributors</h2>
    <ul>
    <li><a href="https://github.com/Copilot"><code>@​Copilot</code></a> made
    their first contribution in <a
    href="https://redirect.github.com/actions/setup-node/pull/1525">actions/setup-node#1525</a></li>
    </ul>
    <p><strong>Full Changelog</strong>: <a
    href="https://github.com/actions/setup-node/compare/v6...v6.4.0">https://github.com/actions/setup-node/compare/v6...v6.4.0</a></p>
    <h2>v6.3.0</h2>
    <h2>What's Changed</h2>
    <h3>Enhancements:</h3>
    <ul>
    <li>Support parsing <code>devEngines</code> field by <a
    href="https://github.com/susnux"><code>@​susnux</code></a> in <a
    href="https://redirect.github.com/actions/setup-node/pull/1283">actions/setup-node#1283</a></li>
    </ul>
    <!-- raw HTML omitted -->
    </blockquote>
    <p>... (truncated)</p>
    </details>
    <details>
    <summary>Commits</summary>
    <ul>
    <li><a
    href="https://github.com/actions/setup-node/commit/820762786026740c76f36085b0efc47a31fe5020"><code>8207627</code></a>
    Migrate to ESM and upgrade dependencies (<a
    href="https://redirect.github.com/actions/setup-node/issues/1574">#1574</a>)</li>
    <li><a
    href="https://github.com/actions/setup-node/commit/04be95cf3511ea51ebf9f224ddfb99cc7ab87cd4"><code>04be95c</code></a>
    Add cache-primary-key and cache-matched-key as outputs (<a
    href="https://redirect.github.com/actions/setup-node/issues/1577">#1577</a>)</li>
    <li><a
    href="https://github.com/actions/setup-node/commit/7c2c68d20d402ed6a201ada70a81341941093140"><code>7c2c68d</code></a>
    docs: Update caching recommendations to mitigate cache poisoning risks
    (<a
    href="https://redirect.github.com/actions/setup-node/issues/1567">#1567</a>)</li>
    <li><a
    href="https://github.com/actions/setup-node/commit/6a61c0375d66246de94630495909f12cf8dac84d"><code>6a61c03</code></a>
    Merge pull request <a
    href="https://redirect.github.com/actions/setup-node/issues/1569">#1569</a>
    from jasongin/update-actions-cache-5.1.0</li>
    <li><a
    href="https://github.com/actions/setup-node/commit/30eb73b41ded577900c1ebf968ef95cdf8f7434f"><code>30eb73b</code></a>
    Resolve high-severity audit issues</li>
    <li><a
    href="https://github.com/actions/setup-node/commit/4e1a87a501d0302f99e30e2748568adcb388d09f"><code>4e1a87a</code></a>
    Update dist</li>
    <li><a
    href="https://github.com/actions/setup-node/commit/360237f0c01778d0c17291f75c56d6feae4f7574"><code>360237f</code></a>
    Strict equality</li>
    <li><a
    href="https://github.com/actions/setup-node/commit/4f8aac5beb2f0854bc79651567a18c67eb0b9de3"><code>4f8aac5</code></a>
    Bump <code>@​actions/cache</code> to 5.1.0, log cache write denied</li>
    <li><a
    href="https://github.com/actions/setup-node/commit/f4a67bbeca970f103397d3d2b9462cf787cd2980"><code>f4a67bb</code></a>
    Only use <code>mirrorToken</code> in <code>getManifest</code> if it's
    provided (<a
    href="https://redirect.github.com/actions/setup-node/issues/1548">#1548</a>)</li>
    <li><a
    href="https://github.com/actions/setup-node/commit/0355742c943ddb13ca8a6b700f824231caa91e75"><code>0355742</code></a>
    Remove dummy NODE_AUTH_TOKEN export (<a
    href="https://redirect.github.com/actions/setup-node/issues/1558">#1558</a>)</li>
    <li>Additional commits viewable in <a
    href="https://github.com/actions/setup-node/compare/v6...v7">compare
    view</a></li>
    </ul>
    </details>
    <br />
    
    
    [![Dependabot compatibility
    score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-node&package-manager=github_actions&previous-version=6&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
    
    Dependabot will resolve any conflicts with this PR as long as you don't
    alter it yourself. You can also trigger a rebase manually by commenting
    `@dependabot rebase`.
    
    [//]: # (dependabot-automerge-start)
    [//]: # (dependabot-automerge-end)
    
    ---
    
    <details>
    <summary>Dependabot commands and options</summary>
    <br />
    
    You can trigger Dependabot actions by commenting on this PR:
    - `@dependabot rebase` will rebase this PR
    - `@dependabot recreate` will recreate this PR, overwriting any edits
    that have been made to it
    - `@dependabot show <dependency name> ignore conditions` will show all
    of the ignore conditions of the specified dependency
    - `@dependabot ignore this major version` will close this PR and stop
    Dependabot creating any more for this major version (unless you reopen
    the PR or upgrade to it yourself)
    - `@dependabot ignore this minor version` will close this PR and stop
    Dependabot creating any more for this minor version (unless you reopen
    the PR or upgrade to it yourself)
    - `@dependabot ignore this dependency` will close this PR and stop
    Dependabot creating any more for this dependency (unless you reopen the
    PR or upgrade to it yourself)
    
    
    </details>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 2, 2026
    Configuration menu
    Copy the full SHA
    b037995 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2026

  1. chore(deps): Bump actions/setup-python from 6 to 7 (#1338)

    Bumps [actions/setup-python](https://github.com/actions/setup-python)
    from 6 to 7.
    <details>
    <summary>Release notes</summary>
    <p><em>Sourced from <a
    href="https://github.com/actions/setup-python/releases">actions/setup-python's
    releases</a>.</em></p>
    <blockquote>
    <h2>v7.0.0</h2>
    <h2>What's Changed</h2>
    <h3>Enhancements</h3>
    <ul>
    <li>Migrate to ESM and upgrade dependencies by <a
    href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-python/pull/1330">actions/setup-python#1330</a></li>
    <li>Pin SHA commits and update docs with latest versions by <a
    href="https://github.com/HarithaVattikuti"><code>@​HarithaVattikuti</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-python/pull/1338">actions/setup-python#1338</a></li>
    <li>Remove the pip-install input by <a
    href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a> in
    <a
    href="https://redirect.github.com/actions/setup-python/pull/1336">actions/setup-python#1336</a></li>
    </ul>
    <h3>Bug Fix</h3>
    <ul>
    <li>Fix to Classify stderr warning messages as warnings instead of
    errors in annotations by <a
    href="https://github.com/lmvysakh"><code>@​lmvysakh</code></a> in <a
    href="https://redirect.github.com/actions/setup-python/pull/1335">actions/setup-python#1335</a></li>
    <li>Validate and retry manifest fetch to prevent silent failures by <a
    href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-python/pull/1332">actions/setup-python#1332</a></li>
    </ul>
    <h3>Dependency Upgrade</h3>
    <ul>
    <li>Bump certifi from 2020.6.20 to 2024.7.4 in
    /<strong>tests</strong>/data by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/actions/setup-python/pull/1328">actions/setup-python#1328</a></li>
    <li>Remove EOL Python versions and Bumps numpy text fixture by <a
    href="https://github.com/priya-kinthali"><code>@​priya-kinthali</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-python/pull/1333">actions/setup-python#1333</a></li>
    <li>Upgrade <code>@​actions/cache</code> to 6.2.0 by <a
    href="https://github.com/philip-gai"><code>@​philip-gai</code></a> in <a
    href="https://redirect.github.com/actions/setup-python/pull/1337">actions/setup-python#1337</a></li>
    </ul>
    <h2>New Contributors</h2>
    <ul>
    <li><a href="https://github.com/lmvysakh"><code>@​lmvysakh</code></a>
    made their first contribution in <a
    href="https://redirect.github.com/actions/setup-python/pull/1335">actions/setup-python#1335</a></li>
    <li><a
    href="https://github.com/philip-gai"><code>@​philip-gai</code></a> made
    their first contribution in <a
    href="https://redirect.github.com/actions/setup-python/pull/1337">actions/setup-python#1337</a></li>
    </ul>
    <p><strong>Full Changelog</strong>: <a
    href="https://github.com/actions/setup-python/compare/v6...v7.0.0">https://github.com/actions/setup-python/compare/v6...v7.0.0</a></p>
    <h2>v6.3.0</h2>
    <h2>What's Changed</h2>
    <h3>Enhancement</h3>
    <ul>
    <li>Add RHEL support and include Linux distro in cache keys by <a
    href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-python/pull/1323">actions/setup-python#1323</a></li>
    <li>Fix pip cache error handling on Windows by <a
    href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-python/pull/1040">actions/setup-python#1040</a></li>
    </ul>
    <h3>Dependency update</h3>
    <ul>
    <li>Upgrade minimatch from 3.1.2 to 3.1.5 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/actions/setup-python/pull/1281">actions/setup-python#1281</a></li>
    <li>Upgrade actions dependencies by <a
    href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a>
    with <a href="https://github.com/Copilot"><code>@​Copilot</code></a> in
    <a
    href="https://redirect.github.com/actions/setup-python/pull/1303">actions/setup-python#1303</a></li>
    <li>Upgrade <code>@​actions/cache</code> to 5.1.0, log cache write
    denied by <a
    href="https://github.com/jasongin"><code>@​jasongin</code></a> in <a
    href="https://redirect.github.com/actions/setup-python/pull/1324">actions/setup-python#1324</a></li>
    <li>Upgrade dependency versions and test workflow configuration by <a
    href="https://github.com/HarithaVattikuti"><code>@​HarithaVattikuti</code></a>
    in <a
    href="https://redirect.github.com/actions/setup-python/pull/1322">actions/setup-python#1322</a></li>
    </ul>
    <h3>Documentation</h3>
    <ul>
    <li>Update advanced-usage.md by <a
    href="https://github.com/Dunky-Z"><code>@​Dunky-Z</code></a> in <a
    href="https://redirect.github.com/actions/setup-python/pull/811">actions/setup-python#811</a></li>
    </ul>
    <h2>New Contributors</h2>
    <ul>
    <li><a
    href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a>
    with <a href="https://github.com/Copilot"><code>@​Copilot</code></a>
    made their first contribution in <a
    href="https://redirect.github.com/actions/setup-python/pull/1303">actions/setup-python#1303</a></li>
    <li><a href="https://github.com/jasongin"><code>@​jasongin</code></a>
    made their first contribution in <a
    href="https://redirect.github.com/actions/setup-python/pull/1324">actions/setup-python#1324</a></li>
    <li><a href="https://github.com/Dunky-Z"><code>@​Dunky-Z</code></a> made
    their first contribution in <a
    href="https://redirect.github.com/actions/setup-python/pull/811">actions/setup-python#811</a></li>
    </ul>
    <p><strong>Full Changelog</strong>: <a
    href="https://github.com/actions/setup-python/compare/v6.2.0...v6.3.0">https://github.com/actions/setup-python/compare/v6.2.0...v6.3.0</a></p>
    <h2>v6.2.0</h2>
    <h2>What's Changed</h2>
    <h3>Dependency Upgrades</h3>
    <ul>
    <li>Upgrade dependencies to Node 24 compatible versions by <a
    href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
    href="https://redirect.github.com/actions/setup-python/pull/1259">actions/setup-python#1259</a></li>
    </ul>
    <!-- raw HTML omitted -->
    </blockquote>
    <p>... (truncated)</p>
    </details>
    <details>
    <summary>Commits</summary>
    <ul>
    <li><a
    href="https://github.com/actions/setup-python/commit/5fda3b95a4ea91299a34e894583c3862153e4b97"><code>5fda3b9</code></a>
    Pin SHA commits and update docs with latest versions (<a
    href="https://redirect.github.com/actions/setup-python/issues/1338">#1338</a>)</li>
    <li><a
    href="https://github.com/actions/setup-python/commit/4ab7e95f05e168b4356aebde89dd84f59c283d8e"><code>4ab7e95</code></a>
    Merge pull request <a
    href="https://redirect.github.com/actions/setup-python/issues/1337">#1337</a>
    from actions/philip-gai/bump-actions-cache-6-2-0</li>
    <li><a
    href="https://github.com/actions/setup-python/commit/0f3a009f475dbea83c0371cd85d099690fee8c5c"><code>0f3a009</code></a>
    Remove the pip-install input (<a
    href="https://redirect.github.com/actions/setup-python/issues/1336">#1336</a>)</li>
    <li><a
    href="https://github.com/actions/setup-python/commit/f8cf4291c8b8e273ddd26e569454615c7315d932"><code>f8cf429</code></a>
    Migrate to ESM and upgrade dependencies (<a
    href="https://redirect.github.com/actions/setup-python/issues/1330">#1330</a>)</li>
    <li><a
    href="https://github.com/actions/setup-python/commit/54baeea5b34417d10a7479663a23cca53ea209b5"><code>54baeea</code></a>
    Validate and retry manifest fetch to prevent silent failures (<a
    href="https://redirect.github.com/actions/setup-python/issues/1332">#1332</a>)</li>
    <li><a
    href="https://github.com/actions/setup-python/commit/c7092773a316760f4ecfe498e4af668a4dafeac5"><code>c709277</code></a>
    Annotation code fix (<a
    href="https://redirect.github.com/actions/setup-python/issues/1335">#1335</a>)</li>
    <li><a
    href="https://github.com/actions/setup-python/commit/6849080452e69b330395e8a6d23cf90f56d76a1a"><code>6849080</code></a>
    remove EOL Python versions and Bumps numpy text fixture (<a
    href="https://redirect.github.com/actions/setup-python/issues/1333">#1333</a>)</li>
    <li><a
    href="https://github.com/actions/setup-python/commit/0903b469fbf4441aadfe4f4b249dc5b1fba3a73e"><code>0903b46</code></a>
    Bump certifi from 2020.6.20 to 2024.7.4 in /<strong>tests</strong>/data
    (<a
    href="https://redirect.github.com/actions/setup-python/issues/1328">#1328</a>)</li>
    <li>See full diff in <a
    href="https://github.com/actions/setup-python/compare/v6...v7">compare
    view</a></li>
    </ul>
    </details>
    <br />
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 3, 2026
    Configuration menu
    Copy the full SHA
    cfec24e View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2026

  1. feat: update @vercel/webpack-asset-relocator-loader to 1.10.3 (#1342)

    Bumps `@vercel/webpack-asset-relocator-loader` from **1.7.3** to
    **1.10.3** (latest).
    
    ## What's in the bump
    
    | Version | Change |
    | --- | --- |
    | 1.7.4 | Use a computed `node-gyp-build` path
    ([#185](vercel/webpack-asset-relocator-loader#185))
    |
    | 1.7.5 | Fix `__nccwpck_require__ is not defined` regression
    ([#195](vercel/webpack-asset-relocator-loader#195))
    |
    | 1.8.0 | Support `node:path` as an alias of `path`
    ([#197](vercel/webpack-asset-relocator-loader#197))
    |
    | 1.9.0 | Load native addons from the `prebuilds` directory
    ([#198](vercel/webpack-asset-relocator-loader#198))
    |
    | 1.9.1 | Support the packaging format of sharp v0.34.x
    ([#199](vercel/webpack-asset-relocator-loader#199))
    |
    | 1.10.0 | Ship the loader as source instead of a prebuilt bundle
    ([#200](vercel/webpack-asset-relocator-loader#200))
    |
    | 1.10.2 | Packaging/CI fixes |
    | 1.10.3 | Percent-decode the ESM asset base
    ([#220](vercel/webpack-asset-relocator-loader#220))
    |
    
    Because 1.10.0 publishes `src/` rather than an ncc-built `dist/`, the
    loader's previously bundled dependencies are now real transitive
    dependencies — that accounts for the lockfile growth. The
    `relocate-loader` build emits no new assets, and
    `dist/ncc/loaders/relocate-loader.js.cache.js` actually shrinks slightly
    (499.37KB → 492.13KB).
    
    ## Why the unit fixtures change
    
    The loader now registers the asset base through a webpack
    `RuntimeModule` instead of the deprecated
    `mainTemplate.hooks.requireExtensions`. Two consequences show up in
    `test/unit/*/output*.js`:
    
    1. The block is labelled `/* webpack/runtime/asset-relocator-loader */`
    instead of `/* webpack/runtime/compat */`, and is emitted earlier in the
    runtime.
    2. Bundles that never reference `__nccwpck_require__` no longer carry
    the dead `if (typeof __nccwpck_require__ !== 'undefined')
    __nccwpck_require__.ab = ...` assignment — the runtime module is only
    added when `RuntimeGlobals.require` is actually in the tree. The guard
    was always false in those bundles, so this is dead-code removal, not a
    behaviour change.
    
    I specifically checked that the second point is not a regression.
    `__nccwpck_require__.ab` is still emitted wherever it is referenced,
    verified by hand for CJS, ESM, and concatenated-TypeScript builds that
    relocate an asset, and by the asset-heavy integration tests (`sharp`,
    `canvas`, `ffmpeg`, `oracledb`, `leveldown`, `binary-require`), which
    all pass.
    
    ## The Windows fix now comes from upstream
    
    The first push was green on Linux and macOS but failed on all three
    Windows jobs:
    
    ```
    Cannot find module 'C:/Users/RUNNER%7E1/AppData/Local/Temp/.../runtime.json'
    ```
    
    The relocator derives the ESM asset base from `new URL('.',
    import.meta.url).pathname`, which is percent-encoded. The Windows
    runner's temp dir is an 8.3 short name (`RUNNER~1`), so `~` became
    `%7E`. This is **not** platform-specific — paths containing spaces break
    identically everywhere:
    
    ```
    $ ncc build input.mjs -o '/tmp/out dir'
    Cannot find module '/tmp/out%20dir/runtime.json'
    ```
    
    That expression is byte-identical in 1.7.3 and 1.10.2, so the bug is
    pre-existing. It was simply unreachable for this fixture before: 1.7.3
    had no `node:` specifier support, so `import { resolve } from
    "node:path"` was not statically analyzable and `runtime.json` was never
    relocated. 1.8.0 added `node:path` as an alias of `path`, so the
    reference is now resolved, emitted as an asset, and rewritten to
    `__nccwpck_require__.ab + ...` — which is where the latent bug surfaces.
    
    This PR originally carried the one-line fix (wrap the pathname in
    `decodeURIComponent`) as a `patchedDependencies` entry. **That patch has
    now shipped upstream in 1.10.3**, so this PR bumps to 1.10.3 and
    deletes:
    
    - `patches/@vercel__webpack-asset-relocator-loader@1.10.2.patch`
    - the matching `patchedDependencies` entry in `pnpm-workspace.yaml`
    (that file is now identical to `main` again)
    
    1.10.3 is 1.10.2 plus exactly that change — `diff`ing the two published
    tarballs shows only the version field and the one `requireBase` line
    (plus an explanatory comment). Confirmed empirically:
    `update-fixtures.sh` regenerates every `test/unit/*/output*.js` with
    **zero drift** against the patched-1.10.2 fixtures already in this PR.
    
    ## Also fixed
    
    `update-fixtures.sh` invoked `node node_modules/.bin/jest` for the
    coverage pass. Under pnpm that path is a shell shim rather than a JS
    entry point, so the step crashed with `SyntaxError: missing ) after
    argument list` and never regenerated any `output-coverage.js`. Switched
    both invocations to `node_modules/jest/bin/jest.js`, matching the `test`
    script in `package.json`.
    
    That broken step is why two `output-coverage.js` fixtures had drifted on
    `main` before this PR (`import-meta-cjs` and `ts-json-resolve`). Their
    regenerated output here therefore contains one small change each that is
    unrelated to the relocator. The drift went unnoticed because
    `test/integration.test.js` calls `process.exit(0)` in `afterAll` under
    coverage, so `pnpm test-coverage` exits 0 even when `test/unit.test.js`
    fails.
    
    ## Testing
    
    Re-run on Linux / Node 22.22.2 after the bump to 1.10.3:
    
    - `pnpm test` — **121 passed, 1 failed**. The only failure is
    `binary-require.js` (`Cannot find module './hello.node'`), because `pnpm
    build-test-binary` needs a C++ toolchain that the machine used for this
    re-run does not have, so `test/integration/hello.node` was never
    produced. CI installs `node-gyp` and builds it, and this test passed on
    the previous push.
    - `jest --coverage --globals '{"coverage":true}' test/unit` — **28
    passed**
    - `bash update-fixtures.sh` — regenerates all fixtures, `git status`
    clean afterwards
    - `pnpm install --frozen-lockfile` — succeeds with no config override
    
    The `%20`/`%7E` case is now covered end-to-end rather than by hand:
    running the `create-require-runtime` integration test with
    `TMPDIR="/tmp/tmp dir~short"` reproduces the Windows failure mode on
    Linux. It passes on 1.10.3, and to confirm the check is actually
    sensitive I reverted `decodeURIComponent` in the built loader and
    watched it fail with exactly the CI error:
    
    ```
    Cannot find module '/tmp/tmp%20dir%7Eshort/<hash>/runtime.json'
    ```
    
    Two pre-existing quirks I ran into and confirmed also reproduce on
    `main`, so they are **not** introduced here and are left alone:
    
    - Under `--runInBand`, if `test/watcher.test.js` runs before
    `test/unit.test.js` in the same process, a unit test fails with
    `TypeError: Cannot read properties of undefined (reading 'then')` inside
    webpack's `FileSystemInfo`. Reproduced at 1.7.3.
    - The stale coverage fixtures described above.
    
    ## One thing to flag
    
    1.10.3 was published a few minutes before this update was pushed, and
    `pnpm-workspace.yaml` sets `minimumReleaseAge: 2880` (48h), so a fresh
    resolution of this version is blocked today. I generated the lockfile
    with a one-off `--config.minimumReleaseAge=0` and deliberately did
    **not** add a `minimumReleaseAgeExclude` entry, so the repo's
    supply-chain policy is unchanged. CI is unaffected: both install steps
    in `ci.yml` use `pnpm install --frozen-lockfile`, which skips resolution
    and installs 1.10.3 from the lockfile (verified locally — it succeeds
    with no override). Once 1.10.3 is 48h old the constraint stops mattering
    entirely — hold this PR until then if you'd rather the policy not be
    bypassed at all.
    
    ## Related
    
    - Fixes #1307
    
    Confirmed this bump does address it. That `TypeError: Cannot mix BigInt
    and other types` originates in the relocator's static evaluator
    (`relocate-loader.js.cache.js`), whose `BinaryExpression` handler is
    unguarded in 1.7.3. 1.10.x wraps it in a `try`, with a comment naming
    that exact error, and adds the matching guard for the `UnaryExpression`
    BigInt case.
    
    ---------
    
    Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
    Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
    3 people authored Aug 13, 2026
    Configuration menu
    Copy the full SHA
    cb1f1f0 View commit details
    Browse the repository at this point in the history
Loading