Migrate null type unions to anyOf in strict schemas (#5991) - #6362
Merged
hyperupcall merged 3 commits intoSep 19, 2026
Merged
Conversation
shiv07-blip
requested review from
hyperupcall and
madskristensen
as code owners
September 15, 2026 19:04
Contributor
|
This has a merge conflict. |
Contributor
Author
|
@madskristensen Okay, i am working on it. |
Contributor
Author
|
@madskristensen , please review now and proceed |
hyperupcall
reviewed
Sep 16, 2026
hyperupcall
left a comment
Member
There was a problem hiding this comment.
Thanks. Had a question about these changes.
hyperupcall
approved these changes
Sep 19, 2026
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.
Summary
Replaces
type: ["X", "null"]unions with explicitanyOfbranches in strict schemas.Ajv allows two-element null unions in strict mode, so these can pass without being caught. This change makes the nullable types explicit:
type: ["X", "null"]→anyOf: [{ "type": "X" }, { "type": "null" }]Type-specific keywords such as
items,properties,minLength,format, andadditionalPropertiesare moved into the non-null branch. Annotations likedescription,default, andtitleremain at the definition level.This batch updates schemas with 1–5 null unions each, including the
abc-supply-planschemas,docker-bake,git-cliff,github-cli-config,hugo,jekyll,pubspec,rumdl, and others.Files already covered by other open PRs are left untouched.
Validation
npm run prettiernpm run typechecknpm run eslintgit diff --checknode ./cli.js checknode ./cli.js coverageImplements #5991.