Skip to content

Unbreak CI: Fix metroSchemaResolver .d.ts generation + windows tests - #1878

Closed
robhogan wants to merge 1 commit into
mainfrom
pr1878
Closed

Unbreak CI: Fix metroSchemaResolver .d.ts generation + windows tests#1878
robhogan wants to merge 1 commit into
mainfrom
pr1878

Conversation

@robhogan

@robhogan robhogan commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

TS error

Currently, the generated .d.ts for this file causes a TS ESLint error:

https://github.com/react/metro/actions/runs/32859032114/job/97838112966

yarn run build-ts-defs && yarn lint
...
metro/packages/metro/types/lib/metroSchemeResolver.d.ts
  23:15  error  'metroSchemeResolver' is defined but only used as a type  @typescript-eslint/no-unused-vars

✖ 1 problem (1 error, 0 warnings)

error Command failed with exit code 1.

This is ultimately flow-api-translator producing messy output, but we can workaround it in the mean time by using an anonymous default export.

Windows paths handling

Additionally, CI fails on Windows because both of the new metroSchemeResolver-test and createStaticCrawler-test hardcode posix paths. Fix that with the usual normalisation pattern.

Test plan:
OSS CI is green on this PR.


Stack created with Sapling. Best reviewed with ReviewStack.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 25, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 25, 2026
@robhogan
robhogan force-pushed the pr1878 branch 2 times, most recently from bd25cf7 to 870998c Compare August 25, 2026 15:51
@robhogan robhogan changed the title TypeScript: Fix metroSchemaResolver .d.ts generation, fix OSS CI TypeScript: Fix metroSchemaResolver .d.ts generation + windows test, unbreak CI Aug 25, 2026
@robhogan robhogan changed the title TypeScript: Fix metroSchemaResolver .d.ts generation + windows test, unbreak CI Unbreak CI: Fix metroSchemaResolver .d.ts generation + windows tests Aug 25, 2026
@robhogan
robhogan force-pushed the pr1878 branch 2 times, most recently from 948de45 to 65990e4 Compare August 25, 2026 16:31
## TS error
Currently, the generated `.d.ts` for this file causes a TS ESLint error:

https://github.com/react/metro/actions/runs/32859032114/job/97838112966

```
yarn run build-ts-defs && yarn lint
...
metro/packages/metro/types/lib/metroSchemeResolver.d.ts
  23:15  error  'metroSchemeResolver' is defined but only used as a type  @typescript-eslint/no-unused-vars

✖ 1 problem (1 error, 0 warnings)

error Command failed with exit code 1.
```

This is ultimately flow-api-translator producing messy output, but we can workaround it in the mean time by using an anonymous default export.

## Windows paths handling

Additionally, CI fails on Windows because both of the new `metroSchemeResolver-test` and `createStaticCrawler-test` hardcode posix paths. Fix that with the usual normalisation pattern.

Test plan:
OSS CI is green on this PR.
@meta-codesync

meta-codesync Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@vzaidman has imported this pull request. If you are a Meta employee, you can view this in D117379756.

@robhogan robhogan changed the title Unbreak CI: Fix metroSchemaResolver .d.ts generation + windows tests Unbreak CI: Fix metroSchemeResolver .d.ts generation + windows tests Aug 25, 2026
@robhogan robhogan changed the title Unbreak CI: Fix metroSchemeResolver .d.ts generation + windows tests Unbreak CI: Fix metroSchemaResolver .d.ts generation + windows tests Aug 25, 2026
@meta-codesync meta-codesync Bot closed this in 589a679 Aug 25, 2026
@meta-codesync meta-codesync Bot added the Merged label Aug 25, 2026
@meta-codesync

meta-codesync Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@vzaidman merged this pull request in 589a679.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant