-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
edit: scoped packages #75
Conversation
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.
A small doc update to do here, either by @larsgw or when we land this. Otherwise, yes, let's get this in!
@@ -2,7 +2,7 @@ | |||
// open the package folder in the $EDITOR | |||
|
|||
module.exports = edit | |||
edit.usage = 'npm edit <pkg>[@<version>]' | |||
edit.usage = 'npm edit <pkg>[/<subpkg>...]' |
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.
I looked into how this summary got messed up, and it goes back to the edit docs having been wrong since 2011, and folks patching this usage summary to match them.
I would like to see the summary in doc/cli/npm-edit.md
updated to match!
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.
Will do, didn't see those were in the repo too.
@@ -22,6 +22,20 @@ function edit (args, cb) { | |||
)) | |||
} | |||
p = p.split('/') | |||
// combine scoped parts |
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.
Ordinarily I'd ask for tests, but we don't have any existing tests for this route, this is a interactive route and this change is reasonably eyeballable, so I'm inclined to take this without them.
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.
Yeah, I tried making tests but I'm not too familiar with all the mocking environments yet, and without something to work with I wasn't sure how to.
Ping? I added the docs, is there something else? |
There's an easier way to do this, but that handles some edge cases differently (namely, ignore leading and trailing forward slashes instead of trying to edit root folders), and I don't know if that is allowed.
See https://npm.community/t/2258.