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 2.0.0 to 2.1.0

11

index.js

@@ -88,7 +88,8 @@ module.exports = deglob

if (root) {
var packageOpts = pkgConfig(opts.configKey, { root: false, cwd: opts.cwd })
if (packageOpts && packageOpts.ignore) {
// Use ignore patterns from package.json ("config.ignore" property)
addIgnorePattern(packageOpts.ignore)
if (opts.usePackageJson) {
var packageOpts = pkgConfig(opts.configKey, { root: false, cwd: opts.cwd })
if (packageOpts && packageOpts.ignore) {
// Use ignore patterns from package.json ("config.ignore" property)
addIgnorePattern(packageOpts.ignore)
}
}

@@ -95,0 +96,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": "2.0.0",
"version": "2.1.0",
"author": "Dan Flettre <fletd01@yahoo.com>",

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

@@ -27,3 +27,3 @@ var path = require('path')

{
name: '*.txt useGitIgnore: true, usePackageJson: true',
name: '*.txt useGitIgnore: default, usePackageJson: default',
globs: '*.txt',

@@ -34,3 +34,3 @@ opts: Object.assign({}, opts),

{
name: '*.txt useGitIgnore: false, usePackageJson: true',
name: '*.txt useGitIgnore: false, usePackageJson: default',
globs: '*.txt',

@@ -52,9 +52,12 @@ opts: Object.assign({}, opts, {useGitIgnore: false}),

{
name: '*.txt and *.json useGitIgnore: true, usePackageJson: false',
name: '*.txt and *.json useGitIgnore: default, usePackageJson: false',
globs: ['*.txt', '*.json'],
opts: Object.assign({}, opts),
expectedFiles: ['blah.txt', 'package.json']
opts: Object.assign({}, opts, {usePackageJson: false}),
expectedFiles: [
'ignored-by-package-json.txt',
'blah.txt',
'package.json']
},
{
name: '*.txt and *.json useGitIgnore: true, usePackageJson: true, configKey: custom-ignore-blah',
name: '*.txt and *.json useGitIgnore: default, usePackageJson: default, configKey: custom-ignore-blah',
globs: ['*.txt'],

@@ -61,0 +64,0 @@ opts: Object.assign({}, opts, {configKey: 'custom-ignore-blah'}),

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