Comparing version 1.1.2 to 2.0.0
15
index.js
module.exports = deglob | ||
var extend = require('xtend') | ||
var findRoot = require('find-root') | ||
@@ -14,9 +13,2 @@ var fs = require('fs') | ||
var DEFAULT_OPTIONS = { | ||
useGitIgnore: true, | ||
usePackageJson: true, | ||
configKey: 'config', | ||
gitIgnoreFile: '.gitignore' | ||
} | ||
function deglob (files, opts, cb) { | ||
@@ -66,3 +58,8 @@ if (typeof opts === 'function') return deglob(files, null, opts) | ||
if (!opts) opts = {} | ||
opts = extend(DEFAULT_OPTIONS, opts) | ||
opts = Object.assign({ | ||
useGitIgnore: true, | ||
usePackageJson: true, | ||
configKey: 'config', | ||
gitIgnoreFile: '.gitignore' | ||
}, opts) | ||
@@ -69,0 +66,0 @@ if (!opts.cwd) opts.cwd = process.cwd() |
{ | ||
"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": "1.1.2", | ||
"version": "2.0.0", | ||
"author": "Dan Flettre <fletd01@yahoo.com>", | ||
@@ -41,5 +41,4 @@ "bugs": { | ||
"run-parallel": "^1.1.2", | ||
"uniq": "^1.0.1", | ||
"xtend": "^4.0.0" | ||
"uniq": "^1.0.1" | ||
} | ||
} |
var path = require('path') | ||
var test = require('tape') | ||
var extend = require('xtend') | ||
var deglob = require('../') | ||
@@ -30,3 +29,3 @@ | ||
globs: '*.txt', | ||
opts: extend(opts), | ||
opts: Object.assign({}, opts), | ||
expectedFiles: ['blah.txt'] | ||
@@ -37,3 +36,3 @@ }, | ||
globs: '*.txt', | ||
opts: extend(opts, {useGitIgnore: false}), | ||
opts: Object.assign({}, opts, {useGitIgnore: false}), | ||
expectedFiles: [ | ||
@@ -46,3 +45,3 @@ 'ignored-by-git.txt', | ||
globs: '*.txt', | ||
opts: extend(opts, {useGitIgnore: false, usePackageJson: false}), | ||
opts: Object.assign({}, opts, {useGitIgnore: false, usePackageJson: false}), | ||
expectedFiles: [ | ||
@@ -56,3 +55,3 @@ 'ignored-by-git.txt', | ||
globs: ['*.txt', '*.json'], | ||
opts: extend(opts), | ||
opts: Object.assign({}, opts), | ||
expectedFiles: ['blah.txt', 'package.json'] | ||
@@ -63,5 +62,5 @@ }, | ||
globs: ['*.txt'], | ||
opts: extend(opts, {configKey: 'custom-ignore-blah'}), | ||
opts: Object.assign({}, opts, {configKey: 'custom-ignore-blah'}), | ||
expectedFiles: ['ignored-by-package-json.txt'] | ||
} | ||
] |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
12841
168
- Removedxtend@^4.0.0