Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

View File

@@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [6.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.2.0...v6.0.0) (2019-12-20)
### ⚠ BREAKING CHANGES
* Drop node.js 6 (#226)
### Features
* Add support for instrumenter options ([#227](https://github.com/istanbuljs/babel-plugin-istanbul/issues/227)) ([fe08f5b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/fe08f5b8282136c7ed9375fa32148586bd6a7e28)), closes [#208](https://github.com/istanbuljs/babel-plugin-istanbul/issues/208) [#212](https://github.com/istanbuljs/babel-plugin-istanbul/issues/212)
* Drop node.js 6 ([#226](https://github.com/istanbuljs/babel-plugin-istanbul/issues/226)) ([93db21a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/93db21aa2bbdbb06fb784f52c24a7847fad6be92)), closes [#209](https://github.com/istanbuljs/babel-plugin-istanbul/issues/209)
## [5.2.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.4...v5.2.0) (2019-07-18)

View File

@@ -129,3 +129,9 @@ function instrument(sourceCode, sourceMap, fileName) {
## Credit where credit is due
The approach used in `babel-plugin-istanbul` was inspired by [Thai Pangsakulyanont](https://github.com/dtinth)'s original library [`babel-plugin-__coverage__`](https://github.com/dtinth/babel-plugin-__coverage__).
## `babel-plugin-istanbul` for enterprise
Available as part of the Tidelift Subscription.
The maintainers of `babel-plugin-istanbul` 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-babel-plugin-istanbul?utm_source=npm-babel-plugin-istanbul&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

View File

@@ -5,59 +5,104 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = void 0;
var _path = _interopRequireDefault(require("path"));
var _fs = require("fs");
var _path = require("path");
var _child_process = require("child_process");
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _istanbulLibInstrument = require("istanbul-lib-instrument");
const testExclude = require('test-exclude');
var _testExclude = _interopRequireDefault(require("test-exclude"));
const findUp = require('find-up');
var _schema = _interopRequireDefault(require("@istanbuljs/schema"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getRealpath(n) {
try {
return (0, _fs.realpathSync)(n) || n;
return (0, _fs.realpathSync)(n) ||
/* istanbul ignore next */
n;
} catch (e) {
/* istanbul ignore next */
return n;
}
}
const memoize = new Map();
/* istanbul ignore next */
const memosep = _path.default.sep === '/' ? ':' : ';';
function loadNycConfig(cwd, opts) {
let memokey = cwd;
const args = [_path.default.resolve(__dirname, 'load-nyc-config-sync.js'), cwd];
if ('nycrcPath' in opts) {
args.push(opts.nycrcPath);
memokey += memosep + opts.nycrcPath;
}
/* execFileSync is expensive, avoid it if possible! */
if (memoize.has(memokey)) {
return memoize.get(memokey);
}
const result = JSON.parse((0, _child_process.execFileSync)(process.execPath, args));
const error = result['load-nyc-config-sync-error'];
if (error) {
throw new Error(error);
}
const config = { ..._schema.default.defaults.babelPluginIstanbul,
cwd,
...result
};
memoize.set(memokey, config);
return config;
}
function findConfig(opts) {
const cwd = getRealpath(opts.cwd || process.env.NYC_CWD ||
/* istanbul ignore next */
process.cwd());
const keys = Object.keys(opts);
const ignored = Object.keys(opts).filter(s => s === 'nycrcPath' || s === 'cwd');
if (keys.length > ignored.length) {
// explicitly configuring options in babel
// takes precedence.
return { ..._schema.default.defaults.babelPluginIstanbul,
cwd,
...opts
};
}
if (ignored.length === 0 && process.env.NYC_CONFIG) {
// defaults were already applied by nyc
return JSON.parse(process.env.NYC_CONFIG);
}
return loadNycConfig(cwd, opts);
}
function makeShouldSkip() {
let exclude;
return function shouldSkip(file, opts) {
if (!exclude || exclude.cwd !== opts.cwd) {
const cwd = getRealpath(process.env.NYC_CWD || process.cwd());
const nycConfig = process.env.NYC_CONFIG ? JSON.parse(process.env.NYC_CONFIG) : {};
let config = {};
if (Object.keys(opts).length > 0) {
// explicitly configuring options in babel
// takes precedence.
config = opts;
} else if (nycConfig.include || nycConfig.exclude) {
// nyc was configured in a parent process (keep these settings).
config = {
include: nycConfig.include,
exclude: nycConfig.exclude,
// Make sure this is true unless explicitly set to `false`. `undefined` is still `true`.
excludeNodeModules: nycConfig.excludeNodeModules !== false
};
} else {
// fallback to loading config from key in package.json.
config = {
configKey: 'nyc',
configPath: (0, _path.dirname)(findUp.sync('package.json', {
cwd
}))
};
}
exclude = testExclude(Object.assign({
cwd
}, config));
return function shouldSkip(file, nycConfig) {
if (!exclude || exclude.cwd !== nycConfig.cwd) {
exclude = new _testExclude.default({
cwd: nycConfig.cwd,
include: nycConfig.include,
exclude: nycConfig.exclude,
extension: nycConfig.extension,
// Make sure this is true unless explicitly set to `false`. `undefined` is still `true`.
excludeNodeModules: nycConfig.excludeNodeModules !== false
});
}
return !exclude.shouldInstrument(file);
@@ -66,16 +111,17 @@ function makeShouldSkip() {
var _default = (0, _helperPluginUtils.declare)(api => {
api.assertVersion(7);
const t = api.types;
const shouldSkip = makeShouldSkip();
const t = api.types;
return {
visitor: {
Program: {
enter(path) {
this.__dv__ = null;
this.nycConfig = findConfig(this.opts);
const realPath = getRealpath(this.file.opts.filename);
if (shouldSkip(realPath, this.opts)) {
if (shouldSkip(realPath, this.nycConfig)) {
return;
}
@@ -89,8 +135,15 @@ var _default = (0, _helperPluginUtils.declare)(api => {
}
}
this.__dv__ = (0, _istanbulLibInstrument.programVisitor)(t, realPath, {
coverageVariable: '__coverage__',
const visitorOptions = {};
Object.entries(_schema.default.defaults.instrumentVisitor).forEach(([name, defaultValue]) => {
if (name in this.nycConfig) {
visitorOptions[name] = this.nycConfig[name];
} else {
visitorOptions[name] = _schema.default.defaults.instrumentVisitor[name];
}
});
this.__dv__ = (0, _istanbulLibInstrument.programVisitor)(t, realPath, { ...visitorOptions,
inputSourceMap
});

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env node
'use strict';
const {
loadNycConfig
} = require('@istanbuljs/load-nyc-config');
async function main() {
const [cwd, nycrcPath] = process.argv.slice(2);
console.log(JSON.stringify((await loadNycConfig({
cwd,
nycrcPath
}))));
}
main().catch(error => {
console.log(JSON.stringify({
'load-nyc-config-sync-error': error.message
}));
});

View File

@@ -1,63 +1,60 @@
{
"_args": [
[
"babel-plugin-istanbul@5.2.0",
"/Users/drew.heavner/Documents/Github/upload-google-play"
]
],
"_development": true,
"_from": "babel-plugin-istanbul@5.2.0",
"_id": "babel-plugin-istanbul@5.2.0",
"_from": "babel-plugin-istanbul@^6.0.0",
"_id": "babel-plugin-istanbul@6.0.0",
"_inBundle": false,
"_integrity": "sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==",
"_integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==",
"_location": "/babel-plugin-istanbul",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "babel-plugin-istanbul@5.2.0",
"raw": "babel-plugin-istanbul@^6.0.0",
"name": "babel-plugin-istanbul",
"escapedName": "babel-plugin-istanbul",
"rawSpec": "5.2.0",
"rawSpec": "^6.0.0",
"saveSpec": null,
"fetchSpec": "5.2.0"
"fetchSpec": "^6.0.0"
},
"_requiredBy": [
"/@jest/transform",
"/babel-jest"
],
"_resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz",
"_spec": "5.2.0",
"_where": "/Users/drew.heavner/Documents/Github/upload-google-play",
"_resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz",
"_shasum": "e159ccdc9af95e0b570c75b4573b7c34d671d765",
"_spec": "babel-plugin-istanbul@^6.0.0",
"_where": "/home/codespace/workspace/upload-google-play/node_modules/@jest/transform",
"author": {
"name": "Thai Pangsakulyanont @dtinth"
},
"bugs": {
"url": "https://github.com/istanbuljs/babel-plugin-istanbul/issues"
},
"bundleDependencies": false,
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
"find-up": "^3.0.0",
"istanbul-lib-instrument": "^3.3.0",
"test-exclude": "^5.2.3"
"@istanbuljs/load-nyc-config": "^1.0.0",
"@istanbuljs/schema": "^0.1.2",
"istanbul-lib-instrument": "^4.0.0",
"test-exclude": "^6.0.0"
},
"deprecated": false,
"description": "A babel plugin that adds istanbul instrumentation to ES6 code",
"devDependencies": {
"@babel/cli": "^7.4.3",
"@babel/core": "^7.4.3",
"@babel/plugin-transform-modules-commonjs": "^7.4.3",
"@babel/register": "^7.4.0",
"@babel/cli": "^7.7.5",
"@babel/core": "^7.7.5",
"@babel/plugin-transform-modules-commonjs": "^7.7.5",
"@babel/register": "^7.7.4",
"chai": "^4.2.0",
"coveralls": "^3.0.3",
"cross-env": "^5.2.0",
"mocha": "^6.1.4",
"nyc": "^14.1.0",
"coveralls": "^3.0.9",
"cross-env": "^6.0.3",
"mocha": "^6.2.2",
"nyc": "^15.0.0",
"pmock": "^0.2.3",
"standard": "^12.0.1",
"standard-version": "^6.0.1"
"standard": "^14.3.1",
"standard-version": "^7.1.0"
},
"engines": {
"node": ">=6"
"node": ">=8"
},
"files": [
"lib"
@@ -92,13 +89,13 @@
"prepublish": "npm test && npm run release",
"pretest": "standard && npm run release",
"release": "babel src --out-dir lib",
"test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.js",
"test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha --timeout 5000 test/*.js",
"version": "standard-version"
},
"standard": {
"ignore": [
"fixtures/has-inline-source-map.js"
"fixtures/*.js"
]
},
"version": "5.2.0"
"version": "6.0.0"
}