Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npm-package-arg

Package Overview
Dependencies
Maintainers
2
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 2.0.2 to 2.0.3

10

npa.js

@@ -136,3 +136,11 @@ var url = require("url")

function maybeGitHubShorthand (arg) {
return /^[^@ \/%]+\/[^@ \/%]+$/.test(arg)
// Note: This does not fully test the git ref format.
// See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
//
// The only way to do this properly would be to shell out to
// git-check-ref-format, and as this is a fast sync function,
// we don't want to do that. Just let git fail if it turns
// out that the commit-ish is invalid.
// GH usernames cannot start with . or -
return /^[^@%\/\s\.-][^@%\/\s]*\/[^@\s\/%]+(?:#.*)?$/.test(arg)
}

@@ -139,0 +147,0 @@

2

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

@@ -5,0 +5,0 @@ "main": "npa.js",

@@ -102,2 +102,23 @@ var npa = require("../npa.js")

"user/foo-js#bar/baz": {
name: null,
type: "github",
spec: "user/foo-js#bar/baz",
raw: "user/foo-js#bar/baz"
},
"user..blerg--/..foo-js# . . . . . some . tags / / /": {
name: null,
type: "github",
spec: "user..blerg--/..foo-js# . . . . . some . tags / / /",
raw: "user..blerg--/..foo-js# . . . . . some . tags / / /"
},
"user/foo-js#bar/baz/bin": {
name: null,
type: "github",
spec: "user/foo-js#bar/baz/bin",
raw: "user/foo-js#bar/baz/bin"
},
"foo@user/foo-js": {

@@ -104,0 +125,0 @@ name: "foo",

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