Socket
Socket
Sign inDemoInstall

npm-package-arg

Package Overview
Dependencies
Maintainers
4
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-package-arg - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

CHANGELOG.md

20

npa.js

@@ -65,2 +65,4 @@ 'use strict'

return fromFile(res, where)
} else if (spec && /^npm:/i.test(spec)) {
return fromAlias(res, where)
}

@@ -235,4 +237,4 @@ if (!HostedGit) HostedGit = require('hosted-git-info')

if (match) {
setGitCommittish(res, match.gitCommittish)
res.fetchSpec = match.fetchSpec
res.gitCommittish = match.gitCommittish
} else {

@@ -258,2 +260,18 @@ setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : '')

function fromAlias (res, where) {
const subSpec = npa(res.rawSpec.substr(4), where)
if (subSpec.type === 'alias') {
throw new Error('nested aliases not supported')
}
if (!subSpec.registry) {
throw new Error('aliases only work for registry deps')
}
res.subSpec = subSpec
res.registry = true
res.type = 'alias'
res.saveSpec = null
res.fetchSpec = null
return res
}
function fromRegistry (res) {

@@ -260,0 +278,0 @@ res.registry = true

23

package.json
{
"name": "npm-package-arg",
"version": "6.0.0",
"version": "6.1.0",
"description": "Parse the things that can be arguments to `npm install`",

@@ -13,13 +13,22 @@ "main": "npa.js",

"dependencies": {
"hosted-git-info": "^2.5.0",
"osenv": "^0.1.4",
"semver": "^5.4.1",
"hosted-git-info": "^2.6.0",
"osenv": "^0.1.5",
"semver": "^5.5.0",
"validate-npm-package-name": "^3.0.0"
},
"devDependencies": {
"standard": "9.0.2",
"tap": "^10.3.0"
"standard": "^11.0.1",
"standard-version": "^4.3.0",
"tap": "^11.1.3",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
"scripts": {
"test": "standard && tap -J --coverage test/*.js"
"prerelease": "npm t",
"postrelease": "npm publish && git push --follow-tags",
"pretest": "standard",
"release": "standard-version -s",
"test": "tap -J --coverage test/*.js",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},

@@ -26,0 +35,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc