-
Notifications
You must be signed in to change notification settings - Fork 158
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
Best practice for updates #47
Comments
Small comments:
Otherwise, the rest looks fine to me :) |
Edited ... The recommended workflow for updates is:
|
I think the whole content is super good, adding a possible option for people to make it easier to update versions manually: VSCode has an extension called Version Lens, that allows you to see in realtime the current version, the latest version, and the version your https://marketplace.visualstudio.com/items?itemName=pflannery.vscode-versionlens If your objective is to go to the latest version in all the dependencies, then just:
This works nicely when you have multiple packages and when you have big projects because you can actually see which are the most impactful dependencies in the system and manually check for major updates one by one. |
As a minor note I recall this CLI tool used to be handy: https://www.npmjs.com/package/npm-check-updates Perhaps it would also be useful to have instructions for other package manager like yarn and pnpm. Also monorepo tools like rush could be good to mention as well. |
Is this correct?
The recommended workflow for updates is:
npm audit
: to check for vulnerabilities in the current version you are using.npm outdated
: to list all the outdated packages. This command provides information in the Wanted, Latest, and Location columns.npm audit
may recommend updating to a major version. You should carefully review the breaking changes if any are listed.npm update <optional package name>
: to update the installed packages. If you run this command with a package name specified, the command tries to update only the specified package. If you don't specify a package, the command tries to update all the packages in the package.json file.npm audit fix --force
: this command updates the major version of the package. This command can introduce breaking changes. Use this command only if you're aware of the breaking changes and are ready to update your code to accommodate them.The text was updated successfully, but these errors were encountered: