Repository navigation
Commit 4a4a449
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 332 | + | |
| 333 | + | |
336 | 334 | | |
337 | 335 | | |
338 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
339 | 348 | | |
340 | 349 | | |
341 | 350 | | |
| |||
0 commit comments