np icon indicating copy to clipboard operation
np copied to clipboard

Allow `publishConfig.registry` to be npm default registry

Open fisker opened this issue 1 year ago • 1 comments

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

fisker avatar Jun 29 '24 18:06 fisker

// @mifi

sindresorhus avatar Jun 29 '24 18:06 sindresorhus

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.

mifi avatar Jul 01 '24 19:07 mifi