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.0 to 2.0.1

test/windows.js

14

npa.js

@@ -9,2 +9,5 @@ var url = require("url")

var isWindows = process.platform === "win32" || global.FAKE_WINDOWS
var slashRe = isWindows ? /\\|\// : /\//
var parseName = /^(?:@([^\/]+?)\/)?([^\/]+?)$/

@@ -62,2 +65,11 @@ var nameAt = /^(@([^\/]+?)\/)?([^\/]+?)@/

debug("urlparse", urlparse)
// windows paths look like urls
// don't be fooled!
if (isWindows && urlparse && urlparse.protocol &&
urlparse.protocol.match(/^[a-zA-Z]:$/)) {
debug("windows url-ish local path", urlparse)
urlparse = {}
}
if (urlparse.protocol) {

@@ -92,3 +104,3 @@ return parseUrl(res, arg, urlparse)

res.type = "range"
} else if (/\//.test(arg)) {
} else if (slashRe.test(arg)) {
parseLocal(res, arg)

@@ -95,0 +107,0 @@ } else {

2

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

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

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