Skip to content

Add a feature flag to split remote registry from onlyPeers flag#84

Closed
developher-net wants to merge 4 commits intonathanhleung:masterfrom
developher-net:avoid-proxies
Closed

Add a feature flag to split remote registry from onlyPeers flag#84
developher-net wants to merge 4 commits intonathanhleung:masterfrom
developher-net:avoid-proxies

Conversation

@developher-net
Copy link
Copy Markdown
Contributor

In response to #73

If this enhancement is added, then I believe the need for this app to support proxies goes away entirely, as a developer can use their normal .npmrc setup instead. This PR doesn't remove any of the auth and proxy features. Just introduces a configuration that lets us avoid them for certain use cases.

--only-peers was doing two different things which complicated the need
for proxy settings. Not only was it flagging whether to install the main
package with the peers, it was also toggling whether the peerDeps list
was being generated from a local node_modules vs a remote registry.

By splitting this into two distinct feature flags, we make behavior clearer,
and future case of delegating proxy settings to NPM or Yarn instead
of handling those in the utility.

BREAKING_CHANGE: --only-peers now searches for peerDeps via the registry
unless --no-registry is also specified

  • was: install-peerdeps <package> --only-peers
  • now: install-peerdeps <package> --only-peers --no-registry

Renames onlyPeers parameter to noRegistry which better reflects
what this function is doing. This function doesn't care about peers
vs. main, that's in a different scope.
… lists

`--only-peers` was doing two different things which complicated the need
for proxy settings. Not only was it flagging whether to install the main
package with the peers, it was also toggling whether the peerDeps list
was being generated from a local node_modules vs a remote registry.

By splitting this into two distinct feature flags, we make behavior clearer,
and future case of delegating proxy settings to NPM or Yarn instead
of handling those in the utility.

BREAKING_CHANGE: `--only-peers` now searches for peerDeps via the registry
unless `--no-registry` is also specified

* was: `install-peerdeps <package> --only-peers`
* now: `install-peerdeps <package> --only-peers --no-registry`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants