summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/glob-parent
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-07-21 00:15:32 -0400
committerMichaël Zasso <targos@protonmail.com>2019-07-23 08:15:42 +0200
commited43880d6ba1ab6e499ef027c1e9e11a2376ba50 (patch)
treebd9551f12adfd0dc9f333adf306fc92f2417b2ad /tools/node_modules/eslint/node_modules/glob-parent
parent302865e8b9756812b45d9ff60403c2a231c01152 (diff)
downloadandroid-node-v8-ed43880d6ba1ab6e499ef027c1e9e11a2376ba50.tar.gz
android-node-v8-ed43880d6ba1ab6e499ef027c1e9e11a2376ba50.tar.bz2
android-node-v8-ed43880d6ba1ab6e499ef027c1e9e11a2376ba50.zip
tools: update ESLint to 6.1.0
Update ESLint to 6.1.0 PR-URL: https://github.com/nodejs/node/pull/28793 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/node_modules/glob-parent')
-rw-r--r--tools/node_modules/eslint/node_modules/glob-parent/LICENSE2
-rw-r--r--tools/node_modules/eslint/node_modules/glob-parent/README.md63
-rw-r--r--tools/node_modules/eslint/node_modules/glob-parent/index.js38
-rw-r--r--tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE21
-rw-r--r--tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md142
-rw-r--r--tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js25
-rw-r--r--tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json96
-rw-r--r--tools/node_modules/eslint/node_modules/glob-parent/package.json48
8 files changed, 100 insertions, 335 deletions
diff --git a/tools/node_modules/eslint/node_modules/glob-parent/LICENSE b/tools/node_modules/eslint/node_modules/glob-parent/LICENSE
index 734076d8af..63222d7a8f 100644
--- a/tools/node_modules/eslint/node_modules/glob-parent/LICENSE
+++ b/tools/node_modules/eslint/node_modules/glob-parent/LICENSE
@@ -1,6 +1,6 @@
The ISC License
-Copyright (c) 2015 Elan Shanker
+Copyright (c) 2015, 2019 Elan Shanker
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
diff --git a/tools/node_modules/eslint/node_modules/glob-parent/README.md b/tools/node_modules/eslint/node_modules/glob-parent/README.md
index 3bec5c78e4..c7fbe32022 100644
--- a/tools/node_modules/eslint/node_modules/glob-parent/README.md
+++ b/tools/node_modules/eslint/node_modules/glob-parent/README.md
@@ -1,17 +1,16 @@
-glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master)
-======
-Javascript module to extract the non-magic parent path from a glob string.
+<p align="center">
+ <a href="https://gulpjs.com">
+ <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
+ </a>
+</p>
-[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/)
-[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/)
+# glob-parent
-Usage
------
-```sh
-npm install glob-parent --save
-```
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
+
+Extract the non-magic parent path from a glob string.
-**Examples**
+## Usage
```js
var globParent = require('glob-parent');
@@ -35,12 +34,18 @@ globParent('path/foo/'); // 'path/foo'
globParent('path/foo'); // 'path' (see issue #3 for details)
```
+## API
+
+### `globParent(maybeGlobString)`
+
+Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below.
+
## Escaping
The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters:
-- `?` (question mark)
-- `*` (star)
+- `?` (question mark) unless used as a path segment alone
+- `*` (asterisk)
- `|` (pipe)
- `(` (opening parenthesis)
- `)` (closing parenthesis)
@@ -58,7 +63,7 @@ globParent('foo/\\[bar]/') // 'foo/[bar]'
## Limitations
-#### Braces & Brackets
+### Braces & Brackets
This library attempts a quick and imperfect method of determining which path
parts have glob magic without fully parsing/lexing the pattern. There are some
advanced use cases that can trip it up, such as nested braces where the outer
@@ -67,7 +72,7 @@ yourself in the unlikely circumstance of being affected by this or need to
ensure higher-fidelity glob handling in your library, it is recommended that you
pre-process your input with [expand-braces] and/or [expand-brackets].
-#### Windows
+### Windows
Backslashes are not valid path separators for globs. If a path with backslashes
is provided anyway, for simple cases, glob-parent will replace the path
separator for you and return the non-glob parent path (now with
@@ -96,14 +101,28 @@ globParent('./foo \\[bar]') // 'foo [bar]'
globParent('./foo \\[bar]*') // '.'
```
+## License
-Change Log
-----------
-[See release notes page on GitHub](https://github.com/es128/glob-parent/releases)
-
-License
--------
-[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE)
+ISC
[expand-braces]: https://github.com/jonschlinkert/expand-braces
[expand-brackets]: https://github.com/jonschlinkert/expand-brackets
+
+[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg
+[npm-url]: https://www.npmjs.com/package/glob-parent
+[npm-image]: https://img.shields.io/npm/v/glob-parent.svg
+
+[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master
+[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master
+
+[travis-url]: https://travis-ci.org/gulpjs/glob-parent
+[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci
+
+[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent
+[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor
+
+[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent
+[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg
+
+[gitter-url]: https://gitter.im/gulpjs/gulp
+[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
diff --git a/tools/node_modules/eslint/node_modules/glob-parent/index.js b/tools/node_modules/eslint/node_modules/glob-parent/index.js
index 3a14a539f0..900d3fbe3b 100644
--- a/tools/node_modules/eslint/node_modules/glob-parent/index.js
+++ b/tools/node_modules/eslint/node_modules/glob-parent/index.js
@@ -1,24 +1,34 @@
'use strict';
-var path = require('path');
-var isglob = require('is-glob');
-var pathDirname = require('path-dirname');
+var isGlob = require('is-glob');
+var pathPosixDirname = require('path').posix.dirname;
var isWin32 = require('os').platform() === 'win32';
+var slash = '/';
+var backslash = /\\/g;
+var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
+var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
+var escaped = /\\([\*\?\|\[\]\(\)\{\}])/g;
+
module.exports = function globParent(str) {
- // flip windows path separators
- if (isWin32 && str.indexOf('/') < 0) str = str.split('\\').join('/');
+ // flip windows path separators
+ if (isWin32 && str.indexOf(slash) < 0) {
+ str = str.replace(backslash, slash);
+ }
- // special case for strings ending in enclosure containing path separator
- if (/[\{\[].*[\/]*.*[\}\]]$/.test(str)) str += '/';
+ // special case for strings ending in enclosure containing path separator
+ if (enclosure.test(str)) {
+ str += slash;
+ }
- // preserves full path in case of trailing path separator
- str += 'a';
+ // preserves full path in case of trailing path separator
+ str += 'a';
- // remove path parts that are globby
- do {str = pathDirname.posix(str)}
- while (isglob(str) || /(^|[^\\])([\{\[]|\([^\)]+$)/.test(str));
+ // remove path parts that are globby
+ do {
+ str = pathPosixDirname(str);
+ } while (isGlob(str) || globby.test(str));
- // remove escape chars and return result
- return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1');
+ // remove escape chars and return result
+ return str.replace(escaped, '$1');
};
diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE
deleted file mode 100644
index 39245ac1c6..0000000000
--- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014-2016, Jon Schlinkert.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md
deleted file mode 100644
index e71dc2ceb9..0000000000
--- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md
+++ /dev/null
@@ -1,142 +0,0 @@
-# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob)
-
-> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.
-
-## Install
-
-Install with [npm](https://www.npmjs.com/):
-
-```sh
-$ npm install --save is-glob
-```
-
-You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob).
-
-## Usage
-
-```js
-var isGlob = require('is-glob');
-```
-
-**True**
-
-Patterns that have glob characters or regex patterns will return `true`:
-
-```js
-isGlob('!foo.js');
-isGlob('*.js');
-isGlob('**/abc.js');
-isGlob('abc/*.js');
-isGlob('abc/(aaa|bbb).js');
-isGlob('abc/[a-z].js');
-isGlob('abc/{a,b}.js');
-isGlob('abc/?.js');
-//=> true
-```
-
-Extglobs
-
-```js
-isGlob('abc/@(a).js');
-isGlob('abc/!(a).js');
-isGlob('abc/+(a).js');
-isGlob('abc/*(a).js');
-isGlob('abc/?(a).js');
-//=> true
-```
-
-**False**
-
-Escaped globs or extglobs return `false`:
-
-```js
-isGlob('abc/\\@(a).js');
-isGlob('abc/\\!(a).js');
-isGlob('abc/\\+(a).js');
-isGlob('abc/\\*(a).js');
-isGlob('abc/\\?(a).js');
-isGlob('\\!foo.js');
-isGlob('\\*.js');
-isGlob('\\*\\*/abc.js');
-isGlob('abc/\\*.js');
-isGlob('abc/\\(aaa|bbb).js');
-isGlob('abc/\\[a-z].js');
-isGlob('abc/\\{a,b}.js');
-isGlob('abc/\\?.js');
-//=> false
-```
-
-Patterns that do not have glob patterns return `false`:
-
-```js
-isGlob('abc.js');
-isGlob('abc/def/ghi.js');
-isGlob('foo.js');
-isGlob('abc/@.js');
-isGlob('abc/+.js');
-isGlob();
-isGlob(null);
-//=> false
-```
-
-Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)):
-
-```js
-isGlob(['**/*.js']);
-isGlob(['foo.js']);
-//=> false
-```
-
-## About
-
-### Related projects
-
-* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit")
-* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.")
-* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.")
-* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.")
-
-### Contributing
-
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
-
-### Contributors
-
-| **Commits** | **Contributor**<br/> |
-| --- | --- |
-| 40 | [jonschlinkert](https://github.com/jonschlinkert) |
-| 1 | [tuvistavie](https://github.com/tuvistavie) |
-
-### Building docs
-
-_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
-
-To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
-
-```sh
-$ npm install -g verb verb-generate-readme && verb
-```
-
-### Running tests
-
-Install dev dependencies:
-
-```sh
-$ npm install -d && npm test
-```
-
-### Author
-
-**Jon Schlinkert**
-
-* [github/jonschlinkert](https://github.com/jonschlinkert)
-* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
-
-### License
-
-Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
-Released under the [MIT license](https://github.com/jonschlinkert/is-glob/blob/master/LICENSE).
-
-***
-
-_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js
deleted file mode 100644
index 2ecbe2a74e..0000000000
--- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*!
- * is-glob <https://github.com/jonschlinkert/is-glob>
- *
- * Copyright (c) 2014-2016, Jon Schlinkert.
- * Licensed under the MIT License.
- */
-
-var isExtglob = require('is-extglob');
-
-module.exports = function isGlob(str) {
- if (typeof str !== 'string' || str === '') {
- return false;
- }
-
- if (isExtglob(str)) return true;
-
- var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/;
- var match;
-
- while ((match = regex.exec(str))) {
- if (match[2]) return true;
- str = str.slice(match.index + match[0].length);
- }
- return false;
-};
diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json
deleted file mode 100644
index e871a90c80..0000000000
--- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "author": {
- "name": "Jon Schlinkert",
- "url": "https://github.com/jonschlinkert"
- },
- "bugs": {
- "url": "https://github.com/jonschlinkert/is-glob/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Daniel Perez",
- "email": "daniel@claudetech.com",
- "url": "http://tuvistavie.com"
- },
- {
- "name": "Jon Schlinkert",
- "email": "jon.schlinkert@sellside.com",
- "url": "http://twitter.com/jonschlinkert"
- }
- ],
- "dependencies": {
- "is-extglob": "^2.1.0"
- },
- "deprecated": false,
- "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
- "devDependencies": {
- "gulp-format-md": "^0.1.10",
- "mocha": "^3.0.2"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/jonschlinkert/is-glob",
- "keywords": [
- "bash",
- "braces",
- "check",
- "exec",
- "expression",
- "extglob",
- "glob",
- "globbing",
- "globstar",
- "is",
- "match",
- "matches",
- "pattern",
- "regex",
- "regular",
- "string",
- "test"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "is-glob",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/jonschlinkert/is-glob.git"
- },
- "scripts": {
- "test": "mocha"
- },
- "verb": {
- "layout": "default",
- "plugins": [
- "gulp-format-md"
- ],
- "related": {
- "list": [
- "assemble",
- "base",
- "update",
- "verb"
- ]
- },
- "reflinks": [
- "assemble",
- "bach",
- "base",
- "composer",
- "gulp",
- "has-glob",
- "is-valid-glob",
- "micromatch",
- "npm",
- "scaffold",
- "verb",
- "vinyl"
- ]
- },
- "version": "3.1.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/glob-parent/package.json b/tools/node_modules/eslint/node_modules/glob-parent/package.json
index fd6efef930..f59d1f99f3 100644
--- a/tools/node_modules/eslint/node_modules/glob-parent/package.json
+++ b/tools/node_modules/eslint/node_modules/glob-parent/package.json
@@ -1,27 +1,44 @@
{
"author": {
- "name": "Elan Shanker",
- "url": "https://github.com/es128"
+ "name": "Gulp Team",
+ "email": "team@gulpjs.com",
+ "url": "https://gulpjs.com/"
},
"bugs": {
- "url": "https://github.com/es128/glob-parent/issues"
+ "url": "https://github.com/gulpjs/glob-parent/issues"
},
"bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Elan Shanker",
+ "url": "https://github.com/es128"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine.bublitz@gmail.com"
+ }
+ ],
"dependencies": {
- "is-glob": "^3.1.0",
- "path-dirname": "^1.0.0"
+ "is-glob": "^4.0.1"
},
"deprecated": false,
- "description": "Strips glob magic from a string to provide the parent directory path",
+ "description": "Extract the non-magic parent path from a glob string.",
"devDependencies": {
- "coveralls": "^2.11.2",
- "istanbul": "^0.3.5",
- "mocha": "^2.1.0"
+ "coveralls": "github:phated/node-coveralls#2.x",
+ "eslint": "^2.13.1",
+ "eslint-config-gulp": "^3.0.1",
+ "expect": "^1.20.2",
+ "mocha": "^6.0.2",
+ "nyc": "^13.3.0"
+ },
+ "engines": {
+ "node": ">= 6"
},
"files": [
+ "LICENSE",
"index.js"
],
- "homepage": "https://github.com/es128/glob-parent",
+ "homepage": "https://github.com/gulpjs/glob-parent#readme",
"keywords": [
"glob",
"parent",
@@ -37,11 +54,14 @@
"name": "glob-parent",
"repository": {
"type": "git",
- "url": "git+https://github.com/es128/glob-parent.git"
+ "url": "git+https://github.com/gulpjs/glob-parent.git"
},
"scripts": {
- "ci-test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls",
- "test": "istanbul test node_modules/mocha/bin/_mocha"
+ "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit",
+ "coveralls": "nyc report --reporter=text-lcov | coveralls",
+ "lint": "eslint .",
+ "pretest": "npm run lint",
+ "test": "nyc mocha --async-only"
},
- "version": "3.1.0"
+ "version": "5.0.0"
} \ No newline at end of file