Repository navigation
refactor(compiler): delete the unused selectors module and give toRNProperty one home - #491
Open
YevheniiKotyrlo wants to merge 1 commit into
Open
YevheniiKotyrlo wants to merge 1 commit into
YevheniiKotyrlo wants to merge 1 commit into
Conversation
…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.
YevheniiKotyrlo
marked this pull request as ready for review
October 16, 2026 12:53
This was referenced Oct 16, 2026
This branch has not been deployed
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.
Merge order
It shares lines with #389 (
compiler/declarations.ts,utilities/index.ts), #391 (compiler/declarations.ts,utilities/index.ts), #411 (compiler/stylesheet.ts), #413 (compiler/declarations.ts), #417 (compiler/declarations.ts), #420 (compiler/declarations.ts,utilities/index.ts), #447 (compiler/selector-builder.ts), #448 (compiler/selector-builder.ts), #449 (compiler/selector-builder.ts), #459 (compiler/selector-builder.ts), #492 (compiler/declarations.ts,utilities/index.ts), #494 (compiler/declarations.ts,utilities/index.ts), #495 (compiler/declarations.ts,utilities/index.ts); whichever lands second rebases.