How to update each dependency in package.json to the latest version?

前端 未结 30 3295
清歌不尽
清歌不尽 2020-11-22 08:01

I copied package.json from another project and now want to bump all of the dependencies to their latest versions since this is a fresh project and I don\'t mind

30条回答
  •  一整个雨季
    2020-11-22 08:23

    If you use yarn, the following command updates all packages to their latest version:

    yarn upgrade --latest

    From their docs:

    The upgrade --latest command upgrades packages the same as the upgrade command, but ignores the version range specified in package.json. Instead, the version specified by the latest tag will be used (potentially upgrading the packages across major versions).

提交回复
热议问题