feat(support-matrix): add nodeOmit to drop EOL node majors from the card#499
feat(support-matrix): add nodeOmit to drop EOL node majors from the card#499Brooooooklyn wants to merge 2 commits into
Conversation
The Node.js card derives its pills from the `engines` range, so `>=25` renders a `25` pill even after Node 25 reaches EOL. `nodeOmit` (a comma list of majors, sanitized like `nodeTested`) drops specified majors from the pills entirely — no pill and no `excluded` mention — while `engines` is still rendered verbatim, so the declared range is never concealed. Omission is applied before coverage/gap accounting and the headline now spans the surviving pills, so dropping the floor or ceiling major no longer leaves a dangling `→ vN` endpoint. Threaded through the query parser, resolver, inverse builder, and the /support-matrix URL-builder, with unit + boundary tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48913fc61a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // An explicitly omitted (e.g. EOL) major is dropped whole — before any | ||
| // coverage/gap accounting — so it leaves no pill AND no `excluded` mention, | ||
| // whether or not the range covered it. It simply vanishes from the card. | ||
| if (omit.has(major)) continue |
There was a problem hiding this comment.
Recompute excluded gaps after omitting endpoint majors
When nodeOmit removes the original floor or ceiling, this skip hides the pill but the loop still accounts gaps across the original floor..ceiling span, so excluded prose can refer to majors outside the surviving headline. For example, engines=^22 || ^26&nodeOmit=26 renders a v22 headline with only the 22 pill, but still says Node 23, 24, 25 are excluded; omission needs to shrink the gap-accounting span to the surviving pills as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 59f2a5f. Gaps are now buffered and only flushed once a later surviving pill bounds them on both sides; any uncovered run trailing past the final pill is discarded. So ^22 || ^26 with nodeOmit=26 reports headline v22 and excluded: null (23/24/25 sit beyond the surviving span), and ^22 || ^24 || ^26 omit 26 lists only 23. Added two regression tests covering both.
Reviewer #499: `excluded` was computed across the original floor..ceiling span, so omitting an endpoint major (e.g. `^22 || ^26` with 26 dropped) left `excluded` listing majors that sit beyond the last surviving pill — `v22` headline but `excluded: 23, 24, 25`. Buffer uncovered majors and flush them only once a later pill bounds the gap on both sides; discard any trailing run past the final pill. The excluded span now shrinks together with the headline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Adds a
nodeOmitquery param to the support-matrix badge service: a comma list of Node majors to drop from the Node.js card's pills, even when theenginesrange still permits them (e.g. an EOL runtime like Node 25 under>=25).nodeOmit=25turns pills22.20+ · 24.12+ · 25 · 26into22.20+ · 24.12+ · 26.enginesstring is still rendered verbatim, so the declared range is never hidden.nodeTested(whole-digit integers only; junk dropped).Consistency
Omission is applied before coverage/gap accounting, and the headline now spans the surviving pills, so:
excludedmention — it vanishes from the card;>=22+nodeOmit=26still showedv22 → v26with no26pill; now it retracts tov22 → v25).Threaded through
lib/support-matrix/{node,query,resolve}.ts,routes.test.ts, and the/support-matrixURL-builder (components/support-matrix-builder/index.tsx).Tests
vitest— node/query/resolve/routes suites, including boundary cases (omit floor, ceiling, all-covered majors, and an already-excluded major). Full suite: 367 passing.Not included
Per-query edge caching for
/support-matrix.{png,svg}is out of scope here — the void-platform direct-route cache key strips the query string, so it needs a platform-side fix (the static-candidate cache key), tracked separately.🤖 Generated with Claude Code