-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Feature: Interactive update #1444
Conversation
8eff9b1
to
7e5c520
Compare
This is great, I think we should add this to Yarn. |
rx-lite@^3.1.2: | ||
version "3.1.2" | ||
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" | ||
|
||
rx@^4.1.0: |
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.
rx is very large, I wonder how we feel about pulling it into Yarn. How much does this increase the installed size of Yarn? (you can run scripts\build-dist.sh
on Linux/Mac or scripts\build-dist.ps1
on Windows and compare the size of the dist
directory before and after your change)
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.
3409098 - 2831040 = 578058 bytes
increased 😭
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 seems it can be reduced by loading only necessary modules from rx
in Inquirer.js
.
https://github.com/SBoudrias/Inquirer.js/search?utf8=%E2%9C%93&q=rx
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.
Hmm, maybe this is okay for now and the size increase is offset by the usefulness of the feature. I'll see what others on the team think!
This is probably my favourite pull request ever. Thank you! ❤️ |
@@ -28,7 +28,7 @@ export default ({ | |||
rm: 'remove', | |||
show: 'info', | |||
uninstall: 'remove', | |||
update: 'upgrade', | |||
udpate: 'update', |
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 tiny typo: 'udpate' -> 'update'
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.
The typo is intentional. That file is full of misspellings and alternate commands people are used to and are used to provide corrections.
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.
oh okay!
|
||
return ({name, current, wanted, latest, hint}); | ||
}))) | ||
.filter(({latest, current}) => latest !== current) |
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.
Instead of chaining can we assign these to variables with descriptive names, kind of hard to follow
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.
Did you mean assign the output in a variable then filter it?
const getNameFromHint = (hint) => hint ? `${hint}Dependencies` : 'dependencies'; | ||
|
||
const maxLengthArr = outdatedDeps.reduce( | ||
(acc, dep) => |
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 find this code really hard to follow, could we do the same here
7e5c520
to
264ccc4
Compare
264ccc4
to
c6bd30b
Compare
Merged and will be available in the next release. I've renamed the command from |
|
Considered that but I think relegating this sort of functionality to an argument makes it seem less important. I think this feature is crazy awesome and deserving of it's own command. |
Need to update the outdated condition. Outdated command usage semver package now. |
what do the colors indicate? |
IIUC, yellow is for packages installed at their |
This makes it so that `yarn upgrade` can upgrade all dependencies. `yarn upgrade-interactive` can be used for major version bumps. See the following: * https://yarnpkg.com/lang/en/docs/dependency-versions/#toc-caret-ranges * https://yarnpkg.com/docs/cli/upgrade/ * yarnpkg/yarn#1444 (comment)
This makes it so that `yarn upgrade` can upgrade all dependencies. `yarn upgrade-interactive` can be used for major version bumps. See the following: * https://yarnpkg.com/lang/en/docs/dependency-versions/#toc-caret-ranges * https://yarnpkg.com/docs/cli/upgrade/ * yarnpkg/yarn#1444 (comment)
This makes it so that `yarn upgrade` can upgrade all dependencies. `yarn upgrade-interactive` can be used for major version bumps. See the following: * https://yarnpkg.com/lang/en/docs/dependency-versions/#toc-caret-ranges * https://yarnpkg.com/docs/cli/upgrade/ * yarnpkg/yarn#1444 (comment)
is there a reason for |
It's likely that it's just because nobody has written docs for it yet. Pull requests are appreciated :) |
@Daniel15 tried updating the documentation by cloning the website repo and running it on my dev machine, but as I have no experience with Jekyll I could not get it fully working. I updated all the places I could find but the sidebar would still not show a link to the new page so I am stuck. :( Edit: Seems like there is something wrong with the auto-regeneration. When I manually built it, it detected all the changes and it looks ok. Will send a PR with updated docs for this awesome feature |
Is there a way to detect unused dependencies with yarn? |
This makes it so that `yarn upgrade` can upgrade all dependencies. `yarn upgrade-interactive` can be used for major version bumps. See the following: * https://yarnpkg.com/lang/en/docs/dependency-versions/#toc-caret-ranges * https://yarnpkg.com/docs/cli/upgrade/ * yarnpkg/yarn#1444 (comment)
This is similar to
npm-check
interactive update mode. It provides an easy way to update outdated packages.