Comparing version 7.0.0 to 7.1.0
@@ -66,2 +66,3 @@ 'use strict'; | ||
const normalizeOpts = opts => { | ||
opts = opts || {}; | ||
const ignore = opts.ignore || []; | ||
@@ -68,0 +69,0 @@ const cwd = opts.cwd || process.cwd(); |
@@ -133,1 +133,3 @@ 'use strict'; | ||
.some(pattern => glob.hasMagic(pattern, opts)); | ||
module.exports.gitignore = gitignore; |
144
package.json
{ | ||
"name": "globby", | ||
"version": "7.0.0", | ||
"description": "Extends `glob` with support for multiple patterns and exposes a Promise API", | ||
"license": "MIT", | ||
"repository": "sindresorhus/globby", | ||
"author": { | ||
"email": "sindresorhus@gmail.com", | ||
"name": "Sindre Sorhus", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"bench": "npm update glob-stream fast-glob && matcha bench.js", | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"gitignore.js" | ||
], | ||
"keywords": [ | ||
"all", | ||
"array", | ||
"directories", | ||
"dirs", | ||
"expand", | ||
"files", | ||
"filesystem", | ||
"filter", | ||
"find", | ||
"fnmatch", | ||
"folders", | ||
"fs", | ||
"glob", | ||
"globbing", | ||
"globs", | ||
"gulpfriendly", | ||
"match", | ||
"matcher", | ||
"minimatch", | ||
"multi", | ||
"multiple", | ||
"paths", | ||
"pattern", | ||
"patterns", | ||
"traverse", | ||
"util", | ||
"utility", | ||
"wildcard", | ||
"wildcards", | ||
"promise", | ||
"gitignore", | ||
"git" | ||
], | ||
"dependencies": { | ||
"array-union": "^1.0.1", | ||
"dir-glob": "^2.0.0", | ||
"glob": "^7.1.2", | ||
"ignore": "^3.3.5", | ||
"pify": "^3.0.0", | ||
"slash": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"fast-glob": "^1.0.1", | ||
"glob-stream": "^6.1.0", | ||
"globby": "sindresorhus/globby#master", | ||
"matcha": "^0.7.0", | ||
"rimraf": "^2.2.8", | ||
"xo": "^0.18.0" | ||
} | ||
"name": "globby", | ||
"version": "7.1.0", | ||
"description": "Extends `glob` with support for multiple patterns and exposes a Promise API", | ||
"license": "MIT", | ||
"repository": "sindresorhus/globby", | ||
"author": { | ||
"email": "sindresorhus@gmail.com", | ||
"name": "Sindre Sorhus", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"bench": "npm update glob-stream fast-glob && matcha bench.js", | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"gitignore.js" | ||
], | ||
"keywords": [ | ||
"all", | ||
"array", | ||
"directories", | ||
"dirs", | ||
"expand", | ||
"files", | ||
"filesystem", | ||
"filter", | ||
"find", | ||
"fnmatch", | ||
"folders", | ||
"fs", | ||
"glob", | ||
"globbing", | ||
"globs", | ||
"gulpfriendly", | ||
"match", | ||
"matcher", | ||
"minimatch", | ||
"multi", | ||
"multiple", | ||
"paths", | ||
"pattern", | ||
"patterns", | ||
"traverse", | ||
"util", | ||
"utility", | ||
"wildcard", | ||
"wildcards", | ||
"promise", | ||
"gitignore", | ||
"git" | ||
], | ||
"dependencies": { | ||
"array-union": "^1.0.1", | ||
"dir-glob": "^2.0.0", | ||
"glob": "^7.1.2", | ||
"ignore": "^3.3.5", | ||
"pify": "^3.0.0", | ||
"slash": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"fast-glob": "^1.0.1", | ||
"glob-stream": "^6.1.0", | ||
"globby": "sindresorhus/globby#master", | ||
"matcha": "^0.7.0", | ||
"rimraf": "^2.2.8", | ||
"xo": "^0.18.0" | ||
} | ||
} |
@@ -50,18 +50,2 @@ # globby [![Build Status](https://travis-ci.org/sindresorhus/globby.svg?branch=master)](https://travis-ci.org/sindresorhus/globby) | ||
### globby.sync(patterns, [options]) | ||
Returns an `Array` of matching paths. | ||
### globby.generateGlobTasks(patterns, [options]) | ||
Returns an `Array<Object>` in the format `{pattern: string, opts: Object}`, which can be passed as arguments to [`node-glob`](https://github.com/isaacs/node-glob). This is useful for other globbing-related packages. | ||
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration. | ||
### globby.hasMagic(patterns, [options]) | ||
Returns a `boolean` of whether there are any special glob characters in the `patterns`. | ||
Note that the options affect the results. If `noext: true` is set, then `+(a|b)` will not be considered a magic pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`, then that is considered magical, unless `nobrace: true` is set. | ||
#### patterns | ||
@@ -111,3 +95,41 @@ | ||
### globby.sync(patterns, [options]) | ||
Returns an `Array` of matching paths. | ||
### globby.generateGlobTasks(patterns, [options]) | ||
Returns an `Array<Object>` in the format `{pattern: string, opts: Object}`, which can be passed as arguments to [`node-glob`](https://github.com/isaacs/node-glob). This is useful for other globbing-related packages. | ||
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration. | ||
### globby.hasMagic(patterns, [options]) | ||
Returns a `boolean` of whether there are any special glob characters in the `patterns`. | ||
Note that the options affect the results. If `noext: true` is set, then `+(a|b)` will not be considered a magic pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`, then that is considered magical, unless `nobrace: true` is set. | ||
### globby.gitignore([options]) | ||
Returns a `Promise<(path: string) => boolean>` indicating wether a given path is ignored via a `.gitignore` file. | ||
Takes `cwd?: string` and `ignore?: string[]` as options. `.gitignore` files matched by the ignore config are not | ||
used for the resulting filter function. | ||
```js | ||
const {gitignore} = require('globby'); | ||
(async () => { | ||
const isIgnored = await gitignore(); | ||
console.log(isIgnored('some/file')); | ||
})(); | ||
``` | ||
### globby.gitignore.sync([options]) | ||
Returns a `(path: string) => boolean` indicating wether a given path is ignored via a `.gitignore` file. | ||
Takes the same options as `globby.gitignore`. | ||
## Globbing patterns | ||
@@ -114,0 +136,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12246
179
157
0