{"_id":"@pnpm/npm-package-arg","_rev":"2-6e13514d4f760f38826e8e842275a3db","name":"@pnpm/npm-package-arg","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@pnpm/npm-package-arg","version":"1.0.0","author":{"url":"http://blog.izs.me/","name":"Isaac Z. Schlueter","email":"i@izs.me"},"license":"ISC","_id":"@pnpm/npm-package-arg@1.0.0","maintainers":[{"name":"pnpmuser","email":"publish-bot@pnpm.io"},{"name":"zkochan","email":"z@kochan.io"}],"homepage":"https://github.com/zkochan/npm-package-arg","bugs":{"url":"https://github.com/zkochan/npm-package-arg/issues"},"dist":{"shasum":"2a27938f4d38c6cce5f3695fd1e7d5ed8929645e","tarball":"https://registry.npmjs.org/@pnpm/npm-package-arg/-/npm-package-arg-1.0.0.tgz","fileCount":4,"integrity":"sha512-oQYP08exi6mOPdAZZWcNIGS+KKPsnNwUBzSuAEGWuCcqwMAt3k/WVCqVIXzBxhO5sP2b43og69VHmPj6IroKqw==","signatures":[{"sig":"MEUCIQCFe+sULs7mk0xJj5set7kD5g8IWankPPQ9EmBwH0gJsQIgNv/hr4MY9dXUQqJ0AoT+C+pDpdRlKZgLlhkWLDM5934=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuvifACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6gw//UgQiY6WaUqJh0Jzf8SftbFAoNfLOqP3Hk3w/CNclrmA9sgMq\r\nEo91tYoeeDtfeKpfDBP88HflFrGMqQWaTeKG52UPFmVby2QR2DZU9LxkqZ5R\r\nt8aKLa4uu9ooee9KqJkMDRddUghkqsvTLobxxYxv7JbSqHdhfVtNUB0dvLOe\r\nMsJVDihwAgK4e0B62HIRxcYip3eYZEkxHXxH+8Th3JHRC2PyihlNHaAJOvVM\r\nXn3UxtVIihQ3as6LpYxR92CuKHX3acJgY1BrboBClxgeP/0qQKtjz53f2ErC\r\nHZJuCgutrSwcyfpPl8DRvtRLga9lKzhruv+PDXaObr7PK5yzh8435ba4krf4\r\nhsCe/XjZ+n7xRt3jOw7Cum3FLgJSuZmVNsS1lPTaHsLn9iO9cd6HJYvJIwct\r\nTKLMaqVyu5uUYZDTDnDntCLPMdv/CZATa3+HNP33Gk4SKlox/j739EtctzJW\r\nEh1fT1PO1Y6pMGP7jp2Z299JdDhSM7QppMvA1G//iomKQ85n0gUqyZHbFHA9\r\nWT/fA625PCR3YyAkYAQbqS25UHdvQFPSSOeT+a4+GAkG/Php7n2foIfxOeg/\r\nXb9/4OV62iBZw9ZP67miypLSTlFLubBK+FUlbnNWGS4fWOeATCNrAdd2+Z/l\r\n6lR6UM3UrKgoUenXbBEJNre/gcgfHMalkDE=\r\n=XcM/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"npa.js","_from":"file:pnpm-npm-package-arg-1.0.0.tgz","engines":{"node":">=14.6"},"scripts":{"test":"standard && tap -J --coverage test/*.js"},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"_resolved":"/tmp/5b24ac8b51fea780911905df5da9daab/pnpm-npm-package-arg-1.0.0.tgz","_integrity":"sha512-oQYP08exi6mOPdAZZWcNIGS+KKPsnNwUBzSuAEGWuCcqwMAt3k/WVCqVIXzBxhO5sP2b43og69VHmPj6IroKqw==","repository":{"url":"git+https://github.com/zkochan/npm-package-arg.git","type":"git"},"_npmVersion":"8.12.1","description":"Parse the things that can be arguments to `npm install`","directories":{"test":"test"},"_nodeVersion":"14.19.3","dependencies":{"semver":"^7.3.5","hosted-git-info":"^4.0.1","validate-npm-package-name":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","standard":"14.3.3"},"_npmOperationalInternal":{"tmp":"tmp/npm-package-arg_1.0.0_1656420511119_0.8521498764223687","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@pnpm/npm-package-arg","version":"2.0.0","description":"Parse the things that can be arguments to `npm install`","main":"npa.js","engines":{"node":">=18.12"},"directories":{"test":"test"},"dependencies":{"hosted-git-info":"^4.0.1","semver":"^7.3.5","validate-npm-package-name":"^4.0.0"},"devDependencies":{"standard":"14.3.3","tap":"^16.3.0"},"scripts":{"test":"standard && tap -J --no-check-coverage test/*.js"},"repository":{"type":"git","url":"git+https://github.com/zkochan/npm-package-arg.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","bugs":{"url":"https://github.com/zkochan/npm-package-arg/issues"},"homepage":"https://github.com/zkochan/npm-package-arg","_id":"@pnpm/npm-package-arg@2.0.0","gitHead":"c8d9ad1f161eb4902b52e6cae1b7b5e8451be014","_nodeVersion":"20.19.3","_npmVersion":"11.4.2","dist":{"integrity":"sha512-429x8dFMgxZoeYUTUPAMC09IeM5yQ86X1LyYEQF1P4uyvhLSCh44QKkiprX9qdwBsV9QxjeNad2QoDZy1RSeRw==","shasum":"b62a23b6e74fd6d1168a9e3c9add2d998126874d","tarball":"https://registry.npmjs.org/@pnpm/npm-package-arg/-/npm-package-arg-2.0.0.tgz","fileCount":4,"unpackedSize":14957,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE4GuM3yFk/A1yeMTews8j4LWZZgy9PVvK45Nsksq+IUAiEAugXhsHFYZY9P6sr8ZMee+rjp6xoc9qxJ4ulfvCuAKWI="}]},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"maintainers":[{"name":"pnpmuser","email":"publish-bot@pnpm.io"},{"name":"zkochan","email":"z@kochan.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/npm-package-arg_2.0.0_1753310745327_0.39926289838323026"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-28T12:48:31.046Z","modified":"2025-07-23T22:45:45.732Z","1.0.0":"2022-06-28T12:48:31.287Z","2.0.0":"2025-07-23T22:45:45.517Z"},"bugs":{"url":"https://github.com/zkochan/npm-package-arg/issues"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","homepage":"https://github.com/zkochan/npm-package-arg","repository":{"type":"git","url":"git+https://github.com/zkochan/npm-package-arg.git"},"description":"Parse the things that can be arguments to `npm install`","maintainers":[{"name":"pnpmuser","email":"publish-bot@pnpm.io"},{"name":"zkochan","email":"z@kochan.io"}],"readme":"# @pnpm/npm-package-arg\n\nParses package name and specifier passed to commands like `npm install` or\n`npm cache add`, or as found in `package.json` dependency sections.\n\n## EXAMPLES\n\n```javascript\nvar assert = require(\"assert\")\nvar npa = require(\"@pnpm/npm-package-arg\")\n\n// Pass in the descriptor, and it'll return an object\ntry {\n  var parsed = npa(\"@bar/foo@1.2\")\n} catch (ex) {\n  …\n}\n```\n\n## USING\n\n`var npa = require('@pnpm/npm-package-arg')`\n\n### var result = npa(*arg*[, *where*])\n\n* *arg* - a string that you might pass to `npm install`, like:\n`foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`,\n`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz`,\n`../foo/bar/` or `bar`.  If the *arg* you provide doesn't have a specifier\npart, eg `foo` then the specifier will default to `latest`.\n* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()`\n\n**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported.\n\n### var result = npa.resolve(*name*, *spec*[, *where*])\n\n* *name* - The name of the module you want to install. For example: `foo` or `@bar/foo`.\n* *spec* - The specifier indicating where and how you can get this module. Something like:\n`1.2`, `^1.7.17`, `http://x.com/foo.tgz`, `git+https://github.com/user/foo`,\n`bitbucket:user/foo`, `file:foo.tar.gz` or `file:../foo/bar/`.  If not\nincluded then the default is `latest`.\n* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()`\n\n**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported.\n\n## RESULT OBJECT\n\nThe objects that are returned by @pnpm/npm-package-arg contain the following\nkeys:\n\n* `type` - One of the following strings:\n  * `git` - A git repo\n  * `tag` - A tagged version, like `\"foo@latest\"`\n  * `version` - A specific version number, like `\"foo@1.2.3\"`\n  * `range` - A version range, like `\"foo@2.x\"`\n  * `file` - A local `.tar.gz`, `.tar` or `.tgz` file.\n  * `directory` - A local directory.\n  * `remote` - An http url (presumably to a tgz)\n* `registry` - If true this specifier refers to a resource hosted on a\n  registry.  This is true for `tag`, `version` and `range` types.\n* `name` - If known, the `name` field expected in the resulting pkg.\n* `scope` - If a name is something like `@org/module` then the `scope`\n  field will be set to `@org`.  If it doesn't have a scoped name, then\n  scope is `null`.\n* `escapedName` - A version of `name` escaped to match the npm scoped packages\n  specification. Mostly used when making requests against a registry. When\n  `name` is `null`, `escapedName` will also be `null`.\n* `rawSpec` - The specifier part that was parsed out in calls to `npa(arg)`,\n  or the value of `spec` in calls to `npa.resolve(name, spec).\n* `saveSpec` - The normalized specifier, for saving to package.json files.\n  `null` for registry dependencies.\n* `fetchSpec` - The version of the specifier to be used to fetch this\n  resource.  `null` for shortcuts to hosted git dependencies as there isn't\n  just one URL to try with them.\n* `gitRange` - If set, this is a semver specifier to match against git tags with\n* `gitCommittish` - If set, this is the specific committish to use with a git dependency.\n* `hosted` - If `from === 'hosted'` then this will be a `hosted-git-info`\n  object. This property is not included when serializing the object as\n  JSON.\n* `raw` - The original un-modified string that was provided.  If called as\n  `npa.resolve(name, spec)` then this will be `name + '@' + spec`.\n","readmeFilename":"README.md"}