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

globby

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

globby - npm Package Compare versions

Comparing version 7.0.0 to 7.1.0

1

gitignore.js

@@ -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 @@

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