Skip to content

Commit 4a4a449

Browse files
build(deps): route api-extractor's minimatch to 11 and delete the GHSA-g3hv-75wg-m249 exemption (#38057)
Fixes #36160 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户无感:只改依赖覆盖规则、锁文件和安全扫描豁免清单,任何包的发布内容都不变。 - 为什么做:去掉依赖安全扫描里那条 12 月 21 日到期的匹配库漏洞豁免,让豁免清单回到零条。 - 出错会怎样:最可能是安全扫描或某个类型打包步骤在持续集成里变红,合并前就能看到;合并后出问题直接撤回这个改动即可。 - 要你做什么:无。 ## What changes The follow-up to #38049 (merged as 39d611d), which moved the five parents that accept minimatch 11 and kept exceljs's glob chain on its own minimatch majors. The seat chose option A for the last holder. Every reading below was taken on this PR's head, 84e6e1c, rebased onto 39d611d. 1. **`pnpm-workspace.yaml`: a parent-scoped override, `@microsoft/api-extractor>minimatch` to `^11.0.9`.** `@microsoft/api-extractor` declares `minimatch` `10.2.3` exact (7.58.2 here; the newest release, 7.60.2, still pins it). It was the last minimatch 10.x copy in the lockfile. The comment beside the line gives the reason, and says to delete the line once an api-extractor release drops its exact 10.x pin. - It is in the graph only as an auto-installed optional peer of `tsup`, `unplugin-dts` and `vite-plugin-dts`. Those load it lazily, and only for `bundleTypes`, `rollupTypes` or `experimentalDts`, which no build here enables (evidence 1 below). - Its one call into minimatch is the named `minimatch()` export, in `Collector.js`, which minimatch 11 keeps. The smoke below runs that exact call. - The `pnpm-workspace.yaml` selector-shape rule governs `pkg@range` floors. This key names a parent and has no version range, so there is no bound to place. The exact-target rule covers packages whose export surface we compile against, and minimatch is not one of them, so the target is `^`. - The comment over the per-major minimatch floors now says the 6.0.0 to 11.0.0 floor holds no copy today. 2. **`osv-scanner.toml`: the GHSA-g3hv-75wg-m249 exemption is deleted.** It was the only entry, so the ledger is at its intended steady state of zero exemptions. Per convention 3, removing an exemption may ride with the fix. The header and template are untouched. 3. **`pnpm-lock.yaml`**, regenerated with pnpm 10.31.0. The only change is that api-extractor's `minimatch` moves from 10.2.6 to 11.0.9, `minimatch@10.2.6` drops out of the lockfile, and the `overrides` header gains the new line. No published package changes, so this PR carries no changeset. Every manifest that moved for #36160 moved in #38049. When `@microsoft/api-extractor` ships a release without the exact 10.x pin, delete the override line. That needs no card. ## Tests <details><summary>Evidence 1: no build here enables an api-extractor path</summary> - `git grep -n -E 'rollupTypes|bundleTypes|experimentalDts|api-extractor|apiExtractor|ExtractorConfig|api-extractor\.json'` outside the lockfile and changelogs: 6 hits. Five are the new comment and override in `pnpm-workspace.yaml`. One is a doc comment in `packages/spec/scripts/lib/file-description.ts` that says no typedoc or api-extractor reads the field it describes. - `git grep` for `experimental-dts`, `experimentalDts` or `rollup-types` in any `package.json`, `.ts`, `.mts`, `.js`, `.mjs` or `.cjs`: 0 hits. No tracked `api-extractor.json` exists. - The 41 files that reference `vite-plugin-dts` or `unplugin-dts` pass `dts()` options from this set only: `aliasesExclude`, `compilerOptions`, `exclude`, `include`, `insertTypesEntry`, `outDir`, `tsconfigPath`. The one helper that spreads into `dts()` (`ui/scripts/vite-dts-explicit-extensions.ts`) adds only `beforeWriteFile` and `afterBuild`. - `unplugin-dts` imports api-extractor with a dynamic `import()` inside its rollup step only; `tsup` loads it only for `experimentalDts`. </details> <details><summary>Evidence 2: OSV-Scanner v2.5.0 (the workflow's scanner), offline npm database freshly downloaded</summary> - This head, `--offline-vulnerabilities --download-offline-databases --config` pointing at this head's `osv-scanner.toml` (zero `[[IgnoredVulns]]` entries; the only match for that string is the commented template, and `g3hv` occurs 0 times): `No issues found`, 1698 packages scanned. - This head with no ledger at all: `No issues found`. - `node scripts/check-osv-exemptions.mjs`: exit 0, "osv-scanner.toml holds zero OSV exemptions (the intended steady state)". `--self-test`: exit 0. </details> <details><summary>Evidence 3: no minimatch 10.x copy in pnpm-lock.yaml</summary> - `grep -c -E 'minimatch@10\.|minimatch: 10\.' pnpm-lock.yaml` gives 0. - Holders by resolved version: 3.1.5 for `glob` 7.2.3; 5.1.9 for `readdir-glob` 1.1.3; 11.0.3 for `@oclif/core` 5.1.12, `@typescript-eslint/typescript-estree` 8.74.0 and `glob` 14.0.3; 11.0.9 for `eslint` 10.15.0, `@eslint/config-array` 0.23.6, `@ts-morph/common` 0.29.1 and `@microsoft/api-extractor` 7.58.2. </details> <details><summary>api-extractor on minimatch 11, and the dts builds</summary> - A direct api-extractor 7.58.2 run on a fixture package resolved `minimatch@11.0.9`. The fixture's `bundledPackages: ["foo-*"]` against three declared dependencies drives the `Collector.js` glob branch, the one `minimatch()` call. With a d.ts rollup enabled: `succeeded: true`, 0 errors, 2 warnings (`ae-missing-release-tag` on the fixture's untagged exports), and the rolled file carries the fixture's API. - On 84e6e1c, `turbo run build` over the `@objectstack/cli...` and `@objectstack/rest...` closures, `@objectstack/metadata-core`, `@object-ui/plugin-markdown...` and the i18n extract packages, under the verify lock: `VERDICT command-exit 0`, Tasks 78 successful of 78, 3 cached. Its tsup builds emitted their declarations, with `check-dts-emitted` passing for metadata-core. The vite builds ran unplugin-dts: plugin-markdown printed "Declaration files built", as did the `@object-ui` packages in its closure. - `pnpm check:override-consistency`: exit 0. Its consumer census reports the new key as having 0 consumers, which is a report, not a failure; see Acceptance notes. </details> <details><summary>Derived gate families (dispatch-gates.mjs --commands), on head 84e6e1c</summary> The change set is 3 paths against merge base 39d611d (`osv-scanner.toml`, `pnpm-lock.yaml`, `pnpm-workspace.yaml`), giving 25 derived families. All 25 were run on head 84e6e1c, with exit codes captured before any pipe, and all 25 exited 0. Among them: `check-osv-exemptions.mjs` and its `--self-test`, `check:override-consistency`, `check:vendor-export-contract-resolve`, `check:dual-build-cjs-loads`, `check:changeset-fixed`, `check:nul-bytes` and `osv-base-relative.mjs --self-test`. The `--ran` reconciliation reports 25 accounted for, 25 run, 0 NOT-MEASURED and 0 UNRUN. Before the push, `overlap-check.mjs` returned VERDICT clean exit 0 against origin/main 39d611d and #38043. </details> ## Acceptance notes - `check:override-consistency` reads an override key as `name@selector`, split at its last `@`. It does not parse a `parent>child` key, so its report-only consumer census lists `@microsoft/api-extractor>minimatch` as having 0 consumers, although api-extractor consumes it. That is a report, never a failure, and the line must not be read as "safe to tidy". - Once an api-extractor release accepts minimatch 11, the override line comes out in an ordinary dependency PR, with no card. ## Verification Read first: 1. `pnpm-workspace.yaml`: the new `@microsoft/api-extractor>minimatch` line and its comment. 2. `osv-scanner.toml`: the deleted entry, and that the header and template are unchanged. 3. `pnpm-lock.yaml`: the `@microsoft/api-extractor@7.58.2` snapshot's `minimatch: 11.0.9`. Two-minute check: `grep -c -E 'minimatch@10\.|minimatch: 10\.' pnpm-lock.yaml` prints `0`, and `node scripts/check-osv-exemptions.mjs` prints that the ledger holds zero exemptions. --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibzpqH1nQTsbGckLspg)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent f72f335 commit 4a4a449

3 files changed

Lines changed: 15 additions & 19 deletions

File tree

‎osv-scanner.toml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,3 @@
8484
#
8585
# Verify locally: node scripts/check-osv-exemptions.mjs
8686
# Prove the check: node scripts/check-osv-exemptions.mjs --self-test
87-
88-
[[IgnoredVulns]]
89-
id = "GHSA-g3hv-75wg-m249"
90-
ignoreUntil = 2026-12-21
91-
reason = "https://github.com/advisories/GHSA-g3hv-75wg-m249 — the only patched minimatch is 11.0.1, a breaking major, and two holders of a 10.x copy in pnpm-lock.yaml have no release that accepts it: @microsoft/api-extractor (newest 7.60.1 pins 10.2.3 exact) and exceljs (newest 4.4.0 still declares archiver ^5 and unzipper ^0.10, whose glob 7.2.3 and readdir-glob 1.1.3 the pnpm-workspace.yaml override lifts to 10.2.6), while eslint, @eslint/config-array, @typescript-eslint/typescript-estree, @oclif/core and @ts-morph/common accept 11 in their newest releases but are locked on older ones that still take 10.2.6 and move only in a dependency bump; remove when no 10.x copy is left in the lockfile."

‎pnpm-lock.yaml‎

Lines changed: 2 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,22 @@ overrides:
329329
# so a 3.x or 5.x holder is safe on its own major and only a lift into 10.x
330330
# exposes it. glob 7.2.3 (^3.1.1) and readdir-glob 1.1.3 (^5.1.0), both
331331
# under exceljs's archiver 5 and unzipper 0.10, therefore stay on their own
332-
# majors. Everything from 6.0.0 still collapses onto 10.x, which today is
333-
# only @microsoft/api-extractor's exact 10.2.3 (an optional peer of tsup and
334-
# unplugin-dts that no build here enables); that holder is what the
335-
# osv-scanner.toml exemption for GHSA-g3hv-75wg-m249 still covers.
332+
# majors. The 6.0.0 to 11.0.0 floor holds no copy today; it stays as the
333+
# floor for a holder that arrives later, which the OSV gate would then flag.
336334
'minimatch@<4.0.0': '^3.1.4'
337335
'minimatch@>=4.0.0 <6.0.0': '^5.1.8'
338336
'minimatch@>=6.0.0 <11.0.0': '^10.2.3'
337+
# @microsoft/api-extractor pins minimatch 10.2.3 EXACT (7.58.2 here, and
338+
# still in 7.60.2), the last 10.x copy GHSA-g3hv-75wg-m249 reaches. It is
339+
# only an auto-installed optional peer of tsup, unplugin-dts and
340+
# vite-plugin-dts, which load it lazily and only for bundleTypes,
341+
# rollupTypes or experimentalDts, and no build here enables any of them.
342+
# Its one call into minimatch is the named `minimatch()` export, which v11
343+
# keeps, so the parent-scoped route to 11 changes nothing a build runs. It
344+
# names a parent, not a version range, so the selector-shape rule above has
345+
# no bound to place. DELETE this line once an api-extractor release drops
346+
# its exact 10.x pin and this lockfile takes it.
347+
'@microsoft/api-extractor>minimatch': '^11.0.9'
339348
'tar@>=2.0.0 <8.0.0': '^7.5.11'
340349
'form-data@<5.0.0': '>=4.0.6'
341350
'undici@>=7.23.0 <8.0.0': '^7.30.1'

0 commit comments

Comments
 (0)