{ "_id": "@isaacs/testing-peer-dep-conflict-chain-override", "name": "@isaacs/testing-peer-dep-conflict-chain-override", "dist-tags": { "latest": "1.0.0" }, "versions": { "1.0.0": { "name": "@isaacs/testing-peer-dep-conflict-chain-override", "version": "1.0.0", "description": "a peer dep that is overridden by the root dependency", "dependencies": { "@isaacs/testing-peer-dep-conflict-chain-a": "2", "@isaacs/testing-peer-dep-conflict-chain-v": "1" }, "_id": "@isaacs/testing-peer-dep-conflict-chain-override@1.0.0", "_nodeVersion": "14.8.0", "_npmVersion": "7.0.0-beta.7", "dist": { "integrity": "sha512-8ksACR989KUwfyzTujO3SkG+aUVsN/dDiu+VZ+se2g0hQRfypJ1piCmazJPVxIgBvqfZHUqdGHvWsczEU9Qghw==", "shasum": "5bb18bbf80d4ac0f5ee456be7f9860758c57a29c", "tarball": "https://registry.npmjs.org/@isaacs/testing-peer-dep-conflict-chain-override/-/testing-peer-dep-conflict-chain-override-1.0.0.tgz", "fileCount": 2, "unpackedSize": 1669, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTni6CRA9TVsSAnZWagAAz74P/0dxua++nM4YL0DbgRIc\np61b5Dyo59bKg4/CC7BFkCKxasnJxmBH99fRN6EGgVGDHq2/ovOLWNmVhwYr\nrUQEU3fkS6U3qEKAWwjWlPl1El+Nv6HYMyA29uUHNniRgkQYK2HtwLLATBgq\n96KWJxfIeon1HbJAQgV8BqqntgLnjEaEqShfr95JFEn4TDwlaR6U2QGLAn9C\nBDB6EcMiUuQv8f7Uwj0lOZt0rzdgh2yTNO2iWkWMCt0ineOr/r9m36vP4hF8\nnWzL4aa418woR3mxJ7Fz1Dd50HjpXBheU4QwUtyvSrRmuaowq+rhMONaMacH\npSf+ZnWSZBwBYOUqcf7Nm3v+cv9wY9K7U7XWee3aIevYj2YNGRsK+ZZgOy+X\nhCPZl7/uasn5wiA2YX2knic5hXrxwvzu5iyKIRZRYo6BM+9/8W7mBMN6Ikji\ntYqGHiEJNnEVTFAm6li3At6aAmuz89o4sVWrmdtSJUjsdlfsVuBL3SV5emHh\nGcVBR1YIBHH09Zf49UmV7KC0E/ySjuQM0vDputm5NXxOXGmEdBqn2MeFsnxF\njYKeUuYmEdH54H2WwfKPHKvoEOmhZs//xzPL/ukSWkVvJVoxz/sruRpBFpte\nXFLutbN58ouS+aXx572eWiKh81GrBhL88jHcA9a5D8Z6HfWIqBMfrKVP6awT\n9UFR\r\n=Hu58\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ], "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/testing-peer-dep-conflict-chain-override_1.0.0_1598978233976_0.06148032328981423" }, "_hasShrinkwrap": false } }, "time": { "created": "2020-09-01T16:37:13.939Z", "1.0.0": "2020-09-01T16:37:14.119Z", "modified": "2020-09-01T16:37:17.800Z" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ], "description": "a peer dep that is overridden by the root dependency", "readme": "A dependency that will first install its deps in one place, then have to\nhave them duped to accommodate a peer dependency from another of its deps.\n\nThis models the behavior of gatsby@2.24.53\n\n```\ngatsby -> (react-refresh@0.7.2, @pmmmwh/react-refresh-webpack-plugin@0.4.1)\n@pmmmwh/react-refresh-webpack-plugin@0.4.1 -> PEER react-refresh@0.7.2\n```\n\nInitially `@pmmmwh/react-refresh-webpack-plugin@0.4.1` is installed\nalongside `gatsby` and `react-refresh@0.7.2` like so:\n\n```\n+-- root\n +-- gatsby\n +-- @pmmmwh/react-refresh-webpack-plugin\n +-- react-refresh@0.7.2\n```\n\nThen, the peerDep from `@pmmmwh/react-refresh-webpack-plugin` on\n`react-refresh@0.8.3` is evaluated, and has nowhere to go except where the\n`react-refresh@0.7.2` is already living.\n\nSince we _can_ move `react-refresh@0.7.2` underneath `gatsby`, we do so.\n\nIn this case:\n\n```\noverride -> (a@2, v@1)\nv@1 -> PEER(a@1)\n```\n\nThis fails to install by default, because the `a` dep collides.\n\nWith `--force`, we override the peer with the direct root dep, and get:\n\n```\noverride\n+-- v@1\n+-- a@2 (valid for root, invalid for v)\n+-- b@2, c@2, ...\n```\n\nWhen installing `override` as a dep, we get:\n\n```\npush-dep\n+-- v@1\n+-- a@1\n+-- b@1, c@1, ...\n+-- override\n +-- a@2\n +-- b@2, c@2, ...\n```\n\nwhich is a compliant dependency resolution, where every module gets the\nversion of their dep that they declare.\n", "readmeFilename": "readme.md" }