Skip to content

[rush] [discussion] How to update dependency versions? #1720

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

Open
trusktr opened this issue Jan 25, 2020 · 4 comments
Open

[rush] [discussion] How to update dependency versions? #1720

trusktr opened this issue Jan 25, 2020 · 4 comments

Comments

@trusktr
Copy link

trusktr commented Jan 25, 2020

The docs only say

Today, Rush does not yet have an integrated equivalent of npm update or npm-check-updates. So you if you want to update the SemVer patterns across all your package.json files, you’ll need to use an external tool.

But that isn't too clear. Do we just run rush update after this, and all is taken care of?

At the moment I can not run rush update with guarantee of success, so I run rush purge, delete other files rush purge doesn't delete, and then finally run rush update.

But if I didn't have to do all that, I'm wondering if rush update should be enough after manual update of package.json. Even if it is that simple, it'll be worth adding to the docs.

@trusktr trusktr changed the title [discussion] How to update dependency versions? [rush] [discussion] How to update dependency versions? Jan 25, 2020
@ksjogo
Copy link

ksjogo commented Oct 16, 2020

I also would be interested on some tool listing all outdated dependencies.
Is there some 'external tool' already doing that?

@sod
Copy link

sod commented Jan 15, 2021

We use https://yarnpkg.com/package/npm-check-updates, wrapped in a script to iterate over all directories with a package.json

@ujwal-setlur
Copy link

Something like the following will do the job:

#!/usr/bin/env bash

packages=$(rush list -p --json | jq -r '. | .projects[] | .name + " " + .path + "/"')

echo "${packages}" | awk '{print $2 "package.json"}' | xargs -n 1 -x ncu "${@}" --packageFile

But I agree it would be good to have it integrated into rush

@seanpoulter-foci
Copy link

Anyone know if things have changed over the last 2 years? I'm also looking for the right command to pnpm update for browserslist/caniuse-lite.

@iclanton iclanton moved this to Needs Investigation in Bug Triage Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Investigation
Development

No branches or pull requests

5 participants