Socket
Socket
Sign inDemoInstall

minimatch

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minimatch - npm Package Compare versions

Comparing version 0.1.5 to 0.2.0

34

minimatch.js

@@ -133,3 +133,3 @@ module.exports = minimatch

// step 2: expand braces
var set = this.braceExpand()
var set = this.globSet = this.braceExpand()

@@ -143,3 +143,3 @@ if (options.debug) console.error(this.pattern, set)

// and will not contain any / characters
set = set.map(function (s) {
set = this.globParts = set.map(function (s) {
return s.split(slashSplit)

@@ -164,32 +164,2 @@ })

// step 4: if we have a defined root, then patterns starting with ""
// get attached to that. If we have a defined cwd, then patterns
// *not* starting with "" get attached to that.
// Exception 1: on windows, a pattern like //\?/c:/ or c:/ will
// not get anything prefixed to it.
// Exception 2: If matchBase is set, and it's just a filename,
// then don't prefix anything onto it, since it'll only match
// files with that basename anyhow.
set = set.map(function (p) {
if (process.platform === "win32" &&
( (p[0] === "" && p[1] === "" && p[2] === "\\?") // unc
|| (typeof p[0] === "string" && p[0].match(/^[a-zA-Z]:$/)) )) {
return p
}
if (options.matchBase && p.length === 1) return p
// do prefixing.
if (options.root && p[0] === "") {
var r = options.root.split(pathSplit)
if (r[r.length - 1] === "") r.pop()
r = r.concat(p.slice(1))
r.absolute = true
return r
}
if (options.cwd && p[0] !== "") {
return options.cwd.split(pathSplit).concat(p)
}
return p
})
this.set = set

@@ -196,0 +166,0 @@ }

2

package.json

@@ -5,3 +5,3 @@ {

"description": "a glob matcher in javascript",
"version": "0.1.5",
"version": "0.2.0",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

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