Socket
Socket
Sign inDemoInstall

deglob

Package Overview
Dependencies
Maintainers
7
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deglob - npm Package Compare versions

Comparing version 3.1.0 to 4.0.0

15

index.js

@@ -17,3 +17,3 @@ module.exports = deglob

if (typeof files === 'string') files = [ files ]
if (typeof files === 'string') files = [files]
if (files.length === 0) return nextTick(cb, null, [])

@@ -62,6 +62,7 @@

configKey: 'config',
gitIgnoreFile: '.gitignore'
gitIgnoreFile: ['.gitignore', '.git/info/exclude']
}, opts)
if (!opts.cwd) opts.cwd = process.cwd()
if (!Array.isArray(opts.gitIgnoreFile)) opts.gitIgnoreFile = [opts.gitIgnoreFile]

@@ -100,7 +101,11 @@ opts._ignore = []

// Use ignore patterns from project root .gitignore
var gitignore
var gitignores = []
try {
gitignore = fs.readFileSync(path.join(root, opts.gitIgnoreFile), 'utf8')
gitignores = opts.gitIgnoreFile.map(function (f) {
return fs.readFileSync(path.join(root, f), 'utf8')
})
} catch (e) {}
if (gitignore) opts._gitignore.addPattern(gitignore.split(/\r?\n/))
gitignores.forEach(function (gitignore) {
opts._gitignore.addPattern(gitignore.split(/\r?\n/))
})
}

@@ -107,0 +112,0 @@ }

{
"name": "deglob",
"description": "Take a list of glob patterns and return an array of file locations, respecting `.gitignore` and allowing for ignore patterns via `package.json`.",
"version": "3.1.0",
"version": "4.0.0",
"author": "Dan Flettre <fletd01@yahoo.com>",

@@ -6,0 +6,0 @@ "bugs": {

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