-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
☂️ npm packages for react-native-web #35263
Comments
@necolas let me just double-check this for clarity, if I understand this correctly Do we have plans on how to handle local changes in order to test these? AFAIK metro does not support symlinks |
yeah I think so
does it not support Node.js resolution? we already have other packages broken out |
@necolas you can read more about the symlink stuff here: #34692 (comment) (once we figure it out for that effort, the learning will be useful here too) |
@necolas should we also include the |
@necolas / @kelset I've tried to move the Edit: Also lmk 👇
PS: I'm following things discussed here as well as @gabrieldonadel 's PR :) Footnotes
|
If any packages land before 0.72 is cut then we might need to create separate DT types for each separated package (only to be deprecated for 0.73) |
Thanks for the ping @necolas Additionally, you might face failures on CircleCI for template tests till those packages are published to NPM. We're looking into either using Verdaccio or other solutions to overcome those limitations (cc @hoxyq) |
…before testing template app Summary: Changelog: [Internal][Changed] - now using Verdaccio to publish necessary packages for template app - Adds script `/scripts/template/install-dependencies.js`, which incapsulates the logic of installing dependencies of template app - The idea of the script is to run verdaccio and publish all necessary packages to node_modules, since these packages might not yet be present on npm - This should also potentially resolve some template app test failures on CircleCI related to [package-ifying Animated, VirtualizedList, FlatList modules](facebook#35263) Differential Revision: D41498086 fbshipit-source-id: 1b185857c21f4cf4996fb1fa4faca5f9e77f534f
…before testing template app (facebook#35444) Summary: Pull Request resolved: facebook#35444 Changelog: [Internal][Changed] - now using Verdaccio to publish necessary packages for template app - Adds script `/scripts/template/install-dependencies.js`, which incapsulates the logic of installing dependencies of template app - The idea of the script is to run verdaccio and publish all necessary packages to node_modules, since these packages might not yet be present on npm - This should also potentially resolve some template app test failures on CircleCI related to [package-ifying Animated, VirtualizedList, FlatList modules](facebook#35263) Differential Revision: D41498086 fbshipit-source-id: adf19f547e552ff2f438a645f03f225921514d5e
…book#35406) Summary: This PR moves `VirtualizedList`, `VirtualizedSectionList`, and its files to a separate package called `react-native/virtualized-lists` located under `packages/virtualized-lists` as proposed on facebook#35263 ## Changelog [General] [Changed] - Move virtualized lists to react-native/virtualized-lists package Pull Request resolved: facebook#35406 Test Plan: 1. Open the RNTester app and navigate to `FlatList` or `SectionList` page 2. Test virtualized lists through the many sections https://user-images.githubusercontent.com/11707729/202878843-2b1322f5-cfee-484e-aaf3-d8d4dc0b96cc.mov Differential Revision: D41745930 Pulled By: hoxyq fbshipit-source-id: 67a971a3f06895bce360a7463c66a6b1f334f46b
Summary: This PR moves `VirtualizedList`, `VirtualizedSectionList`, and its files to a separate package called `react-native/virtualized-lists` located under `packages/virtualized-lists` as proposed on #35263 ## Changelog [General] [Changed] - Move virtualized lists to react-native/virtualized-lists package Pull Request resolved: #35406 Test Plan: 1. Open the RNTester app and navigate to `FlatList` or `SectionList` page 2. Test virtualized lists through the many sections https://user-images.githubusercontent.com/11707729/202878843-2b1322f5-cfee-484e-aaf3-d8d4dc0b96cc.mov Reviewed By: cipolleschi Differential Revision: D41745930 Pulled By: hoxyq fbshipit-source-id: d3d33896801fd69448c6893b86fd5c2363144fd0
Is there a goal here too to not have these packages's JS bundled in an RN app that's not using them? So if I'm not using FlatList, I won't have the JS bundled in my app? |
Do we have an idea of when we will start publishing packages to npm with Flow types compiled out / to comments? It's currently not feasible for React Native for Web to depend on |
I am still repeatedly answering issues from people who wonder why RN npm packages crash in web bundlers necolas/react-native-web#2490 |
I feel like this could be in scope of this project, maybe a separate task to support this across packages. Because this is not the part of monorepo project so far, and looks like |
There are a number of significant stakeholders, like Expensify, who depend on RN for their cross-platform product. And it seems to be an ongoing source of issues for them that these major modules are not kept in sync across native and web. I think we really need to get these modules into installable packages and published as compiled JS ASAP. |
@necolas - Agreed, we do depend on React Native for our cross-platform product ( |
Thanks. Any of the incomplete tasks above are in need of attention. We still need to compile to JS before publishing too. I don't think there's a mechanism for automatic publishing yet, but manually publishing the packages once they've been created would be good enough for RNW to start the transition. |
…book#35406) Summary: This PR moves `VirtualizedList`, `VirtualizedSectionList`, and its files to a separate package called `react-native/virtualized-lists` located under `packages/virtualized-lists` as proposed on facebook#35263 ## Changelog [General] [Changed] - Move virtualized lists to react-native/virtualized-lists package Pull Request resolved: facebook#35406 Test Plan: 1. Open the RNTester app and navigate to `FlatList` or `SectionList` page 2. Test virtualized lists through the many sections https://user-images.githubusercontent.com/11707729/202878843-2b1322f5-cfee-484e-aaf3-d8d4dc0b96cc.mov Reviewed By: cipolleschi Differential Revision: D41745930 Pulled By: hoxyq fbshipit-source-id: d3d33896801fd69448c6893b86fd5c2363144fd0
Hi, |
That was an oversight on our end, we added it now |
Started working on |
@DylanTet I don't have the bandwidth to work on this right now but you can use my PR as a base for what needs to be changed #35467 |
@gabrieldonadel thanks man! Looking at it now, if you dont mind me asking, what exactly did you guys mean by having issues with the new monorepo structure? |
@necolas Hey, if no one is working on it, i can take care of "Move Animated to a separate package called @react-native/animated within packages/animated." |
Description
These are spillover tasks from the W3C props & styles projects. The aim is to move user-space modules into their own packages within the monorepo. React Native for Web must currently copy-paste-edit these modules. Publishing these modules as npm packages will allow React Native and React Native for Web to depend on the same implementations, providing users of cross-platform React with a more reliable foundation (and making it easier for RNWeb to be maintained.)
Once again we're looking for the community's help! If you're interested in helping to reorganize the RN monorepo, you could contribute by helping to move these modules into packages with @cortinico's oversight. If you're interested in improving consistency between RN and RNWeb, you could contribute by helping to prepare those new packages for npm publication and consumption by RNWeb. We're also open to suggestions and feedback on how to proceed.
Animated
Animated
directory to use ESModule imports/exports. refactor: Convert Animated directory to use ESModule imports/exports #34539AnimatedStyle
forPlatform.OS === 'web'
. React Native for Web has a patch for this that can be upstreamed. fix: Patch AnimatedStyle to avoid discarding the initial style info #35198Animated
to a separate package called@react-native/animated
withinpackages/animated
.Animated
components within React Native.@react-native/animated
in React Native for Web.VirtualizedList
VirtualizedList
andVirtualizedSectionList
to a separate package called@react-native/virtualized-lists
withinpackages/virtualized-lists
. feat: Move virtualized lists to @react-native/virtualized-lists #35406@react-native/virtualized-lists
in React Native for Web.FlatList
FlatList
andSectionList
to a separate package called@react-native/flat-lists
(name tbd?) withinpackages/flat-lists
. Feat: MoveFlatList
s to@react-native/flat-lists
package #35423@react-native/flat-lists
in React Native for Web.The text was updated successfully, but these errors were encountered: