Repository navigation
Fix weekly update build failure (SpeechGrammar) and apply this week's data refresh - #32
Merged
Merged
Conversation
The 2026-11-07 weekly update failed with "Unknown DOM type: SpeechGrammar". @mdn/browser-compat-data 8.1.8 records unflagged Firefox 160 support for the Web Speech API, so SpeechGrammarList (unprefixed in Chrome 139 and Firefox) now passes the 2-engine bar. SpeechGrammar itself does not: Chrome only exposes its interface object as webkitSpeechGrammar. The interface was dropped while SpeechGrammarList.item() still returned it. Keep SpeechGrammar alive in the full lib through a new forceKeepAliveFullLibOnly list. Baseline cuts ignore it: their reference closure already resurrects referenced interfaces as type-only shells, and forcing it there would emit an empty, non-Baseline SpeechGrammar (with a constructor) into every cut. Also includes this week's data refresh that the job could not produce (BCD 8.1.7 -> 8.1.8, MDN metadata, regenerated baselines/), since the fix and the new data depend on each other. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KZB12ZE9CatFpvEaCEdU6Y
Move the "ignore in Baseline cuts" exception out of keep-alive.ts (an upstream file, previously identical to upstream) into the fork-only bcd/baseline.ts. keep-alive.ts now carries only the plain forceKeepAlive entry upstream would add itself, so a future upstream merge of the same fix resolves trivially. Generated output (full lib and every cut) is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KZB12ZE9CatFpvEaCEdU6Y
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.
Why the weekly update failed
Weekly update run #21 crashed in
npm run build:The only dependency that changed was
@mdn/browser-compat-data8.1.7 → 8.1.8. That version records unflagged Firefox 160 support for the Web Speech API:SpeechGrammarListis unprefixed in Chrome 139+ and Firefox 160+, so it now meets the two-engine rule and is kept.SpeechGrammardoesn't meet it, because Chrome only exposes it aswebkitSpeechGrammar. It's dropped, butSpeechGrammarList.item()still returns it.The generator has no fallback for a return type that points at a removed interface, so it crashes. Upstream hasn't hit this yet because it's still on BCD 8.0.x.
Fix
src/build/bcd/keep-alive.ts: addSpeechGrammar: []toforceKeepAlive. This is the plain entry upstream would add itself, and it's the only change to this file.src/build/bcd/baseline.ts(fork-only): newfullLibOnlyKeepAliveset that Baseline cuts ignore. Cuts don't need the entry, becauseapplyReferenceClosurealready resurrects any interface a kept API still references. Forcing it into the cuts would emit an empty, non-BaselineSpeechGrammarwith a constructor in every package.src/build/bcd.ts: check that set when deciding whether aforceKeepAliveentry applies.Data refresh
This PR also includes the refresh the job couldn't produce:
package-lock.json(BCD 8.1.8),inputfiles/mdn.json/mdn.commit, and the regeneratedbaselines/. The fix and the new data have to land together. On the old data, the fix would add a straySpeechGrammarto the full lib.The full lib now also gains the rest of the Web Speech API (
SpeechRecognitionand related types), which is where most of the added lines come from.Verification (local)
npm test(build, lint, baseline comparison, unit tests) andnpx tsgopass.npm run baseline-yearsandnpm run baseline-packagessucceed, and no cut mentionsSpeechGrammar.forceKeepAlivein cuts") and rejected it. It changed existing cut output, dropping theContactAddressmembers and theCSSStylePropertiesconstructor.@baseline-types/dom-*packages because of the data changes.Generated by Claude Code