-
Notifications
You must be signed in to change notification settings - Fork 171
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
fix: add npm view
to transparent commands
#158
Conversation
styfle
commented
Aug 10, 2022
- Related to Usage Error: This project is configured to use <pkgmgr> #157
- Related to nodejs#157
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it kind of seems like it'd be a more usable default to assume everything is transparent, and explicitly exclude the opaque ones. |
Allowing new commands isn't a major change, whereas forbidding some is. Generally I'm not sure how I feel about this change. While on surface it makes some sense, in practice it bypasses any registry configuration configured for the project (which can lead to potential security problems if the information you get is obtained from the public one instead of the private one). To avoid that one should call There's an argument that this won't matter in most cases, but there's also the opposite argument: the cases where this matter are more likely to make this easy mistake unless the system prevents them to do so. |
that is a very good point. another alternative is disallowing all commands unless they're explicitly marked as opaque or transparent - then it'd always be semver-minor to mark a new command. |
@styfle What do you think of #158 (comment)? Going back to my idea of providing an ENV variable to disable the usage error would let user/CLI tools that know what they're doing bypass the Corepack check while avoiding to introduce errors for the most common case. (So you would do something like |
Fwiw I agree an environment variable would be reasonable. Bikeshedding the name, I'd suggest |
How about |
Given this, I think we should close and rely on the new I'm also curious if we can make |