Skip to content

Best practice for updates #47

@diberry

Description

@diberry

Is this correct?

The recommended workflow for updates is:

  1. Verify your existing tests pass before starting this update process.
  2. npm audit: to check for vulnerabilities in the current version you are using.
  3. npm outdated: to list all the outdated packages. This command provides information in the Wanted, Latest, and Location columns.
  4. The information from npm audit may recommend updating to a major version. You should carefully review the breaking changes if any are listed.
  5. Update the version:
    • 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.
  6. Verify your tests pass after the update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions