Skip to content

Conversation

@KyeongJooni
Copy link

What's the problem this PR addresses?

When using yarn npm publish with private registries, users have no way to verify which registry URL Yarn is targeting. When authentication fails with error YN0033: No authentication configured for request, it's impossible to determine whether the issue is with the token configuration or an incorrect registry URL.

This is especially problematic when migrating from npm to Yarn, as the configuration methods differ significantly.

Closes #6191

How did you fix it?

Added a log message at the beginning of the publish process that displays the target registry URL.

Implementation:

  • Added report.reportInfo(MessageName.UNNAMED, Publishing to ${registry}) in publish.ts right after the report starts
  • Updated the existing dry-run test to verify the registry URL is displayed

Example output:

➤ YN0000: Publishing to https://registry.npmjs.org/ ➤ YN0000: Package archive published

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

Display the target registry URL at the start of yarn npm publish
to help users verify their configuration and debug authentication errors

Closes yarnpkg#6191
- Include tag in initial publish message
- Remove redundant registry/tag info from dry-run message
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.

[Feature] yarn npm publish should print registry URL where it is publishing

2 participants