np icon indicating copy to clipboard operation
np copied to clipboard

Scoped package publication detection fails

Open bennycode opened this issue 5 years ago • 7 comments

Description

I have a scoped package which is already publicly released (release on npm) and now I want to integrate "np" in my release process. When running "np" it tells me "This scoped repo @wireapp/protocol-messaging hasn't been published. Do you want to publish it publicly?" which is wrong.

I tried adding the following to my "package.json" but it didn't help:

"publishConfig": {
  "access": "public"
},

Steps to reproduce

  1. Checkout my repository: https://github.com/wireapp/generic-message-proto/
  2. Run "np"

Expected behavior

The "np" tool should not think (log) that "@wireapp/protocol-messaging" hasn't been published.

Environment

np - 6.2.0 Node.js - 12.11.0 npm - 6.10.1 Git - 2.16.2.windows.1 OS - Windows 10

bennycode avatar Feb 27 '20 11:02 bennycode

Seems like a duplicate of https://github.com/sindresorhus/np/issues/504. Also facing the same issue, so decided to downgrade to v5.2.1 for now

thetutlage avatar Feb 27 '20 14:02 thetutlage

Just want to mention that we have this same issue - it's wreaking havoc on all of our org packages, every time someone publishes its made private and our builds go down. Happy to help out with getting this patched up if there's anything I can do to move it along!

jescalan avatar Mar 05 '20 00:03 jescalan

Same here. Scoped package already published publicly and np fails to detect it.

thasmo avatar Mar 22 '20 18:03 thasmo

If anyone wants to work on this, see the initial attempt and feedback in https://github.com/sindresorhus/np/pull/511.

sindresorhus avatar Sep 29 '20 23:09 sindresorhus

Just an FYI - this is still broken

seunggs avatar Jan 24 '22 00:01 seunggs

Fwiw, it looks like this works fine now. Maybe a change in npm? Or maybe it was fixed in np 7.x but this was never closed. in package.json:

  "publishConfig": {
    "access": "public"
  }

versions:

 npm: '8.5.3',
 node: '16.14.0',
 np: '7.6.0'

beardyman avatar Mar 05 '22 16:03 beardyman

it works as per @beardyman config.

shinsuny avatar May 31 '22 03:05 shinsuny