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

package.json's private: true not respected #936

Closed
Windvis opened this issue Sep 13, 2022 · 2 comments
Closed

package.json's private: true not respected #936

Windvis opened this issue Sep 13, 2022 · 2 comments
Labels

Comments

@Windvis
Copy link

Windvis commented Sep 13, 2022

The npm plugin documentation mentions the following:

The "private": true setting in package.json will be respected, and release-it will skip this step.

It seems, however, that this is no longer the case. When I run release-it with the default configuration (publish: true) in a project which has private: true in its package.json, I still see the prompt to publish to npm: ? Publish project-name to npm?

The init hook does check the private value, but the release hook does not which means the prompt is still triggered.

I also found a test for this which does seem to succeed 🤔 . Maybe it doesn't cover the full flow?

Edit: Yup, that seems to be the case. It doesn't actually publish to npm (which is what's tested), but the prompt is still shown, and that part isn't tested AFAIK.

@webpro
Copy link
Collaborator

webpro commented Sep 13, 2022

Yes, indeed.

The automated tests use non-interactive (--ci) runs or otherwise mock Inquirer.js.

I also agree that it doesn't make a lot of sense to prompt for this, so let's keep this issue open for you, someone else or myself to pick up. Or at least improve the docs.

@stale
Copy link

stale bot commented Nov 12, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants