Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Nick Gerleman 1b0e8b1de4 Better TypeScript support for package.json exports field (#37377)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/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: https://github.com/microsoft/TypeScript/pull/51669

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

Reviewed By: christophpurrer

Differential Revision: D45769740

fbshipit-source-id: 1ad450b8157bfd0d539289835bed097fd950cf78
2023-05-13 09:38:17 -07:00
Nick Gerleman cae52f6cf8 Add @react-native/typescript-config (#37345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37345

This moves from `tsconfig/react-native`, a centralized repository of tsconfigs, to `react-native/typescript-config`, a package maintained as part of the RN monorepo.

We end up wanting to make changes where the versions are coupled, so this publishes them as part of the same repo, etc. It also means Meta engineers can more freely make changes to it with normal approval processes.

Changelog:
[General][Added] - Add react-native/typescript-config

Reviewed By: cortinico

Differential Revision: D45721088

fbshipit-source-id: b949bffb14014695abf3b9b359d3f5e30bfc8919
2023-05-10 15:46:34 -07:00