sindresorhus / np

A better `npm publish`
MIT License
7.56k stars 299 forks source link

Allow `publishConfig.registry` to be npm default registry #749

Closed fisker closed 4 months ago

fisker commented 4 months ago

Description

I have

  "publishConfig": {
    "access": "public",
    "registry": "https://registry.npmjs.org/"
  }

in all my packages. When using yarn berry, np throws a error,

External registry is not yet supported with yarn-berry

Steps to reproduce

  1. Add the publishConfig above to package.json
  2. Run yarn set version berry
  3. Run np

Expected behavior

Not throw errors.

Environment

np - 10.0.6 Node.js - 22 npm - Should not releated Git - Should not releated OS - Should not releated

Related code

https://github.com/sindresorhus/np/blob/a9e8fc78f06f5d429f5040d4ad24c696b27e30f4/source/npm/util.js#L46

sindresorhus commented 4 months ago

// @mifi

mifi commented 4 months ago

Yeah I didn't implement support for that when I added berry support. Feel free to submit a PR if there's an easy way to add support for it.