Skip to content

TypeScript validation during Metro bundling#392

Merged
afoxman merged 7 commits intomainfrom
afoxman/metro-typesafe
Jul 13, 2021
Merged

TypeScript validation during Metro bundling#392
afoxman merged 7 commits intomainfrom
afoxman/metro-typesafe

Conversation

@afoxman
Copy link
Copy Markdown
Contributor

@afoxman afoxman commented Jul 13, 2021

Description

Update @rnx-kit/typescript-servivce, bringing the public API in line with what is needed for typechecking during Metro bundling. Internally, push error handling up/out to the caller, and fix path normalization.

Add TypeScript validation to @rnx-kit/cli during Metro bundling.

Fix build clean command, to force a truly clean run of build/test.

Contributes to #173.

Test plan

Manually observe success during bundling. Then introduce code in test-app which is known to cause TypeScript errors, and manually observe them on the Metro console.

afoxman added 6 commits July 12, 2021 21:42
- Separate Project methods into "find" and "open", allowing caller to decide on the appropriate error-handling logic.
- Add filtering when validating Project files. Only include ts[x] unless checkJs is enabled.
- Make cache methods return a true/false result, moving error-handling up and out to the caller (Project).
- Stop converting to lowercase during path normalization. This confuses typescript.
… of react-native JS files. They aren't typesafe and fail the check.
@tido64 tido64 added the feature: metro This is related to Metro label Jul 13, 2021
@afoxman afoxman enabled auto-merge (squash) July 13, 2021 15:32
@afoxman afoxman merged commit 8409998 into main Jul 13, 2021
@afoxman afoxman deleted the afoxman/metro-typesafe branch July 13, 2021 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: metro This is related to Metro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants