-
Notifications
You must be signed in to change notification settings - Fork 973
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
Add 'yarn rw upgrade' helper to upgrade @redwoodjs packages #436
Conversation
This is awesome, does this modify all 3 the |
@peterp Yes, it does both 1) modify respective package.json files and 2) install and, therefore, update yarn.lock. You can try with yarn:
The interactive cli is nice but a bit more complicated. It will especially be a benefit in the future when people are way behind and will receive visual understanding about how many, and which, patch/minor/major versions they would be skipping to upgrade to latest. —> Downside of the yarn workspace bug (with its own command) is that we can only use this for upgrading to latest. I think this is satisfactory for now. |
Co-Authored-By: Satya Rohith <me@satyarohith.com>
…d into dsp-add-upgrade-command
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.
Yay!
Step 1 of #271
yarn rw upgrade
runs an interactive upgrade processyarn rw upgrade --check
checks for outdated packages (without upgrading)Experimented with npm-check-updates, npm-check, and yarn-check. Ended up using yarn built-in checks and upgrade. However, yarn doesn't play nice with its own workspaces, go figure, so I was limited to use
yarn upgrade-interactive [packages] --latest
. Other commands/options would not work. 👎I also attempted to first build this without Listr, but Execa didn't play nice with the interactive terminal. So Listr it is (I seem to recall we've had this problem before, yes?).
Note the
.strict()
in the option -- it does pick up error in the "check" flag, which is an improvement on no error checking at all.Tested on Windows Bash for Ubuntu and worked fine. Wasn't able to figure out how to test cli package on Powershell... ?