Add node modules and new code for release (#39)
Co-authored-by: tbarnes94 <tbarnes94@users.noreply.github.com>
This commit is contained in:
parent
a10d84bc2e
commit
7ad2aa66bb
7655 changed files with 1763577 additions and 14 deletions
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;
|
||||
},
|
||||
{}
|
||||
)
|
||||
};
|
30
node_modules/@istanbuljs/schema/package.json
generated
vendored
Normal file
30
node_modules/@istanbuljs/schema/package.json
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "@istanbuljs/schema",
|
||||
"version": "0.1.2",
|
||||
"description": "Schemas describing various structures used by nyc and istanbuljs",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"release": "standard-version --sign",
|
||||
"pretest": "xo",
|
||||
"test": "tap",
|
||||
"snap": "npm test -- --snapshot"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"author": "Corey Farrell",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/istanbuljs/schema.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/istanbuljs/schema/issues"
|
||||
},
|
||||
"homepage": "https://github.com/istanbuljs/schema#readme",
|
||||
"devDependencies": {
|
||||
"standard-version": "^7.0.0",
|
||||
"tap": "^14.6.7",
|
||||
"xo": "^0.25.3"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue