Gauging Interest in Guide for Verdaccio Private Registry Uplink
Created by: bmuenzenmeyer
I am writing to gauge interest in whether or not create-react-app would like a new User Guide detailing how to run end to end testing with a private verdaccio uplink, enabling the installation of private packages as dependencies.
Context
create-react-app uses verdaccio to spin up a local registry to publish and pull the current changeset being built - effectively testing exactly how the user would. (By the way, this is awesome!)
create-react-app has the luxury of using the default verdaccio config which includes the public npm registry. All packages to be installed are public.
Problem
A problem is encountered if a team wishes to fork create-react-app and add private or proxied npm packages, as they won't be found on the public registry (at least unauthenticated). This causes yarn installs to fail with 404s during CI. I think one could argue this may be a pretty specific problem, depending on if teams choose to fork the whole monorepo or just react-scripts, but we've found value in the former, and as such, am writing this issue to propose the solution.
Solution
What we've down to support this behavior is
- add our private registry as an uplink
- alter end to end scripts to add
authorheaderproperties to the verdaccio confg file during CI, being careful not to leak any secret.
This allows us to test generation of create-react-app while pulling down our custom/private packages.
We find it unlikely that we are the only team to encounter this use case. Would create-react-app accept a PR to the User Guide detailing how to accomplish this task?