-
Notifications
You must be signed in to change notification settings - Fork 29
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
Implement global package upgrade #70
Conversation
src/commands/check.js
Outdated
@@ -68,7 +78,7 @@ export const handler = catchAsyncError(async opts => { | |||
const filteredWith = filter ? `filtered with ${strong(filter)} ` : ''; | |||
|
|||
console.log( | |||
`Checking for outdated ${depsGroupsToCheckStr}dependencies ${filteredWith}for "${strong(packageFile)}"...` | |||
`Checking for outdated ${depsGroupsToCheckStr}dependencies ${filteredWith}${opts.global ? '' : (`for "${strong(packageFile)}"`)}...` |
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.
Can we show "Checking for outdated global dependencies..." when --global
flag is set?
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.
This includes fixes to line-endings, brace-style, and max-len.
…into global-pkg
} catch (err) { | ||
console.error(err); | ||
console.error(`Error parsing global packages: ${err.message}`); | ||
process.exit(1); |
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.
Why did you decide to use process.exit
here?
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 decided to include it to mimic the loadPackageJson
method as closely as possible, as it also calls process.exit
on attempting to parse the packageJson
.
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.
Any comment?
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.
Sorry? I commented on Nov 30. Is it not visible to you?
I decided to include it to mimic the
loadPackageJson
method as closely as possible, as it also callsprocess.exit
on attempting to parse thepackageJson
.
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.
@medallyon any comment about this change?
Hi @th0r, could you look at this again sometime? I commented on all of the stuff you wanted clarification for, I don't know if you can see them or not. |
@th0r You keep commenting "Any comment on this change?" in the same conversation, to which I've replied twice. I'm assuming you can't see my replies, so here's a screenshot. |
Your replies have a |
How do I submit them?? I've replied to all of your reviews as soon as they came in! |
When I do |
I found the "Submit Review" button 👺 |
Merged, thanks a lot! I'll publish a new version in a few hours. |
Published in v3.1.0 |
This PR addresses #8 and implements the ability to supply
-g
or--global
tonpm-upgrade
.--global
overrides any other supplied flagspackage.json
, so upgrades are applied immediately by callingnpm install
upon finishnode_modules
is determined by runningnpm root -g
. This has been tested on Windows 10 and Ubuntu 20.04.