Skip to content

fix(core/caniuse): warn when the header list is missing - #5514

Open
Aschenbath wants to merge 1 commit into
speced:mainfrom
Aschenbath:fix/caniuse-missing-header
Open

Aschenbath wants to merge 1 commit into
speced:mainfrom
Aschenbath:fix/caniuse-missing-header

Conversation

@Aschenbath

Copy link
Copy Markdown

Closes #5370

When caniuse is configured but .head dl is absent, report a warning and return before fetching support data or registering the save callback. The regression covers missing headers and missing definition lists with both removeOnSave settings, plus disabled caniuse and a valid header. This follows up on the regression coverage requested in the closed, unmerged #5374.

Lint, all three profile builds, 94 unit tests, 2 builder tests and 4 headless tests passed on Windows with Chrome. All 1,162 integration tests passed with a local 15-second Jasmine async timeout. Two runs with the default 5-second timeout failed on asynchronous document loads; those logs are preserved in the validation evidence. No timeout changes are included in this PR.

Written with AI: OpenAI Codex generated and reviewed the code and tests and ran the validation.

Proof: pnpm exec karma start tests/unit/karma.conf.cjs --single-run --browsers ChromeHeadless --grep "Core - Can I Use header" failed on base 2aac986a3ceb9708ea80c5307fca57a4c91ddd99 with the new test file: four missing-header cases produced no warning, while both controls passed. The same command passed all six tests on 161e3ccd162f34b16663ed57ba2512f243f3aee3. Before log · After log.

The same document silently omits the table before the fix and shows a warning afterwards. Its caniuse request count falls from one to zero.

Before: no warning

After: missing-header warning

This branch has not been deployed

No deployments
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.

core/caniuse silently drops the browser-support table when .head dl is missing

1 participant