Skip to content

fix: accept explicitly absent optional namespaces - #378

Merged
MoOx merged 2 commits into
postcss:mainfrom
Aschenbath:fix/oss-20-round4-20261125-77d1-selector-optional-namespace
Nov 26, 2026
Merged

MoOx merged 2 commits into
postcss:mainfrom
Aschenbath:fix/oss-20-round4-20261125-77d1-selector-optional-namespace

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

Passing the typed optional field namespace: undefined to a tag, universal, or attribute factory currently throws in the namespace escaper. Accept an explicitly absent namespace so it behaves like an omitted field, and clear any stale escaped spelling when an existing namespace is reset through namespace or ns.

Added regressions for each factory, both setters, reassignment, and a clone override. All 10 new tests fail against unchanged main; npm test passes with the fix (1,086 tests, including the repository's lint, declaration, build, and coverage checks). Changed-file formatting and git diff --check pass. The full formatting check reports existing issues in unchanged exceptions.mjs and pseudos.mjs, reproduced on the original base.

Developed with OpenAI Codex assistance and independently reviewed against the tested file hashes.

@MoOx
MoOx merged commit bdb59d4 into postcss:main Nov 26, 2026
4 checks passed
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.

2 participants