Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better TypeScript support for package.json exports field #37377

Closed
wants to merge 1 commit into from

Conversation

NickGerleman
Copy link
Contributor

Summary:
For 0.72 I enabled moduleResolution: "nodenext" which allows some package exports support, but this is imperfect. E.g. RN will typecheck against the node condition and there are some more restrictions than we need.

D45720238 bumped TypeScript to 5.0 for RN 0.73, along with D45721088 which brought the tsconfig inline. This lets us switch to the new moduleResolution: "bundler" and instructs tsc to follow the react-native export condition.

See even more context at: microsoft/TypeScript#51669

Changelog:
[General][Added] - Better TypeScript support for package.json exports field

Differential Revision: D45769740

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels May 11, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45769740

@analysis-bot
Copy link

analysis-bot commented May 11, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,724,169 +1
android hermes armeabi-v7a 8,035,176 +0
android hermes x86 9,212,807 +0
android hermes x86_64 9,065,950 +2
android jsc arm64-v8a 9,288,913 +1
android jsc armeabi-v7a 8,477,343 -2
android jsc x86 9,348,927 +2
android jsc x86_64 9,605,683 +2

Base commit: 61335a1
Branch: main

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45769740

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 11, 2023
)

Summary:
Pull Request resolved: facebook#37377

For 0.72 I enabled `moduleResolution: "nodenext"` which allows some package exports support, but this is imperfect. E.g. RN will typecheck against the `node` condition and there are some more restrictions than we need.

D45720238 bumped TypeScript to 5.0 for RN 0.73, along with D45721088 which brought the tsconfig inline. This lets us switch to the new [`moduleResolution: "bundler"`](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#moduleresolution-bundler) and instructs `tsc` to follow the `react-native` export condition.

See even more context at: microsoft/TypeScript#51669

Changelog:
[General][Added] - Better TypeScript support for package.json exports field

Differential Revision: D45769740

fbshipit-source-id: 1e2ecbb0226c11b5ee556276cb742d361eddaeaf
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 11, 2023
)

Summary:
Pull Request resolved: facebook#37377

For 0.72 I enabled `moduleResolution: "nodenext"` which allows some package exports support, but this is imperfect. E.g. RN will typecheck against the `node` condition and there are some more restrictions than we need.

D45720238 bumped TypeScript to 5.0 for RN 0.73, along with D45721088 which brought the tsconfig inline. This lets us switch to the new [`moduleResolution: "bundler"`](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#moduleresolution-bundler) and instructs `tsc` to follow the `react-native` export condition.

See even more context at: microsoft/TypeScript#51669

Changelog:
[General][Added] - Better TypeScript support for package.json exports field

Differential Revision: D45769740

fbshipit-source-id: 0a016203e798bf655fb452a84f529e01abeaeb5c
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45769740

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45769740

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 13, 2023
)

Summary:
Pull Request resolved: facebook#37377

For 0.72 I enabled `moduleResolution: "nodenext"` which allows some package exports support, but this is imperfect. E.g. RN will typecheck against the `node` condition and there are some more restrictions than we need.

D45720238 bumped TypeScript to 5.0 for RN 0.73, along with D45721088 which brought the tsconfig inline. This lets us switch to the new [`moduleResolution: "bundler"`](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#moduleresolution-bundler) and instructs `tsc` to follow the `react-native` export condition.

See even more context at: microsoft/TypeScript#51669

Changelog:
[General][Added] - Better TypeScript support for package.json exports field

Reviewed By: christophpurrer

Differential Revision: D45769740

fbshipit-source-id: 7bfad1f28f1e61f0a4cf3433f912b6eb06db864f
)

Summary:
Pull Request resolved: facebook#37377

For 0.72 I enabled `moduleResolution: "nodenext"` which allows some package exports support, but this is imperfect. E.g. RN will typecheck against the `node` condition and there are some more restrictions than we need.

D45720238 bumped TypeScript to 5.0 for RN 0.73, along with D45721088 which brought the tsconfig inline. This lets us switch to the new [`moduleResolution: "bundler"`](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#moduleresolution-bundler) and instructs `tsc` to follow the `react-native` export condition.

See even more context at: microsoft/TypeScript#51669

Changelog:
[General][Added] - Better TypeScript support for package.json exports field

Reviewed By: christophpurrer

Differential Revision: D45769740

fbshipit-source-id: ff8a7fd5e0de7ed2c391bb080bda33425b27fbb3
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45769740

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 13, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1b0e8b1.

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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants