Publish RNTester as a separate package #371
Replies: 8 comments
-
I think publishing these files is reasonable. We have a If we publish RNTester from |
Beta Was this translation helpful? Give feedback.
-
I would be ok publishing the whole lot. We could probably exclude the ReferenceImages for the integration tests which is about 5MB of the total 10MB. Most of the rest of the size is assets needed for the js test pages -- which we would want to be able to run those tests on other platforms. Maybe best not to think too hard about it and just move RNTester to packages, and publish the whole thing. -- Its only ever going to be a dev dependency, so its probably not that big a deal. |
Beta Was this translation helpful? Give feedback.
-
Is there any reason not to move RNTester to it's own repo and publish it separately? |
Beta Was this translation helpful? Give feedback.
-
It’s deeply integrated into our codebase at FB so it’s a bit out of scope to pull it into a separate repo |
Beta Was this translation helpful? Give feedback.
-
Let's move RNTester into the packages folder so that we keep the overview. We aren't using workspaces/lerna for RN yet, but we will eventually get there. I am unsure whether publishing RNTester the way it is is really a good idea – we'd like to make any (breaking) changes to it that we want without having to commit to an API surface. What would the integration between RNTester and the RN windows code look like? Separately, I think we need to completely revamp RNTester. It looks like an app made in the 2000s. |
Beta Was this translation helpful? Give feedback.
-
I love RNTester and I think it's the most underestimated folder in the whole rn main repo ❤️ I agree with @acoates-ms main point for having it published separately, as an easily accessible "bench desk". I also agree with @TheSavior point of moving it into the
I'm wondering if it would be valuable to release a new version of RNTester along with the main react-native package (following the same versioning too) - or in any way make them similar in "how" releases are done for RN to sort of leave the FB team the freedom to do all the changes they want? |
Beta Was this translation helpful? Give feedback.
-
As we're getting close to getting Thoughts on if we could move those into the RNTester package? |
Beta Was this translation helpful? Give feedback.
-
I think we'd like to see those integration tests rewritten with Detox against views in RNTester, so yeah, moving those as part of that seems good. |
Beta Was this translation helpful? Give feedback.
-
Introduction
RNTester contains a bunch of test/example pages, that are useful for out of tree platforms to verify their implementations. Currently the RNTester files are not published as part of the react-native npm package.
The Core of It
Currently react-native-windows relies on a private fork of react-native to get RNTester files and use those to test react-native-windows. This is a common problem that all out of tree platforms have to come up with a solution for. Rather than copying files between repos, publishing a NPM package provides a single source of truth and prevents the tests from getting out of sync between core and out of tree platforms.
My proposed solution is to create a new package.json inside the RNTester folder of react-native, and modify the publish pipeline of react-native to start publishing that package at the same time as react-native gets published. The package would at a minimum publish the files under RNTester/js directory, which would be enough to let out of tree platforms easily use those files to test their platforms.
Discussion points
The points of discussion would be should the version just be published exactly in step with RN. -- This is probably easiest, although it would be more accurate to publish it on its own schedule, I'm not sure that it gains people much.
Another question would be if it should just go ahead and publish the xcode/android files too, allowing people to easily download the npm package and be able to launch RNTester for iOS/Android without cloning the whole react-native repo. -- I'm not sure this is actually valuable. But it would be an option.
Beta Was this translation helpful? Give feedback.
All reactions