fix(core): accept boolean attributes in headTags config validation #12238
Merged
slorber merged 8 commits intoJul 9, 2026
Conversation
…#12120) The example artifacts were regenerated for the v3.10.1 maintenance release, which reverted the engine field from '>=24.14' back to '>=20.0' and left the sandbox node version at '18'. Update the examples to reflect current maintainer intent: - Bump engines.node from '>=20.0' to '>=24.14' (reapplies PR facebook#11914 change overwritten by PR facebook#11985) - Bump sandbox.config.json node from '18' to '24' (syncs with generateExamples.js updated in PR facebook#12080)
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
slorber
requested changes
Jul 9, 2026
slorber
left a comment
Collaborator
There was a problem hiding this comment.
don't modify examples, that's unrelated to the PR topic: one thing at a time
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.
Fixes #12233
Summary
The
headTagsconfig validation rejects boolean HTML attribute values likeasync: true, even though the TypeScript types and renderer already support them.Root cause
The attribute pattern in
configValidation.tsusesJoi.string(), which only accepts string values. This was introduced in the originalheadTagsPR and was not updated when boolean support was added to the types and renderer.Solution
Change the pattern from
Joi.string()toJoi.alternatives().try(Joi.string(), Joi.boolean()), matching the existing pattern used forstorage.namespacein the same file.Testing
Updated the existing validation test to reject non-string/non-boolean values (e.g., numbers) and added a regression test confirming boolean attributes like
async: trueare now accepted. All 223 config validation tests pass.