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

glob

Package Overview
Dependencies
Maintainers
1
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob - npm Package Compare versions

Comparing version 7.1.0 to 7.1.1

6

common.js

@@ -106,3 +106,7 @@ exports.alphasort = alphasort

self.cwdAbs = makeAbs(self, self.cwd)
// TODO: is an absolute `cwd` supposed to be resolved against `root`?
// e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
if (process.platform === "win32")
self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
self.nomount = !!options.nomount

@@ -109,0 +113,0 @@

18

glob.js

@@ -468,3 +468,3 @@ // Approach:

var abs = this._makeAbs(e)
var abs = isAbsolute(e) ? e : this._makeAbs(e)

@@ -512,6 +512,6 @@ if (this.mark)

function lstatcb_ (er, lstat) {
if (er)
if (er && er.code === 'ENOENT')
return cb()
var isSym = lstat.isSymbolicLink()
var isSym = lstat && lstat.isSymbolicLink()
self.symlinks[abs] = isSym

@@ -521,3 +521,3 @@

// don't bother doing a readdir in that case.
if (!isSym && !lstat.isDirectory()) {
if (!isSym && lstat && !lstat.isDirectory()) {
self.cache[abs] = 'FILE'

@@ -775,3 +775,3 @@ cb()

Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
if (er) {
if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
this.statCache[abs] = false

@@ -784,9 +784,11 @@ return cb()

if (abs.slice(-1) === '/' && !stat.isDirectory())
if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
return cb(null, false, stat)
var c = stat.isDirectory() ? 'DIR' : 'FILE'
var c = true
if (stat)
c = stat.isDirectory() ? 'DIR' : 'FILE'
this.cache[abs] = this.cache[abs] || c
if (needDir && c !== 'DIR')
if (needDir && c === 'FILE')
return cb()

@@ -793,0 +795,0 @@

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

"description": "a little globber",
"version": "7.1.0",
"version": "7.1.1",
"repository": {

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

@@ -253,7 +253,9 @@ module.exports = globSync

} catch (er) {
// lstat failed, doesn't exist
return null
if (er.code === 'ENOENT') {
// lstat failed, doesn't exist
return null
}
}
var isSym = lstat.isSymbolicLink()
var isSym = lstat && lstat.isSymbolicLink()
this.symlinks[abs] = isSym

@@ -263,3 +265,3 @@

// don't bother doing a readdir in that case.
if (!isSym && !lstat.isDirectory())
if (!isSym && lstat && !lstat.isDirectory())
this.cache[abs] = 'FILE'

@@ -449,6 +451,9 @@ else

} catch (er) {
return false
if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
this.statCache[abs] = false
return false
}
}
if (lstat.isSymbolicLink()) {
if (lstat && lstat.isSymbolicLink()) {
try {

@@ -466,6 +471,9 @@ stat = fs.statSync(abs)

var c = stat.isDirectory() ? 'DIR' : 'FILE'
var c = true
if (stat)
c = stat.isDirectory() ? 'DIR' : 'FILE'
this.cache[abs] = this.cache[abs] || c
if (needDir && c !== 'DIR')
if (needDir && c === 'FILE')
return false

@@ -472,0 +480,0 @@

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