{"name":"dependency-path","version":"4.0.7","description":"Utilities for working with symlinked node_modules","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"lint":"tslint -c ../../tslint.json src/**/*.ts test/**/*.ts","_test":"cd ../.. && c8 --reporter lcov --reports-dir packages/dependency-path/coverage ts-node packages/dependency-path/test --type-check","test":"pnpm run compile && pnpm run _test","prepublishOnly":"pnpm run compile","compile":"rimraf lib tsconfig.tsbuildinfo && tsc --build"},"repository":{"type":"git","url":"https://github.com/pnpm/pnpm/blob/master/packages/dependency-path"},"keywords":["node_modules","pnpm","path"],"author":{"name":"Zoltan Kochan","email":"z@kochan.io","url":"https://www.kochan.io/"},"engines":{"node":">=10.13"},"license":"MIT","bugs":{"url":"https://github.com/pnpm/pnpm/issues"},"homepage":"https://github.com/pnpm/pnpm/blob/master/packages/dependency-path#readme","dependencies":{"@pnpm/types":"6.0.0","encode-registry":"2.0.2","semver":"^7.3.2"},"devDependencies":{"@types/semver":"^7.2.0","dependency-path":"link:"},"funding":"https://opencollective.com/pnpm","readme":"# dependency-path\n\n> Utilities for working with symlinked node_modules\n\n<!--@shields('npm')-->\n[![npm version](https://img.shields.io/npm/v/dependency-path.svg)](https://www.npmjs.com/package/dependency-path)\n<!--/@-->\n\nLike `path` but for packages in a symlinked `node_modules`. Symlinked `node_modules` is a unique dependencies layout that\n[pnpm](https://github.com/pnpm/pnpm) creates.\n\n## Installation\n\n```sh\n<pnpm|npm|yarn> add dependency-path\n```\n\n## Usage\n\n<!--@example('./example.js')-->\n```js\nconst dependencyPath = require('dependency-path')\n\nconst registry = 'https://registry.npmjs.org/'\n\nconsole.log(dependencyPath.isAbsolute('/foo/1.0.0'))\n//> false\n\n// it is confusing currently because relative starts with /.\n// It will be changed in the future to vice versa\nconsole.log(dependencyPath.resolve(registry, '/foo/1.0.0'))\n//> registry.npmjs.org/foo/1.0.0\n\nconsole.log(dependencyPath.relative(registry, 'registry.npmjs.org/foo/1.0.0'))\n//> /foo/1.0.0\n\nconsole.log(dependencyPath.refToAbsolute('1.0.1', 'foo', registry))\n//> registry.npmjs.org/foo/1.0.1\n\nconsole.log(dependencyPath.refToAbsolute('github.com/foo/bar/twe0jger043t0ew', 'foo', registry))\n//> github.com/foo/bar/twe0jger043t0ew\n\nconsole.log(dependencyPath.refToRelative('1.0.1', 'foo', registry))\n//> /foo/1.0.1\n\nconsole.log(dependencyPath.parse('/foo/2.0.0'))\n//> { isAbsolute: false, name: 'foo', version: '2.0.0' }\n```\n<!--/@-->\n\n## License\n\nMIT © [Zoltan Kochan](https://www.kochan.io/)\n","readmeFilename":"README.md","_id":"dependency-path@4.0.7","_nodeVersion":"12.16.3","_npmVersion":"6.14.5","dist":{"integrity":"sha512-7p7gzG0z9RDQGItCFMPdvcFL/ujGtUJv2UW2OZa5E25lgpbONtaw6iXUoafOFFFe0mQydpKat8QQ3up3nH4/Hw==","shasum":"3719a869ece9505c3951ca087a91a00a246e9bd8","tarball":"http://registry-npm.ywwl.com/dependency-path/download/dependency-path-4.0.7.tgz","fileCount":6,"unpackedSize":9638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyR7aCRA9TVsSAnZWagAAwtcP/A4ZcSUW7H0VFi8J9IOD\nTkJFOKLJ4bHojNVTORp3Q8ZhOC8OFlSYRRwG8sE04P8hQ/JpGoJ5azr5oiPB\nRwoXU/kE1O000v9nDIgSbQ5LQPryU63qEY0SU7GchdrZ0uMFOlIulLjPmT1W\nKi3RXqTlg6OgkUn3Un1Nc/nP4q6IsGooLj3/pFoyeCwiGbHHROAIv2RDQaPQ\ntYiy61uOlYhRhl1AwNjYM7XznKWtbcQwuJiPhcw//51L+FNGiHGvutz0YW4n\nmaGTkHJM753YXlSOsXUx7LZO1EBJ4rjPhQt03BuB6MZNnruUjAoyUwFhPaVx\nyR8UlAKPkOKUmH63CWrHPJaLlAhUDp3UsIC/fLglwUPKt8ThQhWoOwNJlDsa\nSAbYxGTe7VgRKglKsxDYCtpkpSJRoxQYyMKJu7w1UtxF6XJ1HBqgZSmNb0vX\nTIJnNvD1ObFMEUR8M5k1xa+QxdUufD8GWGP2kqWmlFzMzH2vhPiS62hJI//f\nggiXKmhYh9H20lpaL58V1Bl2jDhqiC7nEDvGxEUNG8zMOLHXFSx1duooR1nm\n65paBoQklfeUt4NzAO7/Zpi+H9cCByKKlOvtKqb1URwWlKVVSkUOz1DkrTH2\n6pHZkijGMwfU7OjdgqCv7V+qzRKDyZrgnS9UDYOElh9RnZlf5bOmsSfq7O1V\nZgQq\r\n=TbYv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMiwLm37MS6Qn+gS/WdO/jCtr6l8Gr1GqAvn1JgdndmAIhAIsT72TEVD7M3IZ5h695Jw54mQaw6oM96tmjC9ENdqe0"}],"size":3390,"noattachment":false,"key":"/dependency-path/-/dependency-path-4.0.7.tgz"},"maintainers":[{"name":"zkochan","email":"zoltan.kochan@gmail.com"}],"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dependency-path_4.0.7_1590238937992_0.9185104120524559"},"_hasShrinkwrap":false,"publish_time":1590238938114,"_cnpm_publish_time":1590238938114,"dist-tags":{"latest":"9.2.8","latest-6":"8.0.13","next":"4.0.6","pnpm-temp":"5.0.3"}}