Skip to content
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

fix(publish) Pass only the project scope to libnpmpublish #1985

Merged
merged 3 commits into from
Mar 22, 2019

Conversation

armandocanals
Copy link
Contributor

@armandocanals armandocanals commented Mar 13, 2019

Description

Parse the @scope from the full package name using npm-package-arg and set projectScope.

The projectScope parameter is used by libnpmpublish to set the HTTP_NPM_SCOPE header.

Motivation and Context

When publishing scoped packages with Lerna, the projectScope used by libnpmpublish was being set using the full package name (@scope/name).

This behavior caused some third-party registries to fail when verifying the HTTP_NPM_SCOPE header which was expected to match the package @scope.

How Has This Been Tested?

These changes have been tested against the official npm registry and third-party registries to ensure that only the @scope parameter will go through libnpmpublish as the projectScope.

Updated tests in npm-publish.test to include @scope.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Related issue

Fixes #1968

@armandocanals
Copy link
Contributor Author

Seems like CI is only failing for Node v11.11.0 which might be related to this: jestjs/jest#8069

Copy link
Member

@evocateur evocateur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@evocateur evocateur merged commit 4e3f8d8 into lerna:master Mar 22, 2019
@armandocanals armandocanals deleted the fix-scoped-packages branch April 9, 2019 00:56
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.

Missing HTTP_NPM_SCOPE header when publishing
2 participants