Skip to content
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

When publishing an npm package, when the publishPath option is set, isCollaborator should detect package.json under publishPath instead of the current directory. #1090

Closed
Ru1ers opened this issue Mar 31, 2024 · 2 comments

Comments

@Ru1ers
Copy link

Ru1ers commented Mar 31, 2024

When I execute publish npm in the root directory, he throws an exception

ERROR User xxxx is not a collaborator for release-it-test.
Documentation: https://git.io/release-it-npm

Apparently the error is telling me that I don't have publishing permissions for the project, which is no problem

But my project has a monorepo structure, and I cannot set the name in package.json in my root directory to the same name as the sub-package. This leads to the fact that what I release is a sub-project, and release-it detects the root directory.

20240331142956

  "npm": {
    "publishPath": "./src/test",
    "versionArgs": ["--allow-same-version"]
  },

This is the package.json of the subproject
image

This is package.json in the root directory
image

@webpro
Copy link
Collaborator

webpro commented Apr 5, 2024

release-it uses npm under the hood, so you'd need to use that for auth/publish

@webpro
Copy link
Collaborator

webpro commented May 8, 2024

@webpro webpro closed this as completed May 8, 2024
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

No branches or pull requests

2 participants