Repository navigation
Merge upstream main (f7effdf) and tighten the Baseline cut closure - #40
Merged
Merged
Conversation
…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>
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merges upstream microsoft/TypeScript-DOM-lib-generator
mainup 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/idl3.88.0,@webref/css8.8.0,@webref/events1.29.0, pluscompute-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
never<any>(e.g. ReadableStream.from) #34 async_sequence: upstream now emits it asAsyncIterable | Iterable(2511236), so the fork's filtering inemitter.tsis removed.ReadableStream.fromis now included in the output instead of being skipped.inputfiles/patches/speech.kdl(988acab). The fork'sforceKeepAliveentry and itsfullLibOnlyKeepAliveitem are removed; thefullLibOnlyKeepAlivemechanism itself stays, now empty. No cut containsSpeechGrammar.AbstractRange/Range/StaticRangepatch, but inhtml.kdl(8859ea0). The fork's duplicate block indom.kdlis removed. The fork-onlyremovals { interface NodeRange }stays, because the cuts still need it.HTMLScriptElement.textContent: upstream now patches this property inhtml.kdl. The fork had removed it inremovedTypes.jsonc(added in 🤖 Weekly update: refresh web spec data #30), and the two together crashed the build, so the fork's entry is removed.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:
RTCIceCandidatePairwas kept in 2022/2023 only because the unusedRTCIceCandidatePairEventInitnames it, and after the merge it also gainedlocal/remotefrom upstream'swebrtc.kdlpatch.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.jsonentry, 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,URLPatternand the WebXR space types.TransferablelosesAudioData/MediaStreamTrackHandlein 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: GPUDeviceagainstdom-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:toneMapping, several RTC options).Performance.getEntriesByType/getEntriesByNameoverloads.WebAssembly.Memoryis now generic.MutationObserver.observenow requires itsoptionsargument.HTMLScriptElement.textContentis back.ariaNotify, the WebTransport stream generics, andReadableStream.from.Testing
npm testpasses (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 withtsgo --noEmit. The warnings about unknown types replaced byanyare the same as before.baselines/.After merging
mainto upstream f7effdf (per the README's sync instructions).never<any>(e.g. ReadableStream.from) #34 can be closed. Keep Track: drop the NodeRange patch in dom.kdl once browsers/BCD ship NodeRange #36 open until BCD addsapi.NodeRange.Generated by Claude Code