Skip to content

deps: update dependencies to patched glob and minimatch versions - #10405

Open
jeffkl wants to merge 14 commits into
latestfrom
deps/patched-glob-minimatch
Open

jeffkl wants to merge 14 commits into
latestfrom
deps/patched-glob-minimatch

Conversation

@jeffkl

@jeffkl jeffkl commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Updates npm and affected workspaces to the patched glob/minimatch versions and current upstream dependency releases. Regenerates the lockfile, bundled dependencies, and DEPENDENCIES.md.

  • glob@14.0.7 and minimatch@11.0.10 (including direct workspace requirements)
  • Updates the compatible @npmcli, registry, pacote, and Sigstore dependencies from this rollout
  • One deps: <package>@<version> commit per dependency

Validation:

  • node . run resetdeps
  • node . run lint
  • node . test (passed; Codespaces temp directory set to workspace filesystem to avoid a cross-device rename in one test)
  • node scripts/git-dirty.js
  • Packed npm tarball inspected: bundled glob is 14.0.7 and minimatch is 11.0.10

Tracking: github/npm#16349

Related: #10299

Advisories

jeffkl and others added 14 commits December 2, 2026 22:43
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e57733a-b3c1-4df3-aee7-3d3010798bf8
@jeffkl
jeffkl requested a review from a team as a code owner December 2, 2026 22:53
@jeffkl
jeffkl requested a max review from Copilot December 2, 2026 23:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Critical literal-caret and numeric-range matching regressions can cause unrelated files to be published and explicitly excluded workspace packages to be included.

No open issues 🎉

What changed in this PR

Updates npm CLI and its workspaces to patched glob/minimatch releases, alongside related dependency and bundled-artifact updates.

Changes:

  • Upgrade glob to 14.0.7 and minimatch to 11.0.10.
  • Refresh npmcli, registry, pacote, Sigstore, and TUF dependencies.
  • Regenerate bundled dependencies, tracking rules, and dependency documentation.
File Description
workspaces/​libnpmversion/​package.json Update run-script requirement.
workspaces/​libnpmteam/​package.json Update registry-fetch requirement.
workspaces/​libnpmsearch/​package.json Update registry-fetch requirement.
workspaces/​libnpmpublish/​package.json Update publishing dependencies.
workspaces/​libnpmpack/​package.json Update packing dependencies.
workspaces/​libnpmorg/​package.json Update registry-fetch requirement.
workspaces/​libnpmexec/​package.json Update execution dependencies.
workspaces/​libnpmdiff/​package.json Update minimatch and pacote requirements.
workspaces/​libnpmaccess/​package.json Update registry-fetch requirement.
workspaces/​config/​package.json Update workspace-discovery dependencies.
workspaces/​arborist/​package.json Update matching and installation dependencies.
package.json Update root dependency requirements.
node_modules/​tuf-js/​package.json Bundle TUF client 6.0.3.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​package.json Bundle nested models 5.0.3.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​LICENSE Include nested models license.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​utils/​verify.js Use scheme-specific signature hashes.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​utils/​types.js Include nested utility module.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​utils/​oid.js Correct zero-valued OID encoding.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​utils/​key.js Extend key schemes and validation.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​utils/​index.js Include nested utility exports.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​utils/​guard.js Include nested validation helpers.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​timestamp.js Include nested timestamp model.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​targets.js Include nested targets model.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​snapshot.js Include nested snapshot model.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​signature.js Include nested signature model.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​root.js Include nested root metadata model.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​role.js Include nested delegation models.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​metadata.js Include nested metadata verification.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​key.js Include nested key model.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​index.js Include nested model exports.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​file.js Include nested file-verification models.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​error.js Include nested model errors.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​delegations.js Reject duplicate delegated roles.
node_modules/​tuf-js/​node_modules/​@tufjs/​models/​dist/​base.js Validate expiration-date parsing.
node_modules/​tuf-js/​dist/​utils/​tmpfile.js Add disposable temporary files.
node_modules/​tuf-js/​dist/​updater.js Reverify cached delegated metadata.
node_modules/​tuf-js/​dist/​fetcher.js Update download resource cleanup.
node_modules/​path-scurry/​package.json Bundle path-scurry 3.0.3.
node_modules/​pacote/​package.json Bundle pacote 22.0.2.
node_modules/​npm-registry-fetch/​package.json Bundle registry-fetch 20.0.2.
node_modules/​npm-profile/​package.json Bundle npm-profile 13.0.2.
node_modules/​npm-packlist/​package.json Update file-selection dependencies.
node_modules/​npm-packlist/​node_modules/​ignore-walk/​package.json Update nested ignore-walk and minimatch.
node_modules/​minimatch/​package.json Bundle minimatch 11.0.10 and new matcher.
node_modules/​minimatch/​dist/​esm/​unescape.js Handle escaped leading exclamation marks.
node_modules/​minimatch/​dist/​esm/​escape.js Escape leading comment and negation characters.
node_modules/​minimatch/​dist/​esm/​brace-expressions.js Remove replaced class parser.
node_modules/​minimatch/​dist/​commonjs/​unescape.js Mirror ESM unescaping changes.
node_modules/​minimatch/​dist/​commonjs/​escape.js Mirror ESM escaping changes.
node_modules/​minimatch/​dist/​commonjs/​brace-expressions.js Remove replaced CommonJS class parser.
node_modules/​make-fetch-happen/​package.json Bundle fetch client 16.0.2.
node_modules/​init-package-json/​package.json Bundle initializer 9.0.1.
node_modules/​glob/​package.json Bundle glob 14.0.7.
node_modules/​glob/​dist/​esm/​walker.js Update traversal, cancellation, and result collection.
node_modules/​glob/​dist/​esm/​processor.js Adopt matcher objects and linked caches.
node_modules/​glob/​dist/​esm/​pattern.js Update matcher detection and UNC handling.
node_modules/​glob/​dist/​esm/​ignore.js Update ignore options and root handling.
node_modules/​glob/​dist/​esm/​has-magic.js Simplify pattern iteration.
node_modules/​glob/​dist/​esm/​glob.js Update pattern setup and walker results.
node_modules/​glob/​dist/​commonjs/​walker.js Mirror ESM walker changes.
node_modules/​glob/​dist/​commonjs/​processor.js Mirror ESM processor changes.
node_modules/​glob/​dist/​commonjs/​pattern.js Mirror ESM pattern changes.
node_modules/​glob/​dist/​commonjs/​ignore.js Mirror ESM ignore changes.
node_modules/​glob/​dist/​commonjs/​has-magic.js Mirror pattern-iteration simplification.
node_modules/​glob/​dist/​commonjs/​glob.js Mirror ESM glob setup changes.
node_modules/​cacache/​package.json Update bundled cache and glob requirements.
node_modules/​@sigstore/​tuf/​package.json Bundle Sigstore TUF 5.0.2.
node_modules/​@sigstore/​sign/​package.json Bundle signing library 5.1.1.
node_modules/​@sigstore/​sign/​dist/​witness/​tlog/​client.js Change conflict-fetching default.
node_modules/​@sigstore/​sign/​dist/​identity/​ci.js Add Buildkite token provider.
node_modules/​@sigstore/​protobuf-specs/​package.json Bundle protobuf specs 0.5.2.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​sigstore_verification.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​sigstore_trustroot.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​sigstore_rekor.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​sigstore_monitor.js Add generated monitor configuration models.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​sigstore_common.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​sigstore_bundle.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​rekor/​v2/​verifier.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​rekor/​v2/​hashedrekord.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​rekor/​v2/​entry.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​google/​protobuf/​timestamp.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​google/​protobuf/​descriptor.js Add generated 2026 edition enums.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​google/​protobuf/​any.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​google/​api/​field_behavior.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​events.js Refresh generator-version comments only.
node_modules/​@sigstore/​protobuf-specs/​dist/​__generated__/​envelope.js Refresh generator-version comments only.
node_modules/​@sigstore/​bundle/​package.json Update bundle and protobuf requirements.
node_modules/​@npmcli/​run-script/​package.json Bundle run-script 11.0.1.
node_modules/​@npmcli/​package-json/​package.json Update manifest library and glob requirement.
node_modules/​@npmcli/​metavuln-calculator/​package.json Update vulnerability-calculation dependencies.
node_modules/​@npmcli/​map-workspaces/​package.json Update workspace matching dependencies.
node_modules/​@isaacs/​nonrecursive-glob-match/​package.json Add nonrecursive matcher dependency.
node_modules/​@isaacs/​nonrecursive-glob-match/​LICENSE.md Include matcher license.
node_modules/​@isaacs/​nonrecursive-glob-match/​dist/​esm/​parse-class.js Add ESM character-class parser.
node_modules/​@isaacs/​nonrecursive-glob-match/​dist/​esm/​package.json Declare ESM module format.
node_modules/​@isaacs/​nonrecursive-glob-match/​dist/​esm/​numeric-range.js Add compact numeric-range matching.
node_modules/​@isaacs/​nonrecursive-glob-match/​dist/​esm/​index.min.js Add minified ESM matcher.
node_modules/​@isaacs/​nonrecursive-glob-match/​dist/​commonjs/​parse-class.js Add CommonJS character-class parser.
node_modules/​@isaacs/​nonrecursive-glob-match/​dist/​commonjs/​package.json Declare CommonJS module format.
node_modules/​@isaacs/​nonrecursive-glob-match/​dist/​commonjs/​numeric-range.js Add CommonJS numeric-range support.
node_modules/​@isaacs/​nonrecursive-glob-match/​dist/​commonjs/​index.min.js Add minified CommonJS matcher.
node_modules/​.gitignore Track new matcher and nested models.
DEPENDENCIES.md Add matcher dependency-graph edge.

Review effort: Max

@nkolev92

nkolev92 commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

In package.json, the files field tells npm which files to put in the package. A glob is a filename pattern: * means “any text,” and !(...) means “anything except this pattern.” This example uses a nested pattern:

"files": ["*!(a|*!(b))"]

With files named b and ab:

  • Before this PR, npm pack --dry-run included b and ab.
  • With this PR, it includes only package.json; b and ab are missing.

The new matcher mishandles the nested pattern and wrongly rejects those files. That can make npm pack publish a package missing files.

Minimal minimatch reproduction (run in each checkout):

node -e "const { minimatch } = require('minimatch'); for (const f of ['b', 'ab']) console.log(f, minimatch(f, '*!(a|*!(b))'))"

With minimatch 10.2.5 (before), both results are true. With 11.0.10 (this PR), both are false.

End-to-end regression test (added to test/lib/commands/pack.js):

t.test('packs files matching nested extglobs', async t => {
  const testDir = t.testdir({
    project: {
      'package.json': JSON.stringify({
        name: 'test-package',
        version: '1.0.0',
        files: ['*!(a|*!(b))'],
      }),
      b: 'b',
      ab: 'ab',
    },
  })

  const result = spawnSync(process.execPath, [
    require.resolve('../../../bin/npm-cli.js'),
    'pack',
    '--dry-run',
    '--json',
    '--ignore-scripts',
    '--cache', path.join(testDir, 'cache'),
    '--userconfig', path.join(testDir, 'user.npmrc'),
    '--globalconfig', path.join(testDir, 'global.npmrc'),
    '--update-notifier=false',
  ], {
    cwd: path.join(testDir, 'project'),
    encoding: 'utf8',
    env: Object.fromEntries(
      Object.entries(process.env)
        .filter(([key]) => !key.toLowerCase().startsWith('npm_config_'))
    ),
  })

  t.equal(result.status, 0, result.stderr)
  const { files } = JSON.parse(result.stdout)['test-package']
  t.same(files.map(file => file.path).sort(), ['ab', 'b', 'package.json'])
})

The test passes with the base dependencies and fails with this PR’s dependencies.

@nkolev92

nkolev92 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

I don't actually think this is a super common scenario, so we may just be able to say, file an issue with minimatch and get it fixed there.

@ThibautMelen

Copy link
Copy Markdown

One more advisory for the list: GHSA-c6wh-w8c3-cv3g was published on 2026-12-04, after this PR opened. It covers glob <= 14.0.5 (patched in 14.0.6), so it also applies to the glob 13.0.6 bundled in npm 12.2.3. The glob 14.0.7 here clears it.

npm 11.21.3 bundles the same glob 13.0.6. Some packages pin npm 11 exactly (for example @node-red/registry 5.0.10 depends on npm@11.21.2), so they only get the fix through a release/v11 backport of this update.

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.

[BUG] npm 12.2.2 bundles glob and minimatch versions affected by October 2026 advisories

4 participants