mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
e11cfe98e9
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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 Reviewed By: cortinico Differential Revision: D41498086 fbshipit-source-id: 48fbbb1c9334e7a9e7657e6275b7b04f9ce290b5
Why?
The main purpose of install-dependencies.js is to bootstrap Verdaccio. It will host all the local packages, which are not yet present on npm registry. In the near future this should help us in keep template tests green, because once we move to monorepo structure, template app may use some versions of dependencies that are not yet present on npm registry.
I have migrated some module to package, which is not yet published to npm, how to use it?
First of all, you need to modify Verdaccio config:
packages:
+ '<my-migrated-package-name>':
+ access: $all
+ publish: $all
'@*/*':
access: $all
publish: $authenticated
proxy: npmjs
'**':
access: $all
publish: $all
proxy: npmjs
After that, you should modify install-dependencies script to include your package for publishing
const PACKAGES_TO_PUBLISH_PATHS = [
...
+ "packages/<your-package-folder-name>"
];