-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
yarn publish not respecting publishConfig in package.json for scoped packages #5279
Comments
Confirmed. I got this today in Yarn v1.4.0 too trying to lerna publish a yarn workspace with private scoped packages. I'm not entirely sure how that flag works at the npm registry api level, but I'll see if I can find time to dig into it next week (and assigned to myself). |
For npm compatability, `yarn publish` should check `publishConfig.access` in package.json and use it as if the `--access` option was passed. yarnpkg#5279
…son (#5290) * feat(publish): Publish command uses publishConfig.access in package.json For npm compatability, `yarn publish` should check `publishConfig.access` in package.json and use it as if the `--access` option was passed. #5279 * WIP: CI test failure debugging * WIP: CI test failure debugging * WIP: CI test failure debugging * fix CI errors by mocking npm password prompt * use jest expect().toBeCalledWith() for publish command tests
publishConfig accepts not only
It seems like your fix just covers {
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
} |
I also ran into this while trying to publish scoped packages with lerna to a private npm server (verdaccio). Not sure if yarn respects the settings in the package.json |
Seems this was already reported in #5310 |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When attempting to publish a scoped package for the first time, even with the following in
package.json
:yarn publish
still fails with "You must sign up for private packages".Note this only happens on the initial publish; once the package has been created, subsequent publish works as expected.
If the current behavior is a bug, please provide the steps to reproduce.
Create an arbitrary scoped package with the above
publicConfig
settings inpackage.json
, and tryyarn publish
What is the expected behavior?
Successfully publish the package with public access. (Using
npm
works as expected)Please mention your node.js, yarn and operating system version.
yarn-error.log
The text was updated successfully, but these errors were encountered: