Skip to content

Fixes publishing scoped packages to third-party registries#439

Merged
arcanis merged 2 commits intomasterfrom
mael/publish-ident-registry
Sep 5, 2019
Merged

Fixes publishing scoped packages to third-party registries#439
arcanis merged 2 commits intomasterfrom
mael/publish-ident-registry

Conversation

@arcanis
Copy link
Copy Markdown
Member

@arcanis arcanis commented Sep 5, 2019

What's the problem this PR addresses?

When publishing a scoped package to a registry, we were sending a GET requested to the registry to determine whether the version there already existed (when using --tolerate-republish). The problem is that we were doing this by passing the publish registry but not the ident, so our request was unauthenticated (and the GitHub Package Registry currently requires auth).

I could have solved that by using npmAlwaysAuth, but since the package was scoped the request should have been scoped anyway.

How did you fix it?

I relaxed the rules in the RegistryOptions so that a registry may now be defined when an ident is explicitly provided (I didn't find the rational why I didn't implement it this way, although I suspect this was before we had npmPublishRegistry).

@arcanis arcanis merged commit 22fa2f7 into master Sep 5, 2019
@arcanis arcanis deleted the mael/publish-ident-registry branch October 11, 2019 12:30
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.

1 participant