Updating NPM dependencies
This commit is contained in:
66
node_modules/test-exclude/CHANGELOG.md
generated
vendored
66
node_modules/test-exclude/CHANGELOG.md
generated
vendored
@@ -1,7 +1,67 @@
|
||||
# Change Log
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [6.0.0](https://github.com/istanbuljs/test-exclude/compare/v6.0.0-alpha.3...v6.0.0) (2019-12-20)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Version bump only ([#41](https://github.com/istanbuljs/test-exclude/issues/41)) ([5708a16](https://github.com/istanbuljs/test-exclude/commit/5708a16cfc80dfec8fcf7a8a70c13278df0a91ba))
|
||||
|
||||
## [6.0.0-alpha.3](https://github.com/istanbuljs/test-exclude/compare/v6.0.0-alhpa.3...v6.0.0-alpha.3) (2019-12-09)
|
||||
|
||||
## [6.0.0-alhpa.3](https://github.com/istanbuljs/test-exclude/compare/v6.0.0-alpha.2...v6.0.0-alhpa.3) (2019-12-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Ignore options that are explicitly set undefined. ([#40](https://github.com/istanbuljs/test-exclude/issues/40)) ([b57e936](https://github.com/istanbuljs/test-exclude/commit/b57e9368aacdd548981ffd2ab6447bbd2c1e7de0))
|
||||
|
||||
## [6.0.0-alpha.2](https://github.com/istanbuljs/test-exclude/compare/v6.0.0-alpha.1...v6.0.0-alpha.2) (2019-12-07)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* `test-exclude` now exports a class so it is necessary
|
||||
to use `new TestExclude()` when creating an instance.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Directly export class, document API. ([#39](https://github.com/istanbuljs/test-exclude/issues/39)) ([3acc196](https://github.com/istanbuljs/test-exclude/commit/3acc196482e03be734effd110aa83a4e78d3ebde)), closes [#33](https://github.com/istanbuljs/test-exclude/issues/33)
|
||||
* Pull default settings from @istanbuljs/schema ([#38](https://github.com/istanbuljs/test-exclude/issues/38)) ([ffca696](https://github.com/istanbuljs/test-exclude/commit/ffca6968175c9030cebf018fb86d2c0386a61620))
|
||||
|
||||
## [6.0.0-alpha.1](https://github.com/istanbuljs/test-exclude/compare/v6.0.0-alpha.0...v6.0.0-alpha.1) (2019-09-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add async glob function ([#30](https://github.com/istanbuljs/test-exclude/issues/30)) ([e45ac10](https://github.com/istanbuljs/test-exclude/commit/e45ac10))
|
||||
|
||||
# [6.0.0-alpha.0](https://github.com/istanbuljs/istanbuljs/compare/test-exclude@5.2.3...test-exclude@6.0.0-alpha.0) (2019-06-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **win32:** Detect files on different drive as outside project ([#422](https://github.com/istanbuljs/istanbuljs/issues/422)) ([5b4ee88](https://github.com/istanbuljs/istanbuljs/commit/5b4ee88)), closes [#418](https://github.com/istanbuljs/istanbuljs/issues/418)
|
||||
* Ignore tests matching *.cjs, *.mjs and *.ts by default ([#381](https://github.com/istanbuljs/istanbuljs/issues/381)) ([0f077c2](https://github.com/istanbuljs/istanbuljs/commit/0f077c2))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* ignore files under test**s** directories by default ([#419](https://github.com/istanbuljs/istanbuljs/issues/419)) ([8ad5fd2](https://github.com/istanbuljs/istanbuljs/commit/8ad5fd2))
|
||||
* Remove configuration loading functionality ([#398](https://github.com/istanbuljs/istanbuljs/issues/398)) ([f5c93c3](https://github.com/istanbuljs/istanbuljs/commit/f5c93c3)), closes [#392](https://github.com/istanbuljs/istanbuljs/issues/392)
|
||||
* Update dependencies, require Node.js 8 ([#401](https://github.com/istanbuljs/istanbuljs/issues/401)) ([bf3a539](https://github.com/istanbuljs/istanbuljs/commit/bf3a539))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* Node.js 8 is now required
|
||||
* Remove configuration loading functionality
|
||||
|
||||
|
||||
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [5.2.3](https://github.com/istanbuljs/istanbuljs/compare/test-exclude@5.2.2...test-exclude@5.2.3) (2019-04-24)
|
||||
|
||||
|
||||
98
node_modules/test-exclude/README.md
generated
vendored
98
node_modules/test-exclude/README.md
generated
vendored
@@ -1,6 +1,6 @@
|
||||
# test-exclude
|
||||
|
||||
The file include/exclude logic used by [nyc](https://github.com/istanbuljs/nyc).
|
||||
The file include/exclude logic used by [nyc] and [babel-plugin-istanbul].
|
||||
|
||||
[](https://travis-ci.org/istanbuljs/test-exclude)
|
||||
[](https://coveralls.io/github/istanbuljs/test-exclude?branch=master)
|
||||
@@ -10,47 +10,87 @@ The file include/exclude logic used by [nyc](https://github.com/istanbuljs/nyc).
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const exclude = require('test-exclude');
|
||||
const TestExclude = require('test-exclude');
|
||||
const exclude = new TestExclude();
|
||||
if (exclude().shouldInstrument('./foo.js')) {
|
||||
// let's instrument this file for test coverage!
|
||||
}
|
||||
```
|
||||
|
||||
_you can load configuration from a key in package.json:_
|
||||
### TestExclude(options)
|
||||
|
||||
_package.json_
|
||||
The test-exclude constructor accepts an options object. The defaults are taken from
|
||||
[@istanbuljs/schema].
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "awesome-module",
|
||||
"test": {
|
||||
"include": ["**/index.js"]
|
||||
}
|
||||
}
|
||||
```
|
||||
#### options.cwd
|
||||
|
||||
_app.js_
|
||||
This is the base directory by which all comparisons are performed. Files outside `cwd`
|
||||
are not included.
|
||||
|
||||
Default: `process.cwd()`
|
||||
|
||||
#### options.exclude
|
||||
|
||||
Array of path globs to be ignored. Note this list does not include `node_modules` which
|
||||
is added separately. See [@istanbuljs/schema/default-excludes.js] for default list.
|
||||
|
||||
#### options.excludeNodeModules
|
||||
|
||||
By default `node_modules` is excluded. Setting this option `true` allows `node_modules`
|
||||
to be included.
|
||||
|
||||
#### options.include
|
||||
|
||||
Array of path globs that can be included. By default this is unrestricted giving a result
|
||||
similar to `['**']` but more optimized.
|
||||
|
||||
#### options.extension
|
||||
|
||||
Array of extensions that can be included. This ensures that nyc only attempts to process
|
||||
files which it might understand. Note use of some formats may require adding parser
|
||||
plugins to your nyc or babel configuration.
|
||||
|
||||
Default: `['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx']`
|
||||
|
||||
### TestExclude#shouldInstrument(filename): boolean
|
||||
|
||||
Test if `filename` matches the rules of this test-exclude instance.
|
||||
|
||||
```js
|
||||
const exclude = require('test-exclude');
|
||||
if (exclude({ configKey: 'test' }).shouldInstrument('./index.js')) {
|
||||
// let's instrument this file for test coverage!
|
||||
}
|
||||
const exclude = new TestExclude();
|
||||
exclude.shouldInstrument('index.js'); // true
|
||||
exclude.shouldInstrument('test.js'); // false
|
||||
exclude.shouldInstrument('README.md'); // false
|
||||
exclude.shouldInstrument('node_modules/test-exclude/index.js'); // false
|
||||
```
|
||||
|
||||
## Including node_modules folder
|
||||
In this example code:
|
||||
* `index.js` is true because it matches the default `options.extension` list
|
||||
and is not part of the default `options.exclude` list.
|
||||
* `test.js` is excluded because it matches the default `options.exclude` list.
|
||||
* `README.md` is not matched by the default `options.extension`
|
||||
* `node_modules/test-exclude/index.js` is excluded because `options.excludeNodeModules`
|
||||
is true by default.
|
||||
|
||||
by default the `node_modules` folder is added to all groups of
|
||||
exclude rules. In the rare case that you wish to instrument files
|
||||
stored in `node_modules`, a negative glob can be used:
|
||||
### TestExculde#globSync(cwd = options.cwd): Array[string]
|
||||
|
||||
```js
|
||||
const exclude = require('test-exclude');
|
||||
const e = exclude({
|
||||
exclude: ['!**/node_modules/**']
|
||||
});
|
||||
```
|
||||
This synchronously retrieves a list of files within `cwd` which should be instrumented.
|
||||
Note that setting `cwd` to a parent of `options.cwd` is ineffective, this argument can
|
||||
only be used to further restrict the result.
|
||||
|
||||
## License
|
||||
### TestExclude#glob(cwd = options.cwd): Promise<Array[string]>
|
||||
|
||||
ISC
|
||||
This function does the same as `TestExclude#globSync` but does so asynchronously. The
|
||||
Promise resolves to an Array of strings.
|
||||
|
||||
|
||||
## `test-exclude` for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
||||
The maintainers of `test-exclude` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-test-exclude?utm_source=npm-test-exclude&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
||||
[nyc]: https://github.com/istanbuljs/nyc
|
||||
[babel-plugin-istanbul]: https://github.com/istanbuljs/babel-plugin-istanbul
|
||||
[@istanbuljs/schema]: https://github.com/istanbuljs/schema
|
||||
[@istanbuljs/schema/default-excludes.js]: https://github.com/istanbuljs/schema/blob/master/default-exclude.js
|
||||
|
||||
87
node_modules/test-exclude/index.js
generated
vendored
87
node_modules/test-exclude/index.js
generated
vendored
@@ -1,26 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const glob = require('glob');
|
||||
const { promisify } = require('util');
|
||||
const glob = promisify(require('glob'));
|
||||
const minimatch = require('minimatch');
|
||||
const readPkgUp = require('read-pkg-up');
|
||||
const requireMainFilename = require('require-main-filename');
|
||||
const { defaults } = require('@istanbuljs/schema');
|
||||
const isOutsideDir = require('./is-outside-dir');
|
||||
|
||||
class TestExclude {
|
||||
constructor(opts) {
|
||||
constructor(opts = {}) {
|
||||
Object.assign(
|
||||
this,
|
||||
{
|
||||
cwd: process.cwd(),
|
||||
include: false,
|
||||
relativePath: true,
|
||||
configKey: null, // the key to load config from in package.json.
|
||||
configPath: null, // optionally override requireMainFilename.
|
||||
configFound: false,
|
||||
excludeNodeModules: true,
|
||||
extension: false
|
||||
},
|
||||
opts
|
||||
{relativePath: true},
|
||||
defaults.testExclude
|
||||
);
|
||||
|
||||
for (const [name, value] of Object.entries(opts)) {
|
||||
if (value !== undefined) {
|
||||
this[name] = value;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof this.include === 'string') {
|
||||
this.include = [this.include];
|
||||
}
|
||||
@@ -31,21 +31,10 @@ class TestExclude {
|
||||
|
||||
if (typeof this.extension === 'string') {
|
||||
this.extension = [this.extension];
|
||||
} else if (
|
||||
!Array.isArray(this.extension) ||
|
||||
this.extension.length === 0
|
||||
) {
|
||||
} else if (this.extension.length === 0) {
|
||||
this.extension = false;
|
||||
}
|
||||
|
||||
if (!this.include && !this.exclude && this.configKey) {
|
||||
Object.assign(this, this.pkgConf(this.configKey, this.configPath));
|
||||
}
|
||||
|
||||
if (!this.exclude || !Array.isArray(this.exclude)) {
|
||||
this.exclude = exportFunc.defaultExclude;
|
||||
}
|
||||
|
||||
if (this.include && this.include.length > 0) {
|
||||
this.include = prepGlobPatterns([].concat(this.include));
|
||||
} else {
|
||||
@@ -99,7 +88,7 @@ class TestExclude {
|
||||
relFile = relFile || path.relative(this.cwd, filename);
|
||||
|
||||
// Don't instrument files that are outside of the current working directory.
|
||||
if (/^\.\./.test(path.relative(this.cwd, filename))) {
|
||||
if (isOutsideDir(this.cwd, filename)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -114,19 +103,6 @@ class TestExclude {
|
||||
);
|
||||
}
|
||||
|
||||
pkgConf(key, path) {
|
||||
const cwd = path || requireMainFilename(require);
|
||||
const obj = readPkgUp.sync({ cwd });
|
||||
|
||||
if (obj.pkg && obj.pkg[key] && typeof obj.pkg[key] === 'object') {
|
||||
this.configFound = true;
|
||||
|
||||
return obj.pkg[key];
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
globSync(cwd = this.cwd) {
|
||||
const globPatterns = getExtensionPattern(this.extension || []);
|
||||
const globOptions = { cwd, nodir: true, dot: true };
|
||||
@@ -140,6 +116,19 @@ class TestExclude {
|
||||
.sync(globPatterns, globOptions)
|
||||
.filter(file => this.shouldInstrument(path.resolve(cwd, file)));
|
||||
}
|
||||
|
||||
async glob(cwd = this.cwd) {
|
||||
const globPatterns = getExtensionPattern(this.extension || []);
|
||||
const globOptions = { cwd, nodir: true, dot: true };
|
||||
/* If we don't have any excludeNegated then we can optimize glob by telling
|
||||
* it to not iterate into unwanted directory trees (like node_modules). */
|
||||
if (this.excludeNegated.length === 0) {
|
||||
globOptions.ignore = this.exclude;
|
||||
}
|
||||
|
||||
const list = await glob(globPatterns, globOptions);
|
||||
return list.filter(file => this.shouldInstrument(path.resolve(cwd, file)));
|
||||
}
|
||||
}
|
||||
|
||||
function prepGlobPatterns(patterns) {
|
||||
@@ -169,18 +158,4 @@ function getExtensionPattern(extension) {
|
||||
}
|
||||
}
|
||||
|
||||
const exportFunc = opts => new TestExclude(opts);
|
||||
|
||||
const devConfigs = ['ava', 'babel', 'jest', 'nyc', 'rollup', 'webpack'];
|
||||
|
||||
exportFunc.defaultExclude = [
|
||||
'coverage/**',
|
||||
'packages/*/test/**',
|
||||
'test/**',
|
||||
'test{,-*}.js',
|
||||
'**/*{.,-}test.js',
|
||||
'**/__tests__/**',
|
||||
`**/{${devConfigs.join()}}.config.js`
|
||||
];
|
||||
|
||||
module.exports = exportFunc;
|
||||
module.exports = TestExclude;
|
||||
|
||||
7
node_modules/test-exclude/is-outside-dir-posix.js
generated
vendored
Normal file
7
node_modules/test-exclude/is-outside-dir-posix.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
||||
module.exports = function(dir, filename) {
|
||||
return /^\.\./.test(path.relative(dir, filename));
|
||||
};
|
||||
10
node_modules/test-exclude/is-outside-dir-win32.js
generated
vendored
Normal file
10
node_modules/test-exclude/is-outside-dir-win32.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const minimatch = require('minimatch');
|
||||
|
||||
const dot = { dot: true };
|
||||
|
||||
module.exports = function(dir, filename) {
|
||||
return !minimatch(path.resolve(dir, filename), path.join(dir, '**'), dot);
|
||||
};
|
||||
7
node_modules/test-exclude/is-outside-dir.js
generated
vendored
Normal file
7
node_modules/test-exclude/is-outside-dir.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
module.exports = require('./is-outside-dir-win32');
|
||||
} else {
|
||||
module.exports = require('./is-outside-dir-posix');
|
||||
}
|
||||
60
node_modules/test-exclude/package.json
generated
vendored
60
node_modules/test-exclude/package.json
generated
vendored
@@ -1,54 +1,54 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"test-exclude@5.2.3",
|
||||
"/Users/drew.heavner/Documents/Github/upload-google-play"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "test-exclude@5.2.3",
|
||||
"_id": "test-exclude@5.2.3",
|
||||
"_from": "test-exclude@^6.0.0",
|
||||
"_id": "test-exclude@6.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==",
|
||||
"_integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
|
||||
"_location": "/test-exclude",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "test-exclude@5.2.3",
|
||||
"raw": "test-exclude@^6.0.0",
|
||||
"name": "test-exclude",
|
||||
"escapedName": "test-exclude",
|
||||
"rawSpec": "5.2.3",
|
||||
"rawSpec": "^6.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "5.2.3"
|
||||
"fetchSpec": "^6.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-plugin-istanbul"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz",
|
||||
"_spec": "5.2.3",
|
||||
"_where": "/Users/drew.heavner/Documents/Github/upload-google-play",
|
||||
"_resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
|
||||
"_shasum": "04a8698661d805ea6fa293b6cb9e63ac044ef15e",
|
||||
"_spec": "test-exclude@^6.0.0",
|
||||
"_where": "/home/codespace/workspace/upload-google-play/node_modules/babel-plugin-istanbul",
|
||||
"author": {
|
||||
"name": "Ben Coe",
|
||||
"email": "ben@npmjs.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/istanbuljs/istanbuljs/issues"
|
||||
"url": "https://github.com/istanbuljs/test-exclude/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"glob": "^7.1.3",
|
||||
"minimatch": "^3.0.4",
|
||||
"read-pkg-up": "^4.0.0",
|
||||
"require-main-filename": "^2.0.0"
|
||||
"@istanbuljs/schema": "^0.1.2",
|
||||
"glob": "^7.1.4",
|
||||
"minimatch": "^3.0.4"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "test for inclusion or exclusion of paths using globs",
|
||||
"devDependencies": {
|
||||
"nyc": "^15.0.0-beta.3",
|
||||
"standard-version": "^7.0.0",
|
||||
"tap": "^14.10.5"
|
||||
},
|
||||
"description": "test for inclusion or exclusion of paths using pkg-conf and globs",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
"node": ">=8"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
"*.js",
|
||||
"!nyc.config.js"
|
||||
],
|
||||
"gitHead": "90e60cc47833bb780680f916488ca24f0be36ca2",
|
||||
"homepage": "https://istanbul.js.org/",
|
||||
"keywords": [
|
||||
"exclude",
|
||||
@@ -62,10 +62,12 @@
|
||||
"name": "test-exclude",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/istanbuljs/istanbuljs.git"
|
||||
"url": "git+https://github.com/istanbuljs/test-exclude.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
"release": "standard-version",
|
||||
"snap": "npm test -- --snapshot",
|
||||
"test": "nyc tap"
|
||||
},
|
||||
"version": "5.2.3"
|
||||
"version": "6.0.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user