Repository navigation
refactor(compiler): delete the unused selectors module and give toRNProperty one home - #491
Merged
danstepanov merged 1 commit intoDec 4, 2026
Conversation
YevheniiKotyrlo
marked this pull request as ready for review
October 16, 2026 12:53
This was referenced Oct 16, 2026
sammoore
approved these changes
Dec 3, 2026
sammoore
left a comment
Contributor
There was a problem hiding this comment.
Will revisit selectors usage around the codebase... LGTM if CI passes.
…roperty one home src/compiler/selectors.ts's getSelectors is imported by nothing; the compiler builds selectors in selector-builder.ts. The module stayed alive only through its toRNProperty, which atRules.ts and declarations.ts imported while selector-builder.ts and stylesheet.ts used a second copy. toRNProperty moves to utilities/property-names.ts and every caller imports it from there.
danstepanov
force-pushed
the
refactor/property-names
branch
from
December 4, 2026 03:13
99dc762 to
edbf1f3
Compare
danstepanov
approved these changes
Dec 4, 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.
Problem
src/compiler/selectors.tsis 505 lines whosegetSelectorsnothing imports: the compiler builds selectors inselector-builder.ts. The module stayed alive only through itstoRNProperty, whichatRules.tsanddeclarations.tsimport, whileselector-builder.tsandstylesheet.tsuse a second copy inselector-builder.ts. The two copies have already drifted (x[1]!in one,x[1]?.toUpperCase() ?? ""in the other).Solution
selectors.tsis deleted, andtoRNPropertymoves tosrc/utilities/property-names.ts, which every caller imports through../utilities. No behaviour changes.Tests
None added: nothing changes what the compiler does, and the existing suites cover every caller of
toRNProperty.Verification
On Ubuntu with the workflow's steps - build, lint, typecheck,
yarn test,node --test node/__tests__/*.mjs, both library builds, the web export, the unstaged-changes checks and commitlint - everything passes.Not run: the iOS and Android example builds.