-
Notifications
You must be signed in to change notification settings - Fork 2.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
feat(testing): allow custom address for local registry #29050
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit c5d6bc2. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
55f9619
to
19338bc
Compare
Until nrwl/nx#29050 is merged and released
… starting the local registry Until nrwl/nx#29050 is merged and released
… starting the local registry Until nrwl/nx#29050 is merged and released
ba68fa5
to
d94bc90
Compare
d94bc90
to
547dc7f
Compare
914f980
to
4b76394
Compare
… starting the local registry Until nrwl/nx#29050 is merged and released
4b76394
to
c5d6bc2
Compare
… output<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> The `startLocalRegistry()` always assumed that the local registry was started on `localhost` , which is not necessary the case, if for example user has set the `listenAddress` option in the underlying `verdaccio executor` or via the `verdaccio config file`https://github.com/nrwl/nx/blob/128778e7d1a8d7f2b078b2401d47270c0c15a2ce/packages/js/src/executors/verdaccio/verdaccio.impl.ts#L130 As a result the `startLocalregistry()`, will never return as, it is waiting forever to detect the local registry URL in the process output: https://github.com/nrwl/nx/blob/128778e7d1a8d7f2b078b2401d47270c0c15a2ce/packages/js/src/plugins/jest/start-local-registry.ts#L40 This customization of `verdaccio` listen address is something required, namely when running within a **devcontainer**. In that case, the address must be set to `0.0.0.0`, so that the registry can be accessed from `http://localhost:4873` from host machine. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Allow customizing the `listenAddress` when starting the local registry, via an additional option that can be provided when calling the method. It default value will be `localhost`. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #28238 (cherry picked from commit cfb67cf)
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
… output
Current Behavior
The
startLocalRegistry()
always assumed that the local registry was started onlocalhost
, which is not necessary the case, if for example user has set thelistenAddress
option in the underlyingverdaccio executor
or via theverdaccio config file
nx/packages/js/src/executors/verdaccio/verdaccio.impl.ts
Line 130 in 128778e
As a result the
startLocalregistry()
, will never return as, it is waiting forever to detect the local registry URL in the process output:nx/packages/js/src/plugins/jest/start-local-registry.ts
Line 40 in 128778e
This customization of
verdaccio
listen address is something required, namely when running within a devcontainer. In that case, the address must be set to0.0.0.0
, so that the registry can be accessed fromhttp://localhost:4873
from host machine.Expected Behavior
Allow customizing the
listenAddress
when starting the local registry, via an additional option that can be provided when calling the method. It default value will belocalhost
.Related Issue(s)
Fixes #28238