Skip to content

Merge upstream main (f7effdf) and tighten the Baseline cut closure - #40

Merged
uhyo merged 31 commits into
baseline-filterfrom
ccr-871653a7-qnkrs1
Dec 1, 2026
Merged

uhyo merged 31 commits into
baseline-filterfrom
ccr-871653a7-qnkrs1

Conversation

@uhyo

@uhyo uhyo commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Merges upstream microsoft/TypeScript-DOM-lib-generator main up to f7effdf (29 commits) and then fixes a closure bug in the Baseline cuts that the merge brought to light.

1. Merge upstream (bc1a6a8)

Conflicts resolved

  • package-lock.json: takes upstream's tooling bumps (eslint, typescript-eslint, chevrotain, cpx2, …) and keeps the fork's newer data: BCD 8.1.11, @webref/idl 3.88.0, @webref/css 8.8.0, @webref/events 1.29.0, plus compute-baseline.
  • inputfiles/mdn.json / mdn.commit: keeps the fork's newer MDN refresh.
  • baselines/: regenerated from the merged build.

Fork fixes dropped because upstream now fixes the same problems

2. Baseline cut: follow value types only once they are reached (364d28f)

The reference closure keeps any non-Baseline interface that something surviving in the cut still refers to. It counted every dictionary, typedef and callback as a live reference, even ones the cut never emits. As a result, interfaces that only such unused value types referred to were kept as type-only shells. Example: RTCIceCandidatePair was kept in 2022/2023 only because the unused RTCIceCandidatePairEventInit names it, and after the merge it also gained local/remote from upstream's webrtc.kdl patch.

The closure now follows a value type only once something reaches it, the same rule the emitter uses. "Reaches" means a surviving member, a kept shell, a knownTypes.json entry, or the text of a hand-written override in the patch files. Each cut drops about 85–120 unused type-only declarations, all non-Baseline, for example the WebGPU object types, AudioData, ClipboardItem, URLPattern and the WebXR space types. Transferable loses AudioData/MediaStreamTrackHandle in cuts where they aren't Baseline. The full (non-cut) lib is unchanged. There is a CHANGELOG entry under Unreleased.

Note: code that names one of the dropped types directly (e.g. let d: GPUDevice against dom-2022) will stop compiling. Those types were never Baseline in that cut.

Package impact

Every @baseline-types/* cut changes, so expect all of them to be republished. Besides the closure fix, the changes come from upstream:

  • Upstream now removes dictionary members only one browser supports (e.g. toneMapping, several RTC options).
  • New typed Performance.getEntriesByType/getEntriesByName overloads.
  • WebAssembly.Memory is now generic.
  • MutationObserver.observe now requires its options argument.
  • HTMLScriptElement.textContent is back.
  • MDN comment typo fixes.
  • newly-available only: ariaNotify, the WebTransport stream generics, and ReadableStream.from.

Testing

  • npm test passes (build, lint, src/test.ts, unit tests, including a new closure unit test).
  • npm run baseline-years: every file in every cut (2022–2025, newly-available, widely-available) type-checks with tsgo --noEmit. The warnings about unknown types replaced by any are the same as before.
  • The full lib from the second commit is identical to baselines/.

After merging


Generated by Claude Code

NgoQuocViet2001 and others added 30 commits November 3, 2026 14:46
…t#2576)

Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
…soft#2582)

Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
)

Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
…microsoft#2572)

Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
Brings in 29 upstream commits (microsoft/TypeScript-DOM-lib-generator up to
f7effdf), resolving:

- package-lock.json: take upstream's tooling bumps (eslint, typescript-eslint,
  chevrotain, cpx2, ...) while keeping the fork's newer data
  (@mdn/browser-compat-data 8.1.11, @webref/idl 3.88.0, @webref/css 8.8.0,
  @webref/events 1.29.0) and compute-baseline.
- inputfiles/mdn.json, mdn.commit: keep the fork's newer MDN refresh.
- baselines/: regenerated from the merged build.

Upstream now fixes the problems the fork was patching, so the fork's
versions are dropped in favour of upstream's:

- emitter: upstream emits async_sequence as AsyncIterable/Iterable (2511236),
  so drop the fork's overload/method filtering. ReadableStream.from is now
  emitted instead of omitted. (#34)
- SpeechGrammar: upstream keeps it with inputfiles/patches/speech.kdl
  (988acab), so drop our forceKeepAlive entry and the fullLibOnlyKeepAlive
  item (the mechanism stays, now empty). No Baseline cut emits
  SpeechGrammar. (#33)
- NodeRange: upstream moves startContainer/endContainer back onto
  AbstractRange in html.kdl (8859ea0), so drop our duplicate block from
  dom.kdl. Keep the fork-only `removals { interface NodeRange }`, which the
  Baseline cuts still need. (#36)
- HTMLScriptElement.textContent: upstream patches it to be non-nullable in
  html.kdl, so drop the fork's removedTypes.jsonc entry (from #30), which
  otherwise left the patched property without a type and crashed the build.

npm test passes, and every Baseline cut (2022-2025, newly-available,
widely-available) type-checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZB12b7CJATznvfoR8o6P5
The reference closure treated every dictionary, typedef and callback as a
live anchor, even ones the cut never emits. So a non-Baseline interface named
only by such a value type was resurrected as a type-only shell, and it pulled
in further value types and shells. For example, the 2022 cut carried
RTCIceCandidatePair, named only by the unused RTCIceCandidatePairEventInit.
That shell now also gained `local`/`remote` from the upstream webrtc.kdl patch.

Walk value types lazily instead, as the emitter does. A value type is followed
once something reaches it: a surviving member, a resurrected interface, a
knownTypes.json entry (always emitted), or a raw-string mention in the manual
inputs (forced by manuallyReferencedValueTypes). Each cut drops about 85-120
unused type-only declarations. Every cut still type-checks, the degraded-type
warnings are unchanged, and the full lib is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZB12b7CJATznvfoR8o6P5
@uhyo
uhyo merged commit e7ac4a1 into baseline-filter Dec 1, 2026
2 checks passed
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.

8 participants