Syncs yarn's resolutions
versions with dependencies
and devDependencies
.
Useful for keeping yarn's resolutions up to date without using yarn upgrade
.
// package.json
{
"dependencies": {
"react": "^16.8.2"
},
"resolutions": {
"react": "16.2.0" // Will update React to dependencies version "16.8.2"
}
}
Speeds up subsequent runs with npx
using yarn
yarn add -D ensure-resolutions
using npm
npm i --dev ensure-resolutions
package.json
{
"name": "my-package",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"preinstall": "npx ensure-resolutions"
}
}