-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Define "exports" field on main package #50872
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
Conversation
This pull request was exported from Phabricator. Differential Revision: D72228547 |
b909e83
to
e1bdff2
Compare
Summary: NOTE: Resubmission of D71968187. Define `"exports"` field on the main `react-native` package. **Notes** Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible). - Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅) - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today) - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅) - Exports `./package.json` (unchanged ✅) - TypeScript should: - fall back to the `"types"` field (unchanged ✅) - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅) Changelog: [General][Breaking] - The `react-native` package now defines package.json `"exports"`. - While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools. - Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code. - Imports from `src/` and `src/private/` directories are disallowed. Differential Revision: D72228547
This pull request was exported from Phabricator. Differential Revision: D72228547 |
Summary: NOTE: Resubmission of D71968187. Define `"exports"` field on the main `react-native` package. **Notes** Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible). - Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅) - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today) - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅) - Exports `./package.json` (unchanged ✅) - TypeScript should: - fall back to the `"types"` field (unchanged ✅) - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅) Changelog: [General][Breaking] - The `react-native` package now defines package.json `"exports"`. - While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools. - Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code. - Imports from `src/` and `src/private/` directories are disallowed. Reviewed By: robhogan Differential Revision: D72228547
e1bdff2
to
6e73a84
Compare
Summary: NOTE: Resubmission of D71968187. Define `"exports"` field on the main `react-native` package. **Notes** Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible). - Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅) - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today) - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅) - Exports `./package.json` (unchanged ✅) - TypeScript should: - fall back to the `"types"` field (unchanged ✅) - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅) Changelog: [General][Breaking] - The `react-native` package now defines package.json `"exports"`. - While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools. - Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code. - Imports from `src/` and `src/private/` directories are disallowed. Reviewed By: robhogan Differential Revision: D72228547
This pull request was exported from Phabricator. Differential Revision: D72228547 |
Summary: Pull Request resolved: facebook#50872 NOTE: Resubmission of D71968187. Define `"exports"` field on the main `react-native` package. **Notes** Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible). - Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅) - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today) - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅) - Exports `./package.json` (unchanged ✅) - TypeScript should: - fall back to the `"types"` field (unchanged ✅) - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅) Changelog: [General][Breaking] - The `react-native` package now defines package.json `"exports"`. - While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools. - Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code. - Imports from `src/` and `src/private/` directories are disallowed. Reviewed By: robhogan Differential Revision: D72228547
6e73a84
to
8313dfd
Compare
Summary: NOTE: Resubmission of D71968187. Define `"exports"` field on the main `react-native` package. **Notes** Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible). - Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅) - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today) - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅) - Exports `./package.json` (unchanged ✅) - TypeScript should: - fall back to the `"types"` field (unchanged ✅) - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅) Changelog: [General][Breaking] - The `react-native` package now defines package.json `"exports"`. - While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools. - Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code. - Imports from `src/` and `src/private/` directories are disallowed. Reviewed By: robhogan Differential Revision: D72228547
Summary: NOTE: Resubmission of D71968187. Define `"exports"` field on the main `react-native` package. **Notes** Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible). - Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅) - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today) - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅) - Exports `./package.json` (unchanged ✅) - TypeScript should: - fall back to the `"types"` field (unchanged ✅) - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅) Changelog: [General][Breaking] - The `react-native` package now defines package.json `"exports"`. - While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools. - Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code. - Imports from `src/` and `src/private/` directories are disallowed. Reviewed By: robhogan Differential Revision: D72228547
8313dfd
to
205f8c4
Compare
Summary: Pull Request resolved: facebook#50872 NOTE: Resubmission of D71968187. Define `"exports"` field on the main `react-native` package. **Notes** Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible). - Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅) - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today) - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅) - Exports `./package.json` (unchanged ✅) - TypeScript should: - fall back to the `"types"` field (unchanged ✅) - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅) Changelog: [General][Breaking] - The `react-native` package now defines package.json `"exports"`. - While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools. - Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code. - Imports from `src/` and `src/private/` directories are disallowed. Reviewed By: robhogan Differential Revision: D72228547
This pull request was exported from Phabricator. Differential Revision: D72228547 |
205f8c4
to
19d0bbe
Compare
Summary: NOTE: Resubmission of D71968187. Define `"exports"` field on the main `react-native` package. **Notes** Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible). - Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅) - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today) - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅) - Exports `./package.json` (unchanged ✅) - TypeScript should: - fall back to the `"types"` field (unchanged ✅) - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅) Changelog: [General][Breaking] - The `react-native` package now defines package.json `"exports"`. - While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools. - Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code. - Imports from `src/` and `src/private/` directories are disallowed. Reviewed By: robhogan Differential Revision: D72228547
This pull request has been merged in 319ba0a. |
This pull request was successfully merged by @huntie in 319ba0a When will my fix make it into a release? | How to file a pick request? |
Summary:
NOTE: Resubmission of D71968187.
Define
"exports"
field on the mainreact-native
package.Notes
Module resolution should be equivalent to the previous implicit
"main"
field (backwards compatible)..js
suffix (unchanged ✅)flow/
andLibraries/
subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today)./jest-preset.js
and./rn-get-polyfills.js
(unchanged ✅)./package.json
(unchanged ✅)"types"
field (unchanged ✅)"."
,"./*"
when Package Exports support is enabled viacompilerOptions
, and use the adjacent.d.ts
file (unchanged ✅)Changelog:
[General][Breaking] - The
react-native
package now defines package.json"exports"
.react-native
subpath will need to be updated to match the import path used in your code.src/
andsrc/private/
directories are disallowed.Differential Revision: D72228547