{"name":"npm-force-resolutions","version":"0.0.4","description":"This packages modifies package-lock.json to force the installation of specific version of a transitive dependency (dependency of dependency), similar to yarn's [selective dependency resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutio","main":"index.js","scripts":{"test":"clj -m cljs.main --target node --output-to tests.js -c npm-force-resolutions.core-test && node tests.js","build":"clj -m cljs.main --target node --output-to index.js -c npm-force-resolutions.core && sed -i -e 's/path\\.resolve(\"\\.\")/__dirname/g' index.js"},"bin":{"npm-force-resolutions":"index.js"},"author":{"name":"rogeriochaves"},"license":"MIT","dependencies":{"json-format":"^1.0.1","source-map-support":"^0.5.5","xmlhttprequest":"^1.8.0"},"repository":{"type":"git","url":"git+https://github.com/rogeriochaves/npm-force-resolutions.git"},"gitHead":"bb5366b80ed2ef45097b8ef7a2f837996a431f91","bugs":{"url":"https://github.com/rogeriochaves/npm-force-resolutions/issues"},"homepage":"https://github.com/rogeriochaves/npm-force-resolutions#readme","_id":"npm-force-resolutions@0.0.4","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","dist":{"integrity":"sha512-KncwZq+a38AnEPhhvqrPCS/zKSNPcmQhm7rAm3kkDvoBWIzWFl09eZrmMqLbhDBYrOZmGZKBJHp7zV4O6oWu1w==","shasum":"4527f0fcb99af62cdbbf8621be36251b424f3b3b","tarball":"http://registry-npm.ywwl.com/npm-force-resolutions/download/npm-force-resolutions-0.0.4.tgz","fileCount":5,"unpackedSize":381502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNWj3CRA9TVsSAnZWagAAkFEP/j9RAlusxyCYF3LFVX/J\nzLRLlNA/gd1klK7xb0fyN6QrQXyKCye001McLtjItwsNQjxzEAtahyJmY/Nb\nZGYOe+i9tdAs3vBWft5bjPMPU7mTvjCtThzKkGZMA7j1lTtE2stcu5bhZXBQ\nnDwlhipNm8bLJt6Nicq4a1MdyJtwJjP4n5WeY5woC5UvVPE2yAPT197EWCOl\n2tLFOdW6MduBHoUtZ5R2G21YGUrBCdbzbt6caBNdU6Hl4TJpWt0w32hPVQR/\nZDq4wUcmlAAPdTb2xa4p5mi2SFtZcs85+uX0ZOzG/jT1PePhlCpOxMb8Kbtf\nt+iyyoK8y4gFuwP34dmFErzM0kcdTRRzzWjhMTb6MiQAzjIPUhTud6oFMqLa\ndcovrYzR+YBw4uIylyL32FxnbiT+kRwNzeDUQmWWtm214zmt1xVgW2nyB196\nAysSkQVQ26WHR0noMUiR4qhq+lR2PDE0PAqgXAILO7h9qfmezpA31xZkXjyr\nXJkmenG6pqFzq32TV5C+ueO2hCJOPQwRmiQ5IQAOpeaCiMgJxzVA6qQL/pFR\naciKurzV9PxErwGmF9nx3bcF2V2Z9tkRETMO/bicNHchPQhJgDV5vaBH36WQ\nQ0jMFTdjwfha5FsmGrV1tasrruRhDkxy94I7Q0vVL/hHPNN1RbsdaNjxiwrk\nBO+p\r\n=vGss\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1ZU/xRlHW9UssaleRpPatGMiuPwruBhjoVapglURPKgIgIaBjc1xyyG5w407jdfvz8pLGEftr52afAVaz2bQtcSw="}],"size":91262,"noattachment":false,"key":"/npm-force-resolutions/-/npm-force-resolutions-0.0.4.tgz"},"_npmUser":{"name":"rchaves","email":"rogeriocfj+npm@gmail.com"},"directories":{},"maintainers":[{"name":"rchaves","email":"rogeriocfj+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/npm-force-resolutions_0.0.4_1614113015322_0.7020095967673452"},"_hasShrinkwrap":false,"readme":"# NPM Force Resolutions\n\nThis packages modifies package-lock.json to force the installation of specific version of a transitive dependency (dependency of dependency), similar to yarn's [selective dependency resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/), but without having to migrate to yarn.\n\n## WARNING before you start\n\nThe use case for this is when there is a security vulnerability and you MUST update a nested dependency otherwise your project would be vulnerable. But this should only be used as a last resource, you should first update your top-level dependencies and file an issue for them to update the vulnerable sub-dependencies (`npm ls <vulnerable dependency>` can help you with that).\n\n# How to use\n\nFirst add a field `resolutions` with the dependency version you want to fix to your `package.json`, for example:\n\n```json\n\"resolutions\": {\n  \"hoek\": \"4.2.1\"\n}\n```\n\nThen add npm-force-resolutions to the preinstall script so that it patches the `package-lock` file before every `npm install` you run:\n\n```json\n\"scripts\": {\n  \"preinstall\": \"npx npm-force-resolutions\"\n}\n```\n\nNow just run `npm install` as you would normally do:\n\n```\nnpm install\n```\n\nTo confirm that the right version was installed, use:\n\n```\nnpm ls hoek\n```\n\nIf your package-lock changes, you may need to run the steps above again.\n\n# Contributing\n\nTo build the project from source you'll need to install [clojure](https://clojure.org/guides/getting_started). Then you can run:\n\n```\nnpm install\nnpm run build\n```\n","publish_time":1614113015547,"_cnpm_publish_time":1614113015547,"dist-tags":{"latest":"0.0.10"}}