Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f)
This commit is contained in:
commit
28ccc3db2d
13974 changed files with 2618436 additions and 0 deletions
33
node_modules/@istanbuljs/load-nyc-config/CHANGELOG.md
generated
vendored
Normal file
33
node_modules/@istanbuljs/load-nyc-config/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# 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.
|
||||
|
||||
## [1.0.0](https://github.com/istanbuljs/load-nyc-config/compare/v1.0.0-alpha.2...v1.0.0) (2019-12-20)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Version bump only ([#11](https://github.com/istanbuljs/load-nyc-config/issues/11)) ([8c3f1be](https://github.com/istanbuljs/load-nyc-config/commit/8c3f1be8d4d30161088a79878c02210db4c2fbfb))
|
||||
|
||||
## [1.0.0-alpha.2](https://github.com/istanbuljs/load-nyc-config/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2019-11-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Remove support for loading .js config under `type: 'module'` ([#10](https://github.com/istanbuljs/load-nyc-config/issues/10)) ([420fe87](https://github.com/istanbuljs/load-nyc-config/commit/420fe87da7dde3e9d98ef07f0a8a03d2b4d1dcb1))
|
||||
* Resolve cwd per config that sets it ([#9](https://github.com/istanbuljs/load-nyc-config/issues/9)) ([649efdc](https://github.com/istanbuljs/load-nyc-config/commit/649efdcda405c476764eebcf15af5da542fb21e1))
|
||||
|
||||
## [1.0.0-alpha.1](https://github.com/istanbuljs/load-nyc-config/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2019-10-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Add `cwd` to returned config object ([#8](https://github.com/istanbuljs/load-nyc-config/issues/8)) ([cb5184a](https://github.com/istanbuljs/load-nyc-config/commit/cb5184a))
|
||||
|
||||
## 1.0.0-alpha.0 (2019-10-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add support for loading config from ESM modules ([#7](https://github.com/istanbuljs/load-nyc-config/issues/7)) ([bc5ea3e](https://github.com/istanbuljs/load-nyc-config/commit/bc5ea3e)), closes [#6](https://github.com/istanbuljs/load-nyc-config/issues/6)
|
||||
* Initial implementation ([ff90134](https://github.com/istanbuljs/load-nyc-config/commit/ff90134))
|
||||
16
node_modules/@istanbuljs/load-nyc-config/LICENSE
generated
vendored
Normal file
16
node_modules/@istanbuljs/load-nyc-config/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
ISC License
|
||||
|
||||
Copyright (c) 2019, Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
that the above copyright notice and this permission notice
|
||||
appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
|
||||
LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
49
node_modules/@istanbuljs/load-nyc-config/README.md
generated
vendored
Normal file
49
node_modules/@istanbuljs/load-nyc-config/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# @istanbuljs/load-nyc-config
|
||||
|
||||
The utility function which NYC uses to load configuration.
|
||||
This can be used by outside programs to calculate the configuration.
|
||||
Command-line arguments are not considered by this function.
|
||||
|
||||
```js
|
||||
const {loadNycConfig} = require('@istanbuljs/load-nyc-config');
|
||||
|
||||
console.log(loadNycConfig());
|
||||
```
|
||||
|
||||
## loadNycConfig([options])
|
||||
|
||||
### options.cwd
|
||||
|
||||
Type: `string`
|
||||
Default: `cwd` from parent nyc process or `process.cwd()`
|
||||
|
||||
### options.nycrcPath
|
||||
|
||||
Type: `string`
|
||||
Default: `undefined`
|
||||
|
||||
Name of the file containing nyc configuration.
|
||||
This can be a relative or absolute path.
|
||||
Relative paths can exist at `options.cwd` or any parent directory.
|
||||
If an nycrc is specified but cannot be found an exception is thrown.
|
||||
|
||||
If no nycrc option is provided the default priority of config files are:
|
||||
|
||||
* .nycrc
|
||||
* .nycrc.json
|
||||
* .nycrc.yml
|
||||
* .nycrc.yaml
|
||||
* nyc.config.js
|
||||
|
||||
## Configuration merging
|
||||
|
||||
Configuration is first loaded from `package.json` if found, this serves as the package
|
||||
defaults. These options can be overridden by an nycrc if found. Arrays are not merged,
|
||||
so if `package.json` sets `"require": ["@babel/register"]` and `.nycrc` sets `"require": ["esm"]`
|
||||
the effective require setting will only include `"esm"`.
|
||||
|
||||
## `@istanbuljs/load-nyc-config` for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
||||
The maintainers of `@istanbuljs/load-nyc-config` 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-istanbuljs-load-nyc-config?utm_source=npm-istanbuljs-load-nyc-config&utm_medium=referral&utm_campaign=enterprise)
|
||||
139
node_modules/@istanbuljs/load-nyc-config/index.js
generated
vendored
Normal file
139
node_modules/@istanbuljs/load-nyc-config/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const {promisify} = require('util');
|
||||
const camelcase = require('camelcase');
|
||||
const findUp = require('find-up');
|
||||
const resolveFrom = require('resolve-from');
|
||||
|
||||
const readFile = promisify(fs.readFile);
|
||||
|
||||
const standardConfigFiles = [
|
||||
'.nycrc',
|
||||
'.nycrc.json',
|
||||
'.nycrc.yml',
|
||||
'.nycrc.yaml',
|
||||
'nyc.config.js',
|
||||
'nyc.config.cjs',
|
||||
'nyc.config.mjs'
|
||||
];
|
||||
|
||||
function camelcasedConfig(config) {
|
||||
const results = {};
|
||||
for (const [field, value] of Object.entries(config)) {
|
||||
results[camelcase(field)] = value;
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
async function findPackage(options) {
|
||||
const cwd = options.cwd || process.env.NYC_CWD || process.cwd();
|
||||
const pkgPath = await findUp('package.json', {cwd});
|
||||
if (pkgPath) {
|
||||
const pkgConfig = JSON.parse(await readFile(pkgPath, 'utf8')).nyc || {};
|
||||
if ('cwd' in pkgConfig) {
|
||||
pkgConfig.cwd = path.resolve(path.dirname(pkgPath), pkgConfig.cwd);
|
||||
}
|
||||
|
||||
return {
|
||||
cwd: path.dirname(pkgPath),
|
||||
pkgConfig
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
cwd,
|
||||
pkgConfig: {}
|
||||
};
|
||||
}
|
||||
|
||||
async function actualLoad(configFile) {
|
||||
if (!configFile) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const configExt = path.extname(configFile).toLowerCase();
|
||||
switch (configExt) {
|
||||
case '.js':
|
||||
case '.cjs':
|
||||
return require(configFile);
|
||||
/* istanbul ignore next: coverage for 13.2.0+ is shown in load-esm.js */
|
||||
case '.mjs':
|
||||
return require('./load-esm')(configFile);
|
||||
case '.yml':
|
||||
case '.yaml':
|
||||
return require('js-yaml').load(await readFile(configFile, 'utf8'));
|
||||
default:
|
||||
return JSON.parse(await readFile(configFile, 'utf8'));
|
||||
}
|
||||
}
|
||||
|
||||
async function applyExtends(config, filename, loopCheck = new Set()) {
|
||||
config = camelcasedConfig(config);
|
||||
if ('extends' in config) {
|
||||
const extConfigs = [].concat(config.extends);
|
||||
if (extConfigs.some(e => typeof e !== 'string')) {
|
||||
throw new TypeError(`${filename} contains an invalid 'extends' option`);
|
||||
}
|
||||
|
||||
delete config.extends;
|
||||
const filePath = path.dirname(filename);
|
||||
for (const extConfig of extConfigs) {
|
||||
const configFile = resolveFrom.silent(filePath, extConfig) ||
|
||||
resolveFrom.silent(filePath, './' + extConfig);
|
||||
if (!configFile) {
|
||||
throw new Error(`Could not resolve configuration file ${extConfig} from ${path.dirname(filename)}.`);
|
||||
}
|
||||
|
||||
if (loopCheck.has(configFile)) {
|
||||
throw new Error(`Circular extended configurations: '${configFile}'.`);
|
||||
}
|
||||
|
||||
loopCheck.add(configFile);
|
||||
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const configLoaded = await actualLoad(configFile);
|
||||
if ('cwd' in configLoaded) {
|
||||
configLoaded.cwd = path.resolve(path.dirname(configFile), configLoaded.cwd);
|
||||
}
|
||||
|
||||
Object.assign(
|
||||
config,
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await applyExtends(configLoaded, configFile, loopCheck)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
async function loadNycConfig(options = {}) {
|
||||
const {cwd, pkgConfig} = await findPackage(options);
|
||||
const configFiles = [].concat(options.nycrcPath || standardConfigFiles);
|
||||
const configFile = await findUp(configFiles, {cwd});
|
||||
if (options.nycrcPath && !configFile) {
|
||||
throw new Error(`Requested configuration file ${options.nycrcPath} not found`);
|
||||
}
|
||||
|
||||
const config = {
|
||||
cwd,
|
||||
...(await applyExtends(pkgConfig, path.join(cwd, 'package.json'))),
|
||||
...(await applyExtends(await actualLoad(configFile), configFile))
|
||||
};
|
||||
|
||||
const arrayFields = ['require', 'extension', 'exclude', 'include'];
|
||||
for (const arrayField of arrayFields) {
|
||||
if (config[arrayField]) {
|
||||
config[arrayField] = [].concat(config[arrayField]);
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
loadNycConfig
|
||||
};
|
||||
12
node_modules/@istanbuljs/load-nyc-config/load-esm.js
generated
vendored
Normal file
12
node_modules/@istanbuljs/load-nyc-config/load-esm.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
const {pathToFileURL} = require('url');
|
||||
|
||||
module.exports = async filename => {
|
||||
const mod = await import(pathToFileURL(filename));
|
||||
if ('default' in mod === false) {
|
||||
throw new Error(`${filename} has no default export`);
|
||||
}
|
||||
|
||||
return mod.default;
|
||||
};
|
||||
137
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/index.d.ts
generated
vendored
Normal file
137
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
import {Options as LocatePathOptions} from 'locate-path';
|
||||
|
||||
declare const stop: unique symbol;
|
||||
|
||||
declare namespace findUp {
|
||||
interface Options extends LocatePathOptions {}
|
||||
|
||||
type StopSymbol = typeof stop;
|
||||
|
||||
type Match = string | StopSymbol | undefined;
|
||||
}
|
||||
|
||||
declare const findUp: {
|
||||
/**
|
||||
Find a file or directory by walking up parent directories.
|
||||
|
||||
@param name - Name of the file or directory to find. Can be multiple.
|
||||
@returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found.
|
||||
|
||||
@example
|
||||
```
|
||||
// /
|
||||
// └── Users
|
||||
// └── sindresorhus
|
||||
// ├── unicorn.png
|
||||
// └── foo
|
||||
// └── bar
|
||||
// ├── baz
|
||||
// └── example.js
|
||||
|
||||
// example.js
|
||||
import findUp = require('find-up');
|
||||
|
||||
(async () => {
|
||||
console.log(await findUp('unicorn.png'));
|
||||
//=> '/Users/sindresorhus/unicorn.png'
|
||||
|
||||
console.log(await findUp(['rainbow.png', 'unicorn.png']));
|
||||
//=> '/Users/sindresorhus/unicorn.png'
|
||||
})();
|
||||
```
|
||||
*/
|
||||
(name: string | string[], options?: findUp.Options): Promise<string | undefined>;
|
||||
|
||||
/**
|
||||
Find a file or directory by walking up parent directories.
|
||||
|
||||
@param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search.
|
||||
@returns The first path found or `undefined` if none could be found.
|
||||
|
||||
@example
|
||||
```
|
||||
import path = require('path');
|
||||
import findUp = require('find-up');
|
||||
|
||||
(async () => {
|
||||
console.log(await findUp(async directory => {
|
||||
const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png'));
|
||||
return hasUnicorns && directory;
|
||||
}, {type: 'directory'}));
|
||||
//=> '/Users/sindresorhus'
|
||||
})();
|
||||
```
|
||||
*/
|
||||
(matcher: (directory: string) => (findUp.Match | Promise<findUp.Match>), options?: findUp.Options): Promise<string | undefined>;
|
||||
|
||||
sync: {
|
||||
/**
|
||||
Synchronously find a file or directory by walking up parent directories.
|
||||
|
||||
@param name - Name of the file or directory to find. Can be multiple.
|
||||
@returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found.
|
||||
*/
|
||||
(name: string | string[], options?: findUp.Options): string | undefined;
|
||||
|
||||
/**
|
||||
Synchronously find a file or directory by walking up parent directories.
|
||||
|
||||
@param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search.
|
||||
@returns The first path found or `undefined` if none could be found.
|
||||
|
||||
@example
|
||||
```
|
||||
import path = require('path');
|
||||
import findUp = require('find-up');
|
||||
|
||||
console.log(findUp.sync(directory => {
|
||||
const hasUnicorns = findUp.sync.exists(path.join(directory, 'unicorn.png'));
|
||||
return hasUnicorns && directory;
|
||||
}, {type: 'directory'}));
|
||||
//=> '/Users/sindresorhus'
|
||||
```
|
||||
*/
|
||||
(matcher: (directory: string) => findUp.Match, options?: findUp.Options): string | undefined;
|
||||
|
||||
/**
|
||||
Synchronously check if a path exists.
|
||||
|
||||
@param path - Path to the file or directory.
|
||||
@returns Whether the path exists.
|
||||
|
||||
@example
|
||||
```
|
||||
import findUp = require('find-up');
|
||||
|
||||
console.log(findUp.sync.exists('/Users/sindresorhus/unicorn.png'));
|
||||
//=> true
|
||||
```
|
||||
*/
|
||||
exists(path: string): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
Check if a path exists.
|
||||
|
||||
@param path - Path to a file or directory.
|
||||
@returns Whether the path exists.
|
||||
|
||||
@example
|
||||
```
|
||||
import findUp = require('find-up');
|
||||
|
||||
(async () => {
|
||||
console.log(await findUp.exists('/Users/sindresorhus/unicorn.png'));
|
||||
//=> true
|
||||
})();
|
||||
```
|
||||
*/
|
||||
exists(path: string): Promise<boolean>;
|
||||
|
||||
/**
|
||||
Return this in a `matcher` function to stop the search and force `findUp` to immediately return `undefined`.
|
||||
*/
|
||||
readonly stop: findUp.StopSymbol;
|
||||
};
|
||||
|
||||
export = findUp;
|
||||
89
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/index.js
generated
vendored
Normal file
89
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
'use strict';
|
||||
const path = require('path');
|
||||
const locatePath = require('locate-path');
|
||||
const pathExists = require('path-exists');
|
||||
|
||||
const stop = Symbol('findUp.stop');
|
||||
|
||||
module.exports = async (name, options = {}) => {
|
||||
let directory = path.resolve(options.cwd || '');
|
||||
const {root} = path.parse(directory);
|
||||
const paths = [].concat(name);
|
||||
|
||||
const runMatcher = async locateOptions => {
|
||||
if (typeof name !== 'function') {
|
||||
return locatePath(paths, locateOptions);
|
||||
}
|
||||
|
||||
const foundPath = await name(locateOptions.cwd);
|
||||
if (typeof foundPath === 'string') {
|
||||
return locatePath([foundPath], locateOptions);
|
||||
}
|
||||
|
||||
return foundPath;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const foundPath = await runMatcher({...options, cwd: directory});
|
||||
|
||||
if (foundPath === stop) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (foundPath) {
|
||||
return path.resolve(directory, foundPath);
|
||||
}
|
||||
|
||||
if (directory === root) {
|
||||
return;
|
||||
}
|
||||
|
||||
directory = path.dirname(directory);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.sync = (name, options = {}) => {
|
||||
let directory = path.resolve(options.cwd || '');
|
||||
const {root} = path.parse(directory);
|
||||
const paths = [].concat(name);
|
||||
|
||||
const runMatcher = locateOptions => {
|
||||
if (typeof name !== 'function') {
|
||||
return locatePath.sync(paths, locateOptions);
|
||||
}
|
||||
|
||||
const foundPath = name(locateOptions.cwd);
|
||||
if (typeof foundPath === 'string') {
|
||||
return locatePath.sync([foundPath], locateOptions);
|
||||
}
|
||||
|
||||
return foundPath;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
const foundPath = runMatcher({...options, cwd: directory});
|
||||
|
||||
if (foundPath === stop) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (foundPath) {
|
||||
return path.resolve(directory, foundPath);
|
||||
}
|
||||
|
||||
if (directory === root) {
|
||||
return;
|
||||
}
|
||||
|
||||
directory = path.dirname(directory);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.exists = pathExists;
|
||||
|
||||
module.exports.sync.exists = pathExists.sync;
|
||||
|
||||
module.exports.stop = stop;
|
||||
9
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/license
generated
vendored
Normal file
9
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
62
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/package.json
generated
vendored
Normal file
62
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/find-up/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"locate-path": "^5.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Find a file or directory by walking up parent directories",
|
||||
"devDependencies": {
|
||||
"ava": "^2.1.0",
|
||||
"is-path-inside": "^2.1.0",
|
||||
"tempy": "^0.3.0",
|
||||
"tsd": "^0.7.3",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/find-up#readme",
|
||||
"keywords": [
|
||||
"find",
|
||||
"up",
|
||||
"find-up",
|
||||
"findup",
|
||||
"look-up",
|
||||
"look",
|
||||
"file",
|
||||
"search",
|
||||
"match",
|
||||
"package",
|
||||
"resolve",
|
||||
"parent",
|
||||
"parents",
|
||||
"folder",
|
||||
"directory",
|
||||
"walk",
|
||||
"walking",
|
||||
"path"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "find-up",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/find-up.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"version": "4.1.0"
|
||||
}
|
||||
156
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/readme.md
generated
vendored
Normal file
156
node_modules/@istanbuljs/load-nyc-config/node_modules/find-up/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
# find-up [](https://travis-ci.org/sindresorhus/find-up)
|
||||
|
||||
> Find a file or directory by walking up parent directories
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install find-up
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/
|
||||
└── Users
|
||||
└── sindresorhus
|
||||
├── unicorn.png
|
||||
└── foo
|
||||
└── bar
|
||||
├── baz
|
||||
└── example.js
|
||||
```
|
||||
|
||||
`example.js`
|
||||
|
||||
```js
|
||||
const path = require('path');
|
||||
const findUp = require('find-up');
|
||||
|
||||
(async () => {
|
||||
console.log(await findUp('unicorn.png'));
|
||||
//=> '/Users/sindresorhus/unicorn.png'
|
||||
|
||||
console.log(await findUp(['rainbow.png', 'unicorn.png']));
|
||||
//=> '/Users/sindresorhus/unicorn.png'
|
||||
|
||||
console.log(await findUp(async directory => {
|
||||
const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png'));
|
||||
return hasUnicorns && directory;
|
||||
}, {type: 'directory'}));
|
||||
//=> '/Users/sindresorhus'
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### findUp(name, options?)
|
||||
### findUp(matcher, options?)
|
||||
|
||||
Returns a `Promise` for either the path or `undefined` if it couldn't be found.
|
||||
|
||||
### findUp([...name], options?)
|
||||
|
||||
Returns a `Promise` for either the first path found (by respecting the order of the array) or `undefined` if none could be found.
|
||||
|
||||
### findUp.sync(name, options?)
|
||||
### findUp.sync(matcher, options?)
|
||||
|
||||
Returns a path or `undefined` if it couldn't be found.
|
||||
|
||||
### findUp.sync([...name], options?)
|
||||
|
||||
Returns the first path found (by respecting the order of the array) or `undefined` if none could be found.
|
||||
|
||||
#### name
|
||||
|
||||
Type: `string`
|
||||
|
||||
Name of the file or directory to find.
|
||||
|
||||
#### matcher
|
||||
|
||||
Type: `Function`
|
||||
|
||||
A function that will be called with each directory until it returns a `string` with the path, which stops the search, or the root directory has been reached and nothing was found. Useful if you want to match files with certain patterns, set of permissions, or other advanced use-cases.
|
||||
|
||||
When using async mode, the `matcher` may optionally be an async or promise-returning function that returns the path.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### cwd
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `process.cwd()`
|
||||
|
||||
Directory to start from.
|
||||
|
||||
##### type
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `'file'`<br>
|
||||
Values: `'file'` `'directory'`
|
||||
|
||||
The type of paths that can match.
|
||||
|
||||
##### allowSymlinks
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
Allow symbolic links to match if they point to the chosen path type.
|
||||
|
||||
### findUp.exists(path)
|
||||
|
||||
Returns a `Promise<boolean>` of whether the path exists.
|
||||
|
||||
### findUp.sync.exists(path)
|
||||
|
||||
Returns a `boolean` of whether the path exists.
|
||||
|
||||
#### path
|
||||
|
||||
Type: `string`
|
||||
|
||||
Path to a file or directory.
|
||||
|
||||
### findUp.stop
|
||||
|
||||
A [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that can be returned by a `matcher` function to stop the search and cause `findUp` to immediately return `undefined`. Useful as a performance optimization in case the current working directory is deeply nested in the filesystem.
|
||||
|
||||
```js
|
||||
const path = require('path');
|
||||
const findUp = require('find-up');
|
||||
|
||||
(async () => {
|
||||
await findUp(directory => {
|
||||
return path.basename(directory) === 'work' ? findUp.stop : 'logo.png';
|
||||
});
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
|
||||
- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
|
||||
- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package
|
||||
- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path
|
||||
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-find-up?utm_source=npm-find-up&utm_medium=referral&utm_campaign=readme">Get professional support for 'find-up' with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
83
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/index.d.ts
generated
vendored
Normal file
83
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
declare namespace locatePath {
|
||||
interface Options {
|
||||
/**
|
||||
Current working directory.
|
||||
|
||||
@default process.cwd()
|
||||
*/
|
||||
readonly cwd?: string;
|
||||
|
||||
/**
|
||||
Type of path to match.
|
||||
|
||||
@default 'file'
|
||||
*/
|
||||
readonly type?: 'file' | 'directory';
|
||||
|
||||
/**
|
||||
Allow symbolic links to match if they point to the requested path type.
|
||||
|
||||
@default true
|
||||
*/
|
||||
readonly allowSymlinks?: boolean;
|
||||
}
|
||||
|
||||
interface AsyncOptions extends Options {
|
||||
/**
|
||||
Number of concurrently pending promises. Minimum: `1`.
|
||||
|
||||
@default Infinity
|
||||
*/
|
||||
readonly concurrency?: number;
|
||||
|
||||
/**
|
||||
Preserve `paths` order when searching.
|
||||
|
||||
Disable this to improve performance if you don't care about the order.
|
||||
|
||||
@default true
|
||||
*/
|
||||
readonly preserveOrder?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare const locatePath: {
|
||||
/**
|
||||
Get the first path that exists on disk of multiple paths.
|
||||
|
||||
@param paths - Paths to check.
|
||||
@returns The first path that exists or `undefined` if none exists.
|
||||
|
||||
@example
|
||||
```
|
||||
import locatePath = require('locate-path');
|
||||
|
||||
const files = [
|
||||
'unicorn.png',
|
||||
'rainbow.png', // Only this one actually exists on disk
|
||||
'pony.png'
|
||||
];
|
||||
|
||||
(async () => {
|
||||
console(await locatePath(files));
|
||||
//=> 'rainbow'
|
||||
})();
|
||||
```
|
||||
*/
|
||||
(paths: Iterable<string>, options?: locatePath.AsyncOptions): Promise<
|
||||
string | undefined
|
||||
>;
|
||||
|
||||
/**
|
||||
Synchronously get the first path that exists on disk of multiple paths.
|
||||
|
||||
@param paths - Paths to check.
|
||||
@returns The first path that exists or `undefined` if none exists.
|
||||
*/
|
||||
sync(
|
||||
paths: Iterable<string>,
|
||||
options?: locatePath.Options
|
||||
): string | undefined;
|
||||
};
|
||||
|
||||
export = locatePath;
|
||||
65
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/index.js
generated
vendored
Normal file
65
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
'use strict';
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const {promisify} = require('util');
|
||||
const pLocate = require('p-locate');
|
||||
|
||||
const fsStat = promisify(fs.stat);
|
||||
const fsLStat = promisify(fs.lstat);
|
||||
|
||||
const typeMappings = {
|
||||
directory: 'isDirectory',
|
||||
file: 'isFile'
|
||||
};
|
||||
|
||||
function checkType({type}) {
|
||||
if (type in typeMappings) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Error(`Invalid type specified: ${type}`);
|
||||
}
|
||||
|
||||
const matchType = (type, stat) => type === undefined || stat[typeMappings[type]]();
|
||||
|
||||
module.exports = async (paths, options) => {
|
||||
options = {
|
||||
cwd: process.cwd(),
|
||||
type: 'file',
|
||||
allowSymlinks: true,
|
||||
...options
|
||||
};
|
||||
checkType(options);
|
||||
const statFn = options.allowSymlinks ? fsStat : fsLStat;
|
||||
|
||||
return pLocate(paths, async path_ => {
|
||||
try {
|
||||
const stat = await statFn(path.resolve(options.cwd, path_));
|
||||
return matchType(options.type, stat);
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
}, options);
|
||||
};
|
||||
|
||||
module.exports.sync = (paths, options) => {
|
||||
options = {
|
||||
cwd: process.cwd(),
|
||||
allowSymlinks: true,
|
||||
type: 'file',
|
||||
...options
|
||||
};
|
||||
checkType(options);
|
||||
const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync;
|
||||
|
||||
for (const path_ of paths) {
|
||||
try {
|
||||
const stat = statFn(path.resolve(options.cwd, path_));
|
||||
|
||||
if (matchType(options.type, stat)) {
|
||||
return path_;
|
||||
}
|
||||
} catch (_) {
|
||||
}
|
||||
}
|
||||
};
|
||||
9
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/license
generated
vendored
Normal file
9
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
54
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/package.json
generated
vendored
Normal file
54
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/locate-path/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"p-locate": "^4.1.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Get the first path that exists on disk of multiple paths",
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/locate-path#readme",
|
||||
"keywords": [
|
||||
"locate",
|
||||
"path",
|
||||
"paths",
|
||||
"file",
|
||||
"files",
|
||||
"exists",
|
||||
"find",
|
||||
"finder",
|
||||
"search",
|
||||
"searcher",
|
||||
"array",
|
||||
"iterable",
|
||||
"iterator"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "locate-path",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/locate-path.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"version": "5.0.0"
|
||||
}
|
||||
122
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/readme.md
generated
vendored
Normal file
122
node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
# locate-path [](https://travis-ci.org/sindresorhus/locate-path)
|
||||
|
||||
> Get the first path that exists on disk of multiple paths
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install locate-path
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Here we find the first file that exists on disk, in array order.
|
||||
|
||||
```js
|
||||
const locatePath = require('locate-path');
|
||||
|
||||
const files = [
|
||||
'unicorn.png',
|
||||
'rainbow.png', // Only this one actually exists on disk
|
||||
'pony.png'
|
||||
];
|
||||
|
||||
(async () => {
|
||||
console(await locatePath(files));
|
||||
//=> 'rainbow'
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### locatePath(paths, [options])
|
||||
|
||||
Returns a `Promise<string>` for the first path that exists or `undefined` if none exists.
|
||||
|
||||
#### paths
|
||||
|
||||
Type: `Iterable<string>`
|
||||
|
||||
Paths to check.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
##### concurrency
|
||||
|
||||
Type: `number`<br>
|
||||
Default: `Infinity`<br>
|
||||
Minimum: `1`
|
||||
|
||||
Number of concurrently pending promises.
|
||||
|
||||
##### preserveOrder
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
Preserve `paths` order when searching.
|
||||
|
||||
Disable this to improve performance if you don't care about the order.
|
||||
|
||||
##### cwd
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `process.cwd()`
|
||||
|
||||
Current working directory.
|
||||
|
||||
##### type
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `file`<br>
|
||||
Values: `file` `directory`
|
||||
|
||||
The type of paths that can match.
|
||||
|
||||
##### allowSymlinks
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
Allow symbolic links to match if they point to the chosen path type.
|
||||
|
||||
### locatePath.sync(paths, [options])
|
||||
|
||||
Returns the first path that exists or `undefined` if none exists.
|
||||
|
||||
#### paths
|
||||
|
||||
Type: `Iterable<string>`
|
||||
|
||||
Paths to check.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
##### cwd
|
||||
|
||||
Same as above.
|
||||
|
||||
##### type
|
||||
|
||||
Same as above.
|
||||
|
||||
##### allowSymlinks
|
||||
|
||||
Same as above.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
64
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/index.d.ts
generated
vendored
Normal file
64
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
declare namespace pLocate {
|
||||
interface Options {
|
||||
/**
|
||||
Number of concurrently pending promises returned by `tester`. Minimum: `1`.
|
||||
|
||||
@default Infinity
|
||||
*/
|
||||
readonly concurrency?: number;
|
||||
|
||||
/**
|
||||
Preserve `input` order when searching.
|
||||
|
||||
Disable this to improve performance if you don't care about the order.
|
||||
|
||||
@default true
|
||||
*/
|
||||
readonly preserveOrder?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare const pLocate: {
|
||||
/**
|
||||
Get the first fulfilled promise that satisfies the provided testing function.
|
||||
|
||||
@param input - An iterable of promises/values to test.
|
||||
@param tester - This function will receive resolved values from `input` and is expected to return a `Promise<boolean>` or `boolean`.
|
||||
@returns A `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`.
|
||||
|
||||
@example
|
||||
```
|
||||
import pathExists = require('path-exists');
|
||||
import pLocate = require('p-locate');
|
||||
|
||||
const files = [
|
||||
'unicorn.png',
|
||||
'rainbow.png', // Only this one actually exists on disk
|
||||
'pony.png'
|
||||
];
|
||||
|
||||
(async () => {
|
||||
const foundPath = await pLocate(files, file => pathExists(file));
|
||||
|
||||
console.log(foundPath);
|
||||
//=> 'rainbow'
|
||||
})();
|
||||
```
|
||||
*/
|
||||
<ValueType>(
|
||||
input: Iterable<PromiseLike<ValueType> | ValueType>,
|
||||
tester: (element: ValueType) => PromiseLike<boolean> | boolean,
|
||||
options?: pLocate.Options
|
||||
): Promise<ValueType | undefined>;
|
||||
|
||||
// TODO: Remove this for the next major release, refactor the whole definition to:
|
||||
// declare function pLocate<ValueType>(
|
||||
// input: Iterable<PromiseLike<ValueType> | ValueType>,
|
||||
// tester: (element: ValueType) => PromiseLike<boolean> | boolean,
|
||||
// options?: pLocate.Options
|
||||
// ): Promise<ValueType | undefined>;
|
||||
// export = pLocate;
|
||||
default: typeof pLocate;
|
||||
};
|
||||
|
||||
export = pLocate;
|
||||
52
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/index.js
generated
vendored
Normal file
52
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
'use strict';
|
||||
const pLimit = require('p-limit');
|
||||
|
||||
class EndError extends Error {
|
||||
constructor(value) {
|
||||
super();
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
// The input can also be a promise, so we await it
|
||||
const testElement = async (element, tester) => tester(await element);
|
||||
|
||||
// The input can also be a promise, so we `Promise.all()` them both
|
||||
const finder = async element => {
|
||||
const values = await Promise.all(element);
|
||||
if (values[1] === true) {
|
||||
throw new EndError(values[0]);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
const pLocate = async (iterable, tester, options) => {
|
||||
options = {
|
||||
concurrency: Infinity,
|
||||
preserveOrder: true,
|
||||
...options
|
||||
};
|
||||
|
||||
const limit = pLimit(options.concurrency);
|
||||
|
||||
// Start all the promises concurrently with optional limit
|
||||
const items = [...iterable].map(element => [element, limit(testElement, element, tester)]);
|
||||
|
||||
// Check the promises either serially or concurrently
|
||||
const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity);
|
||||
|
||||
try {
|
||||
await Promise.all(items.map(element => checkLimit(finder, element)));
|
||||
} catch (error) {
|
||||
if (error instanceof EndError) {
|
||||
return error.value;
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = pLocate;
|
||||
// TODO: Remove this for the next major release
|
||||
module.exports.default = pLocate;
|
||||
9
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/license
generated
vendored
Normal file
9
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
62
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/package.json
generated
vendored
Normal file
62
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/p-locate/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"p-limit": "^2.2.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Get the first fulfilled promise that satisfies the provided testing function",
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"delay": "^4.1.0",
|
||||
"in-range": "^1.0.0",
|
||||
"time-span": "^3.0.0",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/p-locate#readme",
|
||||
"keywords": [
|
||||
"promise",
|
||||
"locate",
|
||||
"find",
|
||||
"finder",
|
||||
"search",
|
||||
"searcher",
|
||||
"test",
|
||||
"array",
|
||||
"collection",
|
||||
"iterable",
|
||||
"iterator",
|
||||
"race",
|
||||
"fulfilled",
|
||||
"fastest",
|
||||
"async",
|
||||
"await",
|
||||
"promises",
|
||||
"bluebird"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "p-locate",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/p-locate.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"version": "4.1.0"
|
||||
}
|
||||
90
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/readme.md
generated
vendored
Normal file
90
node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
# p-locate [](https://travis-ci.org/sindresorhus/p-locate)
|
||||
|
||||
> Get the first fulfilled promise that satisfies the provided testing function
|
||||
|
||||
Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install p-locate
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Here we find the first file that exists on disk, in array order.
|
||||
|
||||
```js
|
||||
const pathExists = require('path-exists');
|
||||
const pLocate = require('p-locate');
|
||||
|
||||
const files = [
|
||||
'unicorn.png',
|
||||
'rainbow.png', // Only this one actually exists on disk
|
||||
'pony.png'
|
||||
];
|
||||
|
||||
(async () => {
|
||||
const foundPath = await pLocate(files, file => pathExists(file));
|
||||
|
||||
console.log(foundPath);
|
||||
//=> 'rainbow'
|
||||
})();
|
||||
```
|
||||
|
||||
*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.*
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### pLocate(input, tester, [options])
|
||||
|
||||
Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`.
|
||||
|
||||
#### input
|
||||
|
||||
Type: `Iterable<Promise | unknown>`
|
||||
|
||||
An iterable of promises/values to test.
|
||||
|
||||
#### tester(element)
|
||||
|
||||
Type: `Function`
|
||||
|
||||
This function will receive resolved values from `input` and is expected to return a `Promise<boolean>` or `boolean`.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
##### concurrency
|
||||
|
||||
Type: `number`<br>
|
||||
Default: `Infinity`<br>
|
||||
Minimum: `1`
|
||||
|
||||
Number of concurrently pending promises returned by `tester`.
|
||||
|
||||
##### preserveOrder
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
Preserve `input` order when searching.
|
||||
|
||||
Disable this to improve performance if you don't care about the order.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
|
||||
- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently
|
||||
- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled
|
||||
- [More…](https://github.com/sindresorhus/promise-fun)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
28
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/index.d.ts
generated
vendored
Normal file
28
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
declare const pathExists: {
|
||||
/**
|
||||
Check if a path exists.
|
||||
|
||||
@returns Whether the path exists.
|
||||
|
||||
@example
|
||||
```
|
||||
// foo.ts
|
||||
import pathExists = require('path-exists');
|
||||
|
||||
(async () => {
|
||||
console.log(await pathExists('foo.ts'));
|
||||
//=> true
|
||||
})();
|
||||
```
|
||||
*/
|
||||
(path: string): Promise<boolean>;
|
||||
|
||||
/**
|
||||
Synchronously check if a path exists.
|
||||
|
||||
@returns Whether the path exists.
|
||||
*/
|
||||
sync(path: string): boolean;
|
||||
};
|
||||
|
||||
export = pathExists;
|
||||
23
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/index.js
generated
vendored
Normal file
23
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
const fs = require('fs');
|
||||
const {promisify} = require('util');
|
||||
|
||||
const pAccess = promisify(fs.access);
|
||||
|
||||
module.exports = async path => {
|
||||
try {
|
||||
await pAccess(path);
|
||||
return true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.sync = path => {
|
||||
try {
|
||||
fs.accessSync(path);
|
||||
return true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
9
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/license
generated
vendored
Normal file
9
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
48
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/package.json
generated
vendored
Normal file
48
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/path-exists/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Check if a path exists",
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/path-exists#readme",
|
||||
"keywords": [
|
||||
"path",
|
||||
"exists",
|
||||
"exist",
|
||||
"file",
|
||||
"filepath",
|
||||
"fs",
|
||||
"filesystem",
|
||||
"file-system",
|
||||
"access",
|
||||
"stat"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "path-exists",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/path-exists.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"version": "4.0.0"
|
||||
}
|
||||
52
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/readme.md
generated
vendored
Normal file
52
node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# path-exists [](https://travis-ci.org/sindresorhus/path-exists)
|
||||
|
||||
> Check if a path exists
|
||||
|
||||
NOTE: `fs.existsSync` has been un-deprecated in Node.js since 6.8.0. If you only need to check synchronously, this module is not needed.
|
||||
|
||||
While [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
|
||||
|
||||
Never use this before handling a file though:
|
||||
|
||||
> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install path-exists
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
const pathExists = require('path-exists');
|
||||
|
||||
(async () => {
|
||||
console.log(await pathExists('foo.js'));
|
||||
//=> true
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### pathExists(path)
|
||||
|
||||
Returns a `Promise<boolean>` of whether the path exists.
|
||||
|
||||
### pathExists.sync(path)
|
||||
|
||||
Returns a `boolean` of whether the path exists.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
31
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/index.d.ts
generated
vendored
Normal file
31
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
declare const resolveFrom: {
|
||||
/**
|
||||
Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from a given path.
|
||||
|
||||
@param fromDirectory - Directory to resolve from.
|
||||
@param moduleId - What you would use in `require()`.
|
||||
@returns Resolved module path. Throws when the module can't be found.
|
||||
|
||||
@example
|
||||
```
|
||||
import resolveFrom = require('resolve-from');
|
||||
|
||||
// There is a file at `./foo/bar.js`
|
||||
|
||||
resolveFrom('foo', './bar');
|
||||
//=> '/Users/sindresorhus/dev/test/foo/bar.js'
|
||||
```
|
||||
*/
|
||||
(fromDirectory: string, moduleId: string): string;
|
||||
|
||||
/**
|
||||
Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from a given path.
|
||||
|
||||
@param fromDirectory - Directory to resolve from.
|
||||
@param moduleId - What you would use in `require()`.
|
||||
@returns Resolved module path or `undefined` when the module can't be found.
|
||||
*/
|
||||
silent(fromDirectory: string, moduleId: string): string | undefined;
|
||||
};
|
||||
|
||||
export = resolveFrom;
|
||||
47
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/index.js
generated
vendored
Normal file
47
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
const path = require('path');
|
||||
const Module = require('module');
|
||||
const fs = require('fs');
|
||||
|
||||
const resolveFrom = (fromDirectory, moduleId, silent) => {
|
||||
if (typeof fromDirectory !== 'string') {
|
||||
throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDirectory}\``);
|
||||
}
|
||||
|
||||
if (typeof moduleId !== 'string') {
|
||||
throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``);
|
||||
}
|
||||
|
||||
try {
|
||||
fromDirectory = fs.realpathSync(fromDirectory);
|
||||
} catch (error) {
|
||||
if (error.code === 'ENOENT') {
|
||||
fromDirectory = path.resolve(fromDirectory);
|
||||
} else if (silent) {
|
||||
return;
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
const fromFile = path.join(fromDirectory, 'noop.js');
|
||||
|
||||
const resolveFileName = () => Module._resolveFilename(moduleId, {
|
||||
id: fromFile,
|
||||
filename: fromFile,
|
||||
paths: Module._nodeModulePaths(fromDirectory)
|
||||
});
|
||||
|
||||
if (silent) {
|
||||
try {
|
||||
return resolveFileName();
|
||||
} catch (error) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return resolveFileName();
|
||||
};
|
||||
|
||||
module.exports = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId);
|
||||
module.exports.silent = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId, true);
|
||||
9
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/license
generated
vendored
Normal file
9
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
45
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/package.json
generated
vendored
Normal file
45
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/resolve-from/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Resolve the path of a module like `require.resolve()` but from a given path",
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/resolve-from#readme",
|
||||
"keywords": [
|
||||
"require",
|
||||
"resolve",
|
||||
"path",
|
||||
"module",
|
||||
"from",
|
||||
"like",
|
||||
"import"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "resolve-from",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/resolve-from.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"version": "5.0.0"
|
||||
}
|
||||
72
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/readme.md
generated
vendored
Normal file
72
node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# resolve-from [](https://travis-ci.org/sindresorhus/resolve-from)
|
||||
|
||||
> Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from a given path
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install resolve-from
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const resolveFrom = require('resolve-from');
|
||||
|
||||
// There is a file at `./foo/bar.js`
|
||||
|
||||
resolveFrom('foo', './bar');
|
||||
//=> '/Users/sindresorhus/dev/test/foo/bar.js'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### resolveFrom(fromDirectory, moduleId)
|
||||
|
||||
Like `require()`, throws when the module can't be found.
|
||||
|
||||
### resolveFrom.silent(fromDirectory, moduleId)
|
||||
|
||||
Returns `undefined` instead of throwing when the module can't be found.
|
||||
|
||||
#### fromDirectory
|
||||
|
||||
Type: `string`
|
||||
|
||||
Directory to resolve from.
|
||||
|
||||
#### moduleId
|
||||
|
||||
Type: `string`
|
||||
|
||||
What you would use in `require()`.
|
||||
|
||||
|
||||
## Tip
|
||||
|
||||
Create a partial using a bound function if you want to resolve from the same `fromDirectory` multiple times:
|
||||
|
||||
```js
|
||||
const resolveFromFoo = resolveFrom.bind(null, 'foo');
|
||||
|
||||
resolveFromFoo('./bar');
|
||||
resolveFromFoo('./baz');
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [resolve-cwd](https://github.com/sindresorhus/resolve-cwd) - Resolve the path of a module from the current working directory
|
||||
- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path
|
||||
- [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory
|
||||
- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point
|
||||
- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily
|
||||
- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
46
node_modules/@istanbuljs/load-nyc-config/package.json
generated
vendored
Normal file
46
node_modules/@istanbuljs/load-nyc-config/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"bugs": {
|
||||
"url": "https://github.com/istanbuljs/load-nyc-config/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"camelcase": "^5.3.1",
|
||||
"find-up": "^4.1.0",
|
||||
"js-yaml": "^3.13.1",
|
||||
"resolve-from": "^5.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Utility function to load nyc configuration",
|
||||
"devDependencies": {
|
||||
"semver": "^6.3.0",
|
||||
"standard-version": "^7.0.0",
|
||||
"tap": "^14.10.5",
|
||||
"xo": "^0.25.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"homepage": "https://github.com/istanbuljs/load-nyc-config#readme",
|
||||
"license": "ISC",
|
||||
"main": "index.js",
|
||||
"name": "@istanbuljs/load-nyc-config",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/istanbuljs/load-nyc-config.git"
|
||||
},
|
||||
"scripts": {
|
||||
"pretest": "xo",
|
||||
"release": "standard-version",
|
||||
"snap": "npm test -- --snapshot",
|
||||
"test": "tap"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"xo": {
|
||||
"ignores": [
|
||||
"test/fixtures/extends/invalid.*"
|
||||
],
|
||||
"rules": {
|
||||
"require-atomic-updates": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
30
node_modules/@istanbuljs/schema/CHANGELOG.md
generated
vendored
Normal file
30
node_modules/@istanbuljs/schema/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# 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.
|
||||
|
||||
### [0.1.2](https://github.com/istanbuljs/schema/compare/v0.1.1...v0.1.2) (2019-12-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Ignore *.d.ts ([#6](https://github.com/istanbuljs/schema/issues/6)) ([d867eaf](https://github.com/istanbuljs/schema/commit/d867eaff6ca4abcd4301990e2bdcdf53e438e9c4))
|
||||
* Update default exclude of dev tool configurations ([#7](https://github.com/istanbuljs/schema/issues/7)) ([c89f818](https://github.com/istanbuljs/schema/commit/c89f8185f30879bcdf8d2f1c3b7aba0ac7056fa9))
|
||||
|
||||
## [0.1.1](https://github.com/istanbuljs/schema/compare/v0.1.0...v0.1.1) (2019-10-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Add missing `instrument` option ([#3](https://github.com/istanbuljs/schema/issues/3)) ([bf1217d](https://github.com/istanbuljs/schema/commit/bf1217d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add `use-spawn-wrap` nyc option ([#4](https://github.com/istanbuljs/schema/issues/4)) ([b2ce2e8](https://github.com/istanbuljs/schema/commit/b2ce2e8))
|
||||
|
||||
## 0.1.0 (2019-10-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Initial implementation ([99bd3a5](https://github.com/istanbuljs/schema/commit/99bd3a5))
|
||||
21
node_modules/@istanbuljs/schema/LICENSE
generated
vendored
Normal file
21
node_modules/@istanbuljs/schema/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 CFWare, LLC
|
||||
|
||||
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.
|
||||
26
node_modules/@istanbuljs/schema/README.md
generated
vendored
Normal file
26
node_modules/@istanbuljs/schema/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# @istanbuljs/schema
|
||||
|
||||
[![Travis CI][travis-image]][travis-url]
|
||||
[![Greenkeeper badge][gk-image]](https://greenkeeper.io/)
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![MIT][license-image]](LICENSE)
|
||||
|
||||
Schemas describing various structures used by nyc and istanbuljs
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const {nyc} = require('@istanbuljs/schema').defaults;
|
||||
|
||||
console.log(`Default exclude list:\n\t* ${nyc.exclude.join('\n\t* ')}`);
|
||||
```
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/@istanbuljs/schema.svg
|
||||
[npm-url]: https://npmjs.org/package/@istanbuljs/schema
|
||||
[travis-image]: https://travis-ci.org/istanbuljs/schema.svg?branch=master
|
||||
[travis-url]: https://travis-ci.org/istanbuljs/schema
|
||||
[gk-image]: https://badges.greenkeeper.io/istanbuljs/schema.svg
|
||||
[downloads-image]: https://img.shields.io/npm/dm/@istanbuljs/schema.svg
|
||||
[downloads-url]: https://npmjs.org/package/@istanbuljs/schema
|
||||
[license-image]: https://img.shields.io/npm/l/@istanbuljs/schema.svg
|
||||
17
node_modules/@istanbuljs/schema/default-exclude.js
generated
vendored
Normal file
17
node_modules/@istanbuljs/schema/default-exclude.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = [
|
||||
'coverage/**',
|
||||
'packages/*/test{,s}/**',
|
||||
'**/*.d.ts',
|
||||
'test{,s}/**',
|
||||
'test{,-*}.{js,cjs,mjs,ts}',
|
||||
'**/*{.,-}test.{js,cjs,mjs,ts}',
|
||||
'**/__tests__/**',
|
||||
|
||||
/* Exclude common development tool configuration files */
|
||||
'**/{ava,nyc}.config.{js,cjs,mjs}',
|
||||
'**/jest.config.{js,cjs,mjs,ts}',
|
||||
'**/{karma,rollup,webpack}.config.js',
|
||||
'**/{babel.config,.eslintrc,.mocharc}.{js,cjs}'
|
||||
];
|
||||
462
node_modules/@istanbuljs/schema/index.js
generated
vendored
Normal file
462
node_modules/@istanbuljs/schema/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,462 @@
|
|||
'use strict';
|
||||
|
||||
const defaultExclude = require('./default-exclude.js');
|
||||
|
||||
const nycCommands = {
|
||||
all: [null, 'check-coverage', 'instrument', 'merge', 'report'],
|
||||
testExclude: [null, 'instrument', 'report', 'check-coverage'],
|
||||
instrument: [null, 'instrument'],
|
||||
checkCoverage: [null, 'report', 'check-coverage'],
|
||||
report: [null, 'report'],
|
||||
main: [null],
|
||||
instrumentOnly: ['instrument']
|
||||
};
|
||||
|
||||
const cwd = {
|
||||
description: 'working directory used when resolving paths',
|
||||
type: 'string',
|
||||
get default() {
|
||||
return process.cwd();
|
||||
},
|
||||
nycCommands: nycCommands.all
|
||||
};
|
||||
|
||||
const nycrcPath = {
|
||||
description: 'specify an explicit path to find nyc configuration',
|
||||
nycCommands: nycCommands.all
|
||||
};
|
||||
|
||||
const tempDir = {
|
||||
description: 'directory to output raw coverage information to',
|
||||
type: 'string',
|
||||
default: './.nyc_output',
|
||||
nycAlias: 't',
|
||||
nycHiddenAlias: 'temp-directory',
|
||||
nycCommands: [null, 'check-coverage', 'merge', 'report']
|
||||
};
|
||||
|
||||
const testExclude = {
|
||||
exclude: {
|
||||
description: 'a list of specific files and directories that should be excluded from coverage, glob patterns are supported',
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
},
|
||||
default: defaultExclude,
|
||||
nycCommands: nycCommands.testExclude,
|
||||
nycAlias: 'x'
|
||||
},
|
||||
excludeNodeModules: {
|
||||
description: 'whether or not to exclude all node_module folders (i.e. **/node_modules/**) by default',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.testExclude
|
||||
},
|
||||
include: {
|
||||
description: 'a list of specific files that should be covered, glob patterns are supported',
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
},
|
||||
default: [],
|
||||
nycCommands: nycCommands.testExclude,
|
||||
nycAlias: 'n'
|
||||
},
|
||||
extension: {
|
||||
description: 'a list of extensions that nyc should handle in addition to .js',
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
},
|
||||
default: ['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx'],
|
||||
nycCommands: nycCommands.testExclude,
|
||||
nycAlias: 'e'
|
||||
}
|
||||
};
|
||||
|
||||
const instrumentVisitor = {
|
||||
coverageVariable: {
|
||||
description: 'variable to store coverage',
|
||||
type: 'string',
|
||||
default: '__coverage__',
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
coverageGlobalScope: {
|
||||
description: 'scope to store the coverage variable',
|
||||
type: 'string',
|
||||
default: 'this',
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
coverageGlobalScopeFunc: {
|
||||
description: 'avoid potentially replaced `Function` when finding global scope',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
ignoreClassMethods: {
|
||||
description: 'class method names to ignore for coverage',
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
},
|
||||
default: [],
|
||||
nycCommands: nycCommands.instrument
|
||||
}
|
||||
};
|
||||
|
||||
const instrumentParseGen = {
|
||||
autoWrap: {
|
||||
description: 'allow `return` statements outside of functions',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
esModules: {
|
||||
description: 'should files be treated as ES Modules',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
parserPlugins: {
|
||||
description: 'babel parser plugins to use when parsing the source',
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
},
|
||||
/* Babel parser plugins are to be enabled when the feature is stage 3 and
|
||||
* implemented in a released version of node.js. */
|
||||
default: [
|
||||
'asyncGenerators',
|
||||
'bigInt',
|
||||
'classProperties',
|
||||
'classPrivateProperties',
|
||||
'dynamicImport',
|
||||
'importMeta',
|
||||
'objectRestSpread',
|
||||
'optionalCatchBinding'
|
||||
],
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
compact: {
|
||||
description: 'should the output be compacted?',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
preserveComments: {
|
||||
description: 'should comments be preserved in the output?',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
produceSourceMap: {
|
||||
description: 'should source maps be produced?',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.instrument
|
||||
}
|
||||
};
|
||||
|
||||
const checkCoverage = {
|
||||
excludeAfterRemap: {
|
||||
description: 'should exclude logic be performed after the source-map remaps filenames?',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.checkCoverage
|
||||
},
|
||||
branches: {
|
||||
description: 'what % of branches must be covered?',
|
||||
type: 'number',
|
||||
default: 0,
|
||||
minimum: 0,
|
||||
maximum: 100,
|
||||
nycCommands: nycCommands.checkCoverage
|
||||
},
|
||||
functions: {
|
||||
description: 'what % of functions must be covered?',
|
||||
type: 'number',
|
||||
default: 0,
|
||||
minimum: 0,
|
||||
maximum: 100,
|
||||
nycCommands: nycCommands.checkCoverage
|
||||
},
|
||||
lines: {
|
||||
description: 'what % of lines must be covered?',
|
||||
type: 'number',
|
||||
default: 90,
|
||||
minimum: 0,
|
||||
maximum: 100,
|
||||
nycCommands: nycCommands.checkCoverage
|
||||
},
|
||||
statements: {
|
||||
description: 'what % of statements must be covered?',
|
||||
type: 'number',
|
||||
default: 0,
|
||||
minimum: 0,
|
||||
maximum: 100,
|
||||
nycCommands: nycCommands.checkCoverage
|
||||
},
|
||||
perFile: {
|
||||
description: 'check thresholds per file',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.checkCoverage
|
||||
}
|
||||
};
|
||||
|
||||
const report = {
|
||||
checkCoverage: {
|
||||
description: 'check whether coverage is within thresholds provided',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.report
|
||||
},
|
||||
reporter: {
|
||||
description: 'coverage reporter(s) to use',
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
},
|
||||
default: ['text'],
|
||||
nycCommands: nycCommands.report,
|
||||
nycAlias: 'r'
|
||||
},
|
||||
reportDir: {
|
||||
description: 'directory to output coverage reports in',
|
||||
type: 'string',
|
||||
default: 'coverage',
|
||||
nycCommands: nycCommands.report
|
||||
},
|
||||
showProcessTree: {
|
||||
description: 'display the tree of spawned processes',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.report
|
||||
},
|
||||
skipEmpty: {
|
||||
description: 'don\'t show empty files (no lines of code) in report',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.report
|
||||
},
|
||||
skipFull: {
|
||||
description: 'don\'t show files with 100% statement, branch, and function coverage',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.report
|
||||
}
|
||||
};
|
||||
|
||||
const nycMain = {
|
||||
silent: {
|
||||
description: 'don\'t output a report after tests finish running',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.main,
|
||||
nycAlias: 's'
|
||||
},
|
||||
all: {
|
||||
description: 'whether or not to instrument all files of the project (not just the ones touched by your test suite)',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.main,
|
||||
nycAlias: 'a'
|
||||
},
|
||||
eager: {
|
||||
description: 'instantiate the instrumenter at startup (see https://git.io/vMKZ9)',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.main
|
||||
},
|
||||
cache: {
|
||||
description: 'cache instrumentation results for improved performance',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.main,
|
||||
nycAlias: 'c'
|
||||
},
|
||||
cacheDir: {
|
||||
description: 'explicitly set location for instrumentation cache',
|
||||
type: 'string',
|
||||
nycCommands: nycCommands.main
|
||||
},
|
||||
babelCache: {
|
||||
description: 'cache babel transpilation results for improved performance',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.main
|
||||
},
|
||||
useSpawnWrap: {
|
||||
description: 'use spawn-wrap instead of setting process.env.NODE_OPTIONS',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.main
|
||||
},
|
||||
hookRequire: {
|
||||
description: 'should nyc wrap require?',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.main
|
||||
},
|
||||
hookRunInContext: {
|
||||
description: 'should nyc wrap vm.runInContext?',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.main
|
||||
},
|
||||
hookRunInThisContext: {
|
||||
description: 'should nyc wrap vm.runInThisContext?',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.main
|
||||
},
|
||||
clean: {
|
||||
description: 'should the .nyc_output folder be cleaned before executing tests',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.main
|
||||
}
|
||||
};
|
||||
|
||||
const instrumentOnly = {
|
||||
inPlace: {
|
||||
description: 'should nyc run the instrumentation in place?',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.instrumentOnly
|
||||
},
|
||||
exitOnError: {
|
||||
description: 'should nyc exit when an instrumentation failure occurs?',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.instrumentOnly
|
||||
},
|
||||
delete: {
|
||||
description: 'should the output folder be deleted before instrumenting files?',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.instrumentOnly
|
||||
},
|
||||
completeCopy: {
|
||||
description: 'should nyc copy all files from input to output as well as instrumented files?',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
nycCommands: nycCommands.instrumentOnly
|
||||
}
|
||||
};
|
||||
|
||||
const nyc = {
|
||||
description: 'nyc configuration options',
|
||||
type: 'object',
|
||||
properties: {
|
||||
cwd,
|
||||
nycrcPath,
|
||||
tempDir,
|
||||
|
||||
/* Test Exclude */
|
||||
...testExclude,
|
||||
|
||||
/* Instrumentation settings */
|
||||
...instrumentVisitor,
|
||||
|
||||
/* Instrumentation parser/generator settings */
|
||||
...instrumentParseGen,
|
||||
sourceMap: {
|
||||
description: 'should nyc detect and handle source maps?',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
require: {
|
||||
description: 'a list of additional modules that nyc should attempt to require in its subprocess, e.g., @babel/register, @babel/polyfill',
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
},
|
||||
default: [],
|
||||
nycCommands: nycCommands.instrument,
|
||||
nycAlias: 'i'
|
||||
},
|
||||
instrument: {
|
||||
description: 'should nyc handle instrumentation?',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
nycCommands: nycCommands.instrument
|
||||
},
|
||||
|
||||
/* Check coverage */
|
||||
...checkCoverage,
|
||||
|
||||
/* Report options */
|
||||
...report,
|
||||
|
||||
/* Main command options */
|
||||
...nycMain,
|
||||
|
||||
/* Instrument command options */
|
||||
...instrumentOnly
|
||||
}
|
||||
};
|
||||
|
||||
const configs = {
|
||||
nyc,
|
||||
testExclude: {
|
||||
description: 'test-exclude options',
|
||||
type: 'object',
|
||||
properties: {
|
||||
cwd,
|
||||
...testExclude
|
||||
}
|
||||
},
|
||||
babelPluginIstanbul: {
|
||||
description: 'babel-plugin-istanbul options',
|
||||
type: 'object',
|
||||
properties: {
|
||||
cwd,
|
||||
...testExclude,
|
||||
...instrumentVisitor
|
||||
}
|
||||
},
|
||||
instrumentVisitor: {
|
||||
description: 'instrument visitor options',
|
||||
type: 'object',
|
||||
properties: instrumentVisitor
|
||||
},
|
||||
instrumenter: {
|
||||
description: 'stand-alone instrumenter options',
|
||||
type: 'object',
|
||||
properties: {
|
||||
...instrumentVisitor,
|
||||
...instrumentParseGen
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function defaultsReducer(defaults, [name, {default: value}]) {
|
||||
/* Modifying arrays in defaults is safe, does not change schema. */
|
||||
if (Array.isArray(value)) {
|
||||
value = [...value];
|
||||
}
|
||||
|
||||
return Object.assign(defaults, {[name]: value});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
...configs,
|
||||
defaults: Object.keys(configs).reduce(
|
||||
(defaults, id) => {
|
||||
Object.defineProperty(defaults, id, {
|
||||
enumerable: true,
|
||||
get() {
|
||||
/* This defers `process.cwd()` until defaults are requested. */
|
||||
return Object.entries(configs[id].properties)
|
||||
.filter(([, info]) => 'default' in info)
|
||||
.reduce(defaultsReducer, {});
|
||||
}
|
||||
});
|
||||
|
||||
return defaults;
|
||||
},
|
||||
{}
|
||||
)
|
||||
};
|
||||
34
node_modules/@istanbuljs/schema/package.json
generated
vendored
Normal file
34
node_modules/@istanbuljs/schema/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Corey Farrell"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/istanbuljs/schema/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Schemas describing various structures used by nyc and istanbuljs",
|
||||
"devDependencies": {
|
||||
"standard-version": "^7.0.0",
|
||||
"tap": "^14.6.7",
|
||||
"xo": "^0.25.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"homepage": "https://github.com/istanbuljs/schema#readme",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "@istanbuljs/schema",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/istanbuljs/schema.git"
|
||||
},
|
||||
"scripts": {
|
||||
"pretest": "xo",
|
||||
"release": "standard-version --sign",
|
||||
"snap": "npm test -- --snapshot",
|
||||
"test": "tap"
|
||||
},
|
||||
"version": "0.1.2"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue