{"_id":"pkgresolve","_rev":"2784987","name":"pkgresolve","description":"Resolve a dependency of another package.","dist-tags":{"latest":"1.1.4"},"maintainers":[{"name":"timoxley","email":""}],"time":{"modified":"2022-06-13T08:03:33.000Z","created":"2014-09-28T08:26:47.709Z","1.1.4":"2016-12-09T12:44:53.372Z","1.1.3":"2014-09-28T09:53:24.619Z","1.1.2":"2014-09-28T09:50:07.764Z","1.1.1":"2014-09-28T09:43:02.009Z","1.1.0":"2014-09-28T09:07:27.040Z","1.0.0":"2014-09-28T08:26:47.709Z"},"users":{},"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/timoxley/pkgresolve.git"},"versions":{"1.1.4":{"name":"pkgresolve","version":"1.1.4","description":"Resolve a dependency of another package.","main":"index.js","bin":{"pkgresolve":"bin/pkgresolve.js"},"scripts":{"test":"npm run lint && tape test/*.js","lint":"standard"},"keywords":["npm","dependency","require","relative","path"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"MIT","devDependencies":{"standard":"^8.6.0","tape":"~4.6.3"},"dependencies":{"minimist":"~1.2.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/pkgresolve.git"},"bugs":{"url":"https://github.com/timoxley/pkgresolve/issues"},"homepage":"https://github.com/timoxley/pkgresolve","gitHead":"940facfa416413b7a10bf770048abc9ec076a82a","_id":"pkgresolve@1.1.4","_shasum":"0fa499ca366888c31e97357446c6053025ae47b6","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"dist":{"shasum":"0fa499ca366888c31e97357446c6053025ae47b6","size":13301,"noattachment":false,"key":"/pkgresolve/-/pkgresolve-1.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkgresolve/download/pkgresolve-1.1.4.tgz"},"maintainers":[{"name":"timoxley","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pkgresolve-1.1.4.tgz_1481287493070_0.8774461054708809"},"publish_time":1481287493372,"_hasShrinkwrap":false,"_cnpm_publish_time":1481287493372,"_cnpmcore_publish_time":"2021-12-16T23:25:38.040Z"},"1.1.3":{"name":"pkgresolve","version":"1.1.3","description":"Resolve a dependency of another package.","main":"index.js","bin":{"pkgresolve":"bin/pkgresolve.js"},"scripts":{"test":"tape test/*.js"},"keywords":["npm","dependency","require","relative","path"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"MIT","devDependencies":{"tape":"~3.0.0"},"dependencies":{"minimist":"~1.1.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"https://github.com/timoxley/pkgresolve.git"},"bugs":{"url":"https://github.com/timoxley/pkgresolve/issues"},"homepage":"https://github.com/timoxley/pkgresolve","gitHead":"ccc790a503c52fa84cb10bd78dec331d4ca76dc2","_id":"pkgresolve@1.1.3","_shasum":"d611ced1105d3fff63ebd850a7bfa17b4dbb1dc0","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":""}],"dist":{"shasum":"d611ced1105d3fff63ebd850a7bfa17b4dbb1dc0","size":2674,"noattachment":false,"key":"/pkgresolve/-/pkgresolve-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkgresolve/download/pkgresolve-1.1.3.tgz"},"publish_time":1411898004619,"_hasShrinkwrap":false,"_cnpm_publish_time":1411898004619,"_cnpmcore_publish_time":"2021-12-16T23:25:38.246Z"},"1.1.2":{"name":"pkgresolve","version":"1.1.2","description":"Resolve a dependency of another package.","main":"index.js","bin":{"pkgresolve":"bin/pkgresolve.js"},"scripts":{"test":"tape test/*.js"},"keywords":["npm","dependency","require","relative","path"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"MIT","devDependencies":{"tape":"~3.0.0"},"dependencies":{"minimist":"~1.1.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"https://github.com/timoxley/pkgresolve.git"},"bugs":{"url":"https://github.com/timoxley/pkgresolve/issues"},"homepage":"https://github.com/timoxley/pkgresolve","gitHead":"bf4539fbdc5e27db177d1018d673954942d4c378","_id":"pkgresolve@1.1.2","_shasum":"67c12525f0773f5bfe4853ebe708d41a14a20fd4","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":""}],"dist":{"shasum":"67c12525f0773f5bfe4853ebe708d41a14a20fd4","size":2676,"noattachment":false,"key":"/pkgresolve/-/pkgresolve-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkgresolve/download/pkgresolve-1.1.2.tgz"},"publish_time":1411897807764,"_hasShrinkwrap":false,"_cnpm_publish_time":1411897807764,"_cnpmcore_publish_time":"2021-12-16T23:25:38.446Z"},"1.1.1":{"name":"pkgresolve","version":"1.1.1","description":"Resolve a dependency of another package.","main":"index.js","bin":{"pkgresolve":"bin/pkgresolve.js"},"scripts":{"test":"tape test/*.js"},"keywords":["npm","dependency","require","relative","path"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"MIT","devDependencies":{"tape":"~3.0.0"},"dependencies":{"minimist":"~1.1.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"https://github.com/timoxley/pkgresolve.git"},"bugs":{"url":"https://github.com/timoxley/pkgresolve/issues"},"homepage":"https://github.com/timoxley/pkgresolve","gitHead":"7c5205e602ec43912d35d02bd3b84d87138d2126","_id":"pkgresolve@1.1.1","_shasum":"f744a88f39d4701d3e62266ad6ac05506f64e0e5","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":""}],"dist":{"shasum":"f744a88f39d4701d3e62266ad6ac05506f64e0e5","size":2629,"noattachment":false,"key":"/pkgresolve/-/pkgresolve-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkgresolve/download/pkgresolve-1.1.1.tgz"},"publish_time":1411897382009,"_hasShrinkwrap":false,"_cnpm_publish_time":1411897382009,"_cnpmcore_publish_time":"2021-12-16T23:25:38.652Z"},"1.1.0":{"name":"pkgresolve","version":"1.1.0","description":"Resolve a dependency of another package.","main":"index.js","bin":{"pkgresolve":"bin/pkgresolve.js"},"scripts":{"test":"tape test/*.js"},"keywords":["npm","dependency","require","relative","path"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"ISC","devDependencies":{"tape":"~3.0.0"},"dependencies":{"minimist":"~1.1.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"https://github.com/timoxley/pkgresolve.git"},"bugs":{"url":"https://github.com/timoxley/pkgresolve/issues"},"homepage":"https://github.com/timoxley/pkgresolve","gitHead":"a3df07c322f3a90ab9b8f9204f3b4d11a79af9da","_id":"pkgresolve@1.1.0","_shasum":"700aab7ffc0670b8f1d830b2ccd03b16e59cbd4d","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":""}],"dist":{"shasum":"700aab7ffc0670b8f1d830b2ccd03b16e59cbd4d","size":2626,"noattachment":false,"key":"/pkgresolve/-/pkgresolve-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkgresolve/download/pkgresolve-1.1.0.tgz"},"publish_time":1411895247040,"_hasShrinkwrap":false,"_cnpm_publish_time":1411895247040,"_cnpmcore_publish_time":"2021-12-16T23:25:38.869Z"},"1.0.0":{"name":"pkgresolve","version":"1.0.0","description":"Resolve a dependency of another package.","main":"index.js","scripts":{"test":"tape test/*.js"},"keywords":["npm","dependency","require","relative","path"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"ISC","devDependencies":{"tape":"~3.0.0"},"dependencies":{},"directories":{"test":"test"},"repository":{"type":"git","url":"https://github.com/timoxley/pkgresolve.git"},"bugs":{"url":"https://github.com/timoxley/pkgresolve/issues"},"homepage":"https://github.com/timoxley/pkgresolve","gitHead":"f0a13e7681e5637a75e299d27802d059ed6245a4","_id":"pkgresolve@1.0.0","_shasum":"94f3c0d76a5ebd018e44a7ac02a9fdb450a625d9","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":""}],"dist":{"shasum":"94f3c0d76a5ebd018e44a7ac02a9fdb450a625d9","size":2254,"noattachment":false,"key":"/pkgresolve/-/pkgresolve-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkgresolve/download/pkgresolve-1.0.0.tgz"},"publish_time":1411892807709,"_hasShrinkwrap":false,"_cnpm_publish_time":1411892807709,"_cnpmcore_publish_time":"2021-12-16T23:25:39.098Z"}},"readme":"# pkgresolve\n\n### Resolve a dependency from within the context of another package.\n\n[![Build Status](https://travis-ci.org/timoxley/pkgresolve.svg)](https://travis-ci.org/timoxley/pkgresolve)\n\nUseful for hacks, monkeypatching or wrappers that require\nmanipulation of the exact dependency that would be loaded by a package.\n\n## Installation\n\n```\nnpm install --save pkgresolve\n```\n\n## Example\n\n```js\nvar resolve = require('pkgresolve')\n\n// Resolve 'through' from locally installed 'tape'\nresolve('through').from('tape', function(err, pkgPath) {\n  // pkgPath - path to through or null\n})\n\n// Resolve 'npmconf' from globally installed 'npm'\nresolve('npmconf').fromGlobal('npm', function(err, pkgPath) {\n  // pkgPath - path to npmconf or null\n})\n```\n\n## CLI\n\n```coffeescript\n# Resolve 'through' from locally installed 'tape'\npkgresolve tape through\n\n# Resolve 'npmconf' from globally installed 'npm'\npkgresolve --global npm npmconf\n```\n\n### Why not `require('parent/node_modules/child')`?\n\nDue to deduplication, `child` is not guaranteed to exist at that\nlocation. You don't even need to call `npm dedupe` for this to happen –\nnpm will not install something that is already installed in the\nhierarchy. `pkgresolve` is a more robust method.\n\n### Use Responsibly.\n\nThis intentially breaks the encapsulation provided by node/npm's\nmodule system. Don't use this unless you have to.\n\n## See Also\n\n* [sindresorhus/resolve-from](https://github.com/sindresorhus/resolve-from)\n\n# License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/timoxley/pkgresolve","bugs":{"url":"https://github.com/timoxley/pkgresolve/issues"},"license":"MIT"}