https://github.com/perry-mitchell/force-latest-versions
Force latest npm package versions
https://github.com/perry-mitchell/force-latest-versions
npm npm-install npm-package semver version
Last synced: 6 months ago
JSON representation
Force latest npm package versions
- Host: GitHub
- URL: https://github.com/perry-mitchell/force-latest-versions
- Owner: perry-mitchell
- License: mit
- Created: 2017-07-24T19:02:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-08T16:50:03.000Z (almost 9 years ago)
- Last Synced: 2025-10-19T19:56:24.580Z (9 months ago)
- Topics: npm, npm-install, npm-package, semver, version
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Force Latest Versions
> Force latest npm package versions.
[](https://badge.fury.io/js/force-latest)
A CLI utility to force the installation of the latest package version of all packages in `package.json` marked as `latest`. Packages with any other version specification will be ignored. `devDependencies` is only parsed if `NODE_ENV` is not "production".
> **Please note** that in most cases using `"latest"` and always installing the latest version is not good practice.
## Usage
Run the executable by entering `force-latest`. This can be added to a package's manifest as a `postinstall` script:
```json
{
"name": "MyPackage",
"scripts": {
"postinstall": "force-latest"
},
"dependencies": {
"some-library": "latest",
"other": "^1.2.3"
},
"devDependencies": {
"force-latest": "*"
}
}
```
In this example, `some-library` will always be checked after an `npm install` is run. If it is not at the latest version as specified on [npmjs.com](npmjs.com), the latest version will be installed. The library `other` will not be checked or updated.