简体   繁体   中英

NPM dependency version marked as *

I have inherited a codebase, and it has these deps listed:

"peerDependencies": {
    "react": "*",
    "react-dom": "*",
    "react-intl": "*",
    "react-redux": "*",

Am I correct that this means "grab the latest version of the package" when npm install is run? (What about beta and alpha releases?)

Yes, changing the version to '*' will install the latest with npm install --save and if already installed you can run npm update --save to update to the latest version.

The version must be parseable by node-semver, which is a dependency of npm. More on version syntax can be found here: https://docs.npmjs.com/misc/semver

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM