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

@@ -5,6 +5,5 @@
* LICENSE file in the root directory of this source tree.
*/
export default class ErrorWithStack extends Error {
constructor(message: string | undefined, callsite: Function);
constructor(message: string | undefined, callsite: (...args: Array<any>) => unknown);
}
//# sourceMappingURL=ErrorWithStack.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"ErrorWithStack.d.ts","sourceRoot":"","sources":["../src/ErrorWithStack.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,QAAQ;CAM5D"}

View File

@@ -5,6 +5,4 @@
* LICENSE file in the root directory of this source tree.
*/
/// <reference types="node" />
declare const _default: (stream: NodeJS.WritableStream) => void;
export default _default;
//# sourceMappingURL=clearLine.d.ts.map
export default function clearLine(stream: NodeJS.WriteStream): void;

View File

@@ -1 +0,0 @@
{"version":3,"file":"clearLine.d.ts","sourceRoot":"","sources":["../src/clearLine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAEH,wBAIE"}

View File

@@ -3,7 +3,7 @@
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = void 0;
exports.default = clearLine;
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
@@ -11,10 +11,8 @@ exports.default = void 0;
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var _default = stream => {
if (process.stdout.isTTY) {
function clearLine(stream) {
if (stream.isTTY) {
stream.write('\x1b[999D\x1b[K');
}
};
exports.default = _default;
}

View File

@@ -5,4 +5,3 @@
* LICENSE file in the root directory of this source tree.
*/
export default function convertDescriptorToString<T extends number | string | Function | undefined>(descriptor: T): T | string;
//# sourceMappingURL=convertDescriptorToString.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"convertDescriptorToString.d.ts","sourceRoot":"","sources":["../src/convertDescriptorToString.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,EAChD,UAAU,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CA0B3B"}

View File

@@ -11,6 +11,8 @@ exports.default = convertDescriptorToString;
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable local/ban-types-eventually */
// See: https://github.com/facebook/jest/pull/5154
function convertDescriptorToString(descriptor) {
if (
@@ -31,7 +33,7 @@ function convertDescriptorToString(descriptor) {
const stringified = descriptor.toString();
const typeDescriptorMatch = stringified.match(/class|function/);
const indexOfNameSpace = // @ts-ignore: typeDescriptorMatch exists
const indexOfNameSpace = // @ts-expect-error: typeDescriptorMatch exists
typeDescriptorMatch.index + typeDescriptorMatch[0].length;
const indexOfNameAfterSpace = stringified.search(/\(|\{/);
const name = stringified.substring(indexOfNameSpace, indexOfNameAfterSpace);

View File

@@ -4,6 +4,5 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { Config } from '@jest/types';
import type { Config } from '@jest/types';
export default function createDirectory(path: Config.Path): void;
//# sourceMappingURL=createDirectory.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"createDirectory.d.ts","sourceRoot":"","sources":["../src/createDirectory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAQxD"}

View File

@@ -5,18 +5,56 @@ Object.defineProperty(exports, '__esModule', {
});
exports.default = createDirectory;
function _mkdirp() {
const data = _interopRequireDefault(require('mkdirp'));
function fs() {
const data = _interopRequireWildcard(require('graceful-fs'));
_mkdirp = function _mkdirp() {
fs = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function () {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
return {default: obj};
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
/**
@@ -27,7 +65,9 @@ function _interopRequireDefault(obj) {
*/
function createDirectory(path) {
try {
_mkdirp().default.sync(path, '777');
fs().mkdirSync(path, {
recursive: true
});
} catch (e) {
if (e.code !== 'EEXIST') {
throw e;

View File

@@ -4,5 +4,5 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
export default function (): any;
//# sourceMappingURL=createProcessObject.d.ts.map
/// <reference types="node" />
export default function (): NodeJS.Process;

View File

@@ -1 +0,0 @@
{"version":3,"file":"createProcessObject.d.ts","sourceRoot":"","sources":["../src/createProcessObject.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4EH,MAAM,CAAC,OAAO,kBAkCb"}

View File

@@ -117,5 +117,18 @@ function _default() {
newProcess.send = () => {};
const domainPropertyDescriptor = Object.getOwnPropertyDescriptor(
newProcess,
'domain'
);
if (domainPropertyDescriptor && !domainPropertyDescriptor.enumerable) {
Object.defineProperty(newProcess, 'domain', {
get() {
return process.domain;
}
});
}
return newProcess;
}

View File

@@ -9,4 +9,3 @@ export declare type DeepCyclicCopyOptions = {
keepPrototype?: boolean;
};
export default function deepCyclicCopy<T>(value: T, options?: DeepCyclicCopyOptions, cycles?: WeakMap<any, any>): T;
//# sourceMappingURL=deepCyclicCopy.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"deepCyclicCopy.d.ts","sourceRoot":"","sources":["../src/deepCyclicCopy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,oBAAY,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAmBF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EACtC,KAAK,EAAE,CAAC,EACR,OAAO,GAAE,qBAAgE,EACzE,MAAM,GAAE,OAAO,CAAC,GAAG,EAAE,GAAG,CAAiB,GACxC,CAAC,CAUH"}

View File

@@ -13,21 +13,6 @@ exports.default = deepCyclicCopy;
*/
const EMPTY = new Set();
// Node 6 does not have gOPDs, so we define a simple polyfill for it.
if (!Object.getOwnPropertyDescriptors) {
// @ts-ignore: polyfill
Object.getOwnPropertyDescriptors = obj => {
const list = {};
Object.getOwnPropertyNames(obj)
.concat(Object.getOwnPropertySymbols(obj))
.forEach(key => {
// @ts-ignore: assignment with a Symbol is OK.
list[key] = Object.getOwnPropertyDescriptor(obj, key);
});
return list;
};
}
function deepCyclicCopy(
value,
options = {
@@ -79,7 +64,7 @@ function deepCyclicCopyObject(object, options, cycles) {
function deepCyclicCopyArray(array, options, cycles) {
const newArray = options.keepPrototype
? new (Object.getPrototypeOf(array)).constructor(array.length)
? new (Object.getPrototypeOf(array).constructor)(array.length)
: [];
const length = array.length;
cycles.set(array, newArray);

7
node_modules/jest-util/build/formatTime.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
export default function formatTime(time: number, prefixPower?: number, padLeftLength?: number): string;

24
node_modules/jest-util/build/formatTime.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = formatTime;
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
function formatTime(time, prefixPower = -3, padLeftLength = 0) {
const prefixes = ['n', 'μ', 'm', ''];
const prefixIndex = Math.max(
0,
Math.min(
Math.trunc(prefixPower / 3) + prefixes.length - 1,
prefixes.length - 1
)
);
return `${String(time).padStart(padLeftLength)} ${prefixes[prefixIndex]}s`;
}

View File

@@ -1,10 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { AggregatedResult } from '@jest/test-result';
declare function getFailedSnapshotTests(testResults: AggregatedResult): string[];
export default getFailedSnapshotTests;
//# sourceMappingURL=getFailedSnapshotTests.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"getFailedSnapshotTests.d.ts","sourceRoot":"","sources":["../src/getFailedSnapshotTests.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,iBAAS,sBAAsB,CAAC,WAAW,EAAE,gBAAgB,YAa5D;AAED,eAAe,sBAAsB,CAAC"}

View File

@@ -1,30 +0,0 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = void 0;
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
function getFailedSnapshotTests(testResults) {
const failedTestPaths = [];
if (testResults.numFailedTests === 0 || !testResults.testResults) {
return failedTestPaths;
}
testResults.testResults.forEach(testResult => {
if (testResult.snapshot && testResult.snapshot.unmatched) {
failedTestPaths.push(testResult.testFilePath);
}
});
return failedTestPaths;
}
var _default = getFailedSnapshotTests;
exports.default = _default;

27
node_modules/jest-util/build/globsToMatcher.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import type { Config } from '@jest/types';
declare type Matcher = (str: Config.Path) => boolean;
/**
* Converts a list of globs into a function that matches a path against the
* globs.
*
* Every time micromatch is called, it will parse the glob strings and turn
* them into regexp instances. Instead of calling micromatch repeatedly with
* the same globs, we can use this function which will build the micromatch
* matchers ahead of time and then have an optimized path for determining
* whether an individual path matches.
*
* This function is intended to match the behavior of `micromatch()`.
*
* @example
* const isMatch = globsToMatcher(['*.js', '!*.test.js']);
* isMatch('pizza.js'); // true
* isMatch('pizza.test.js'); // false
*/
export default function globsToMatcher(globs: Array<Config.Glob>): Matcher;
export {};

109
node_modules/jest-util/build/globsToMatcher.js generated vendored Normal file
View File

@@ -0,0 +1,109 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = globsToMatcher;
function _micromatch() {
const data = _interopRequireDefault(require('micromatch'));
_micromatch = function () {
return data;
};
return data;
}
var _replacePathSepForGlob = _interopRequireDefault(
require('./replacePathSepForGlob')
);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const globsToMatchersMap = new Map();
const micromatchOptions = {
dot: true
};
/**
* Converts a list of globs into a function that matches a path against the
* globs.
*
* Every time micromatch is called, it will parse the glob strings and turn
* them into regexp instances. Instead of calling micromatch repeatedly with
* the same globs, we can use this function which will build the micromatch
* matchers ahead of time and then have an optimized path for determining
* whether an individual path matches.
*
* This function is intended to match the behavior of `micromatch()`.
*
* @example
* const isMatch = globsToMatcher(['*.js', '!*.test.js']);
* isMatch('pizza.js'); // true
* isMatch('pizza.test.js'); // false
*/
function globsToMatcher(globs) {
if (globs.length === 0) {
// Since there were no globs given, we can simply have a fast path here and
// return with a very simple function.
return () => false;
}
const matchers = globs.map(glob => {
if (!globsToMatchersMap.has(glob)) {
// Matchers that are negated have different behavior than matchers that
// are not negated, so we need to store this information ahead of time.
const {negated} = _micromatch().default.scan(glob, micromatchOptions);
const matcher = {
isMatch: _micromatch().default.matcher(glob, micromatchOptions),
negated
};
globsToMatchersMap.set(glob, matcher);
}
return globsToMatchersMap.get(glob);
});
return path => {
const replacedPath = (0, _replacePathSepForGlob.default)(path);
let kept = undefined;
let negatives = 0;
for (let i = 0; i < matchers.length; i++) {
const {isMatch, negated} = matchers[i];
if (negated) {
negatives++;
}
const matched = isMatch(replacedPath);
if (!matched && negated) {
// The path was not matched, and the matcher is a negated matcher, so we
// want to omit the path. This means that the negative matcher is
// filtering the path out.
kept = false;
} else if (matched && !negated) {
// The path was matched, and the matcher is not a negated matcher, so we
// want to keep the path.
kept = true;
}
} // If all of the globs were negative globs, then we want to include the path
// as long as it was not explicitly not kept. Otherwise only include
// the path if it was kept. This allows sets of globs that are all negated
// to allow some paths to be matched, while sets of globs that are mixed
// negated and non-negated to cause the negated matchers to only omit paths
// and not keep them.
return negatives === matchers.length ? kept !== false : !!kept;
};
}

View File

@@ -4,45 +4,21 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/// <reference types="node" />
import { JestFakeTimers as FakeTimers } from '@jest/fake-timers';
import { BufferedConsole, CustomConsole, NullConsole } from '@jest/console';
import { formatTestResults } from '@jest/test-result';
import createDirectory from './createDirectory';
import ErrorWithStack from './ErrorWithStack';
import getFailedSnapshotTests from './getFailedSnapshotTests';
import installCommonGlobals from './installCommonGlobals';
import interopRequireDefault from './interopRequireDefault';
import deepCyclicCopy from './deepCyclicCopy';
import convertDescriptorToString from './convertDescriptorToString';
import * as specialChars from './specialChars';
import replacePathSepForGlob from './replacePathSepForGlob';
import * as preRunMessage from './preRunMessage';
import pluralize from './pluralize';
declare const _default: {
BufferedConsole: typeof BufferedConsole;
Console: typeof CustomConsole;
ErrorWithStack: typeof ErrorWithStack;
FakeTimers: typeof FakeTimers;
NullConsole: typeof NullConsole;
clearLine: (stream: NodeJS.WritableStream) => void;
convertDescriptorToString: typeof convertDescriptorToString;
createDirectory: typeof createDirectory;
deepCyclicCopy: typeof deepCyclicCopy;
formatTestResults: typeof formatTestResults;
getCallsite: (level: number, sourceMaps?: Record<string, string> | null | undefined) => import("callsites").CallSite;
getConsoleOutput: (root: string, verbose: boolean, buffer: import("@jest/console/build/types").LogEntry[]) => string;
getFailedSnapshotTests: typeof getFailedSnapshotTests;
installCommonGlobals: typeof installCommonGlobals;
interopRequireDefault: typeof interopRequireDefault;
isInteractive: boolean;
isPromise: (candidate: unknown) => candidate is Promise<unknown>;
pluralize: typeof pluralize;
preRunMessage: typeof preRunMessage;
replacePathSepForGlob: typeof replacePathSepForGlob;
setGlobal: (globalToMutate: NodeJS.Global | Window, key: string, value: unknown) => void;
specialChars: typeof specialChars;
testPathPatternToRegExp: (testPathPattern: string) => RegExp;
};
export = _default;
//# sourceMappingURL=index.d.ts.map
export { default as clearLine } from './clearLine';
export { default as createDirectory } from './createDirectory';
export { default as ErrorWithStack } from './ErrorWithStack';
export { default as installCommonGlobals } from './installCommonGlobals';
export { default as interopRequireDefault } from './interopRequireDefault';
export { default as isInteractive } from './isInteractive';
export { default as isPromise } from './isPromise';
export { default as setGlobal } from './setGlobal';
export { default as deepCyclicCopy } from './deepCyclicCopy';
export { default as convertDescriptorToString } from './convertDescriptorToString';
export * as specialChars from './specialChars';
export { default as replacePathSepForGlob } from './replacePathSepForGlob';
export { default as testPathPatternToRegExp } from './testPathPatternToRegExp';
export { default as globsToMatcher } from './globsToMatcher';
export * as preRunMessage from './preRunMessage';
export { default as pluralize } from './pluralize';
export { default as formatTime } from './formatTime';
export { default as tryRealpath } from './tryRealpath';

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,cAAc,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EACL,eAAe,EACf,aAAa,EACb,WAAW,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAI5D,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,SAAS,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEpC,kBAwBE"}

241
node_modules/jest-util/build/index.js generated vendored
View File

@@ -1,44 +1,105 @@
'use strict';
function _fakeTimers() {
const data = require('@jest/fake-timers');
_fakeTimers = function _fakeTimers() {
return data;
};
return data;
}
function _sourceMap() {
const data = require('@jest/source-map');
_sourceMap = function _sourceMap() {
return data;
};
return data;
}
function _console() {
const data = require('@jest/console');
_console = function _console() {
return data;
};
return data;
}
function _testResult() {
const data = require('@jest/test-result');
_testResult = function _testResult() {
return data;
};
return data;
}
Object.defineProperty(exports, '__esModule', {
value: true
});
Object.defineProperty(exports, 'clearLine', {
enumerable: true,
get: function () {
return _clearLine.default;
}
});
Object.defineProperty(exports, 'createDirectory', {
enumerable: true,
get: function () {
return _createDirectory.default;
}
});
Object.defineProperty(exports, 'ErrorWithStack', {
enumerable: true,
get: function () {
return _ErrorWithStack.default;
}
});
Object.defineProperty(exports, 'installCommonGlobals', {
enumerable: true,
get: function () {
return _installCommonGlobals.default;
}
});
Object.defineProperty(exports, 'interopRequireDefault', {
enumerable: true,
get: function () {
return _interopRequireDefault.default;
}
});
Object.defineProperty(exports, 'isInteractive', {
enumerable: true,
get: function () {
return _isInteractive.default;
}
});
Object.defineProperty(exports, 'isPromise', {
enumerable: true,
get: function () {
return _isPromise.default;
}
});
Object.defineProperty(exports, 'setGlobal', {
enumerable: true,
get: function () {
return _setGlobal.default;
}
});
Object.defineProperty(exports, 'deepCyclicCopy', {
enumerable: true,
get: function () {
return _deepCyclicCopy.default;
}
});
Object.defineProperty(exports, 'convertDescriptorToString', {
enumerable: true,
get: function () {
return _convertDescriptorToString.default;
}
});
Object.defineProperty(exports, 'replacePathSepForGlob', {
enumerable: true,
get: function () {
return _replacePathSepForGlob.default;
}
});
Object.defineProperty(exports, 'testPathPatternToRegExp', {
enumerable: true,
get: function () {
return _testPathPatternToRegExp.default;
}
});
Object.defineProperty(exports, 'globsToMatcher', {
enumerable: true,
get: function () {
return _globsToMatcher.default;
}
});
Object.defineProperty(exports, 'pluralize', {
enumerable: true,
get: function () {
return _pluralize.default;
}
});
Object.defineProperty(exports, 'formatTime', {
enumerable: true,
get: function () {
return _formatTime.default;
}
});
Object.defineProperty(exports, 'tryRealpath', {
enumerable: true,
get: function () {
return _tryRealpath.default;
}
});
exports.preRunMessage = exports.specialChars = void 0;
var _clearLine = _interopRequireDefault2(require('./clearLine'));
@@ -46,10 +107,6 @@ var _createDirectory = _interopRequireDefault2(require('./createDirectory'));
var _ErrorWithStack = _interopRequireDefault2(require('./ErrorWithStack'));
var _getFailedSnapshotTests = _interopRequireDefault2(
require('./getFailedSnapshotTests')
);
var _installCommonGlobals = _interopRequireDefault2(
require('./installCommonGlobals')
);
@@ -70,7 +127,9 @@ var _convertDescriptorToString = _interopRequireDefault2(
require('./convertDescriptorToString')
);
var specialChars = _interopRequireWildcard(require('./specialChars'));
var _specialChars = _interopRequireWildcard(require('./specialChars'));
exports.specialChars = _specialChars;
var _replacePathSepForGlob = _interopRequireDefault2(
require('./replacePathSepForGlob')
@@ -80,68 +139,60 @@ var _testPathPatternToRegExp = _interopRequireDefault2(
require('./testPathPatternToRegExp')
);
var preRunMessage = _interopRequireWildcard(require('./preRunMessage'));
var _globsToMatcher = _interopRequireDefault2(require('./globsToMatcher'));
var _preRunMessage = _interopRequireWildcard(require('./preRunMessage'));
exports.preRunMessage = _preRunMessage;
var _pluralize = _interopRequireDefault2(require('./pluralize'));
var _formatTime = _interopRequireDefault2(require('./formatTime'));
var _tryRealpath = _interopRequireDefault2(require('./tryRealpath'));
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function () {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};
if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc =
Object.defineProperty && Object.getOwnPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: {};
if (desc.get || desc.set) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
return {default: obj};
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
newObj.default = obj;
return newObj;
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault2(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// TODO: Remove these exports in the next major
module.exports = {
BufferedConsole: _console().BufferedConsole,
Console: _console().CustomConsole,
ErrorWithStack: _ErrorWithStack.default,
FakeTimers: _fakeTimers().JestFakeTimers,
NullConsole: _console().NullConsole,
clearLine: _clearLine.default,
convertDescriptorToString: _convertDescriptorToString.default,
createDirectory: _createDirectory.default,
deepCyclicCopy: _deepCyclicCopy.default,
formatTestResults: _testResult().formatTestResults,
getCallsite: _sourceMap().getCallsite,
getConsoleOutput: _console().getConsoleOutput,
getFailedSnapshotTests: _getFailedSnapshotTests.default,
installCommonGlobals: _installCommonGlobals.default,
interopRequireDefault: _interopRequireDefault.default,
isInteractive: _isInteractive.default,
isPromise: _isPromise.default,
pluralize: _pluralize.default,
preRunMessage,
replacePathSepForGlob: _replacePathSepForGlob.default,
setGlobal: _setGlobal.default,
specialChars,
testPathPatternToRegExp: _testPathPatternToRegExp.default
};

View File

@@ -5,6 +5,5 @@
* LICENSE file in the root directory of this source tree.
*/
/// <reference types="node" />
import { Config } from '@jest/types';
import type { Config } from '@jest/types';
export default function (globalObject: NodeJS.Global, globals: Config.ConfigGlobals): NodeJS.Global & Config.ConfigGlobals;
//# sourceMappingURL=installCommonGlobals.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"installCommonGlobals.d.ts","sourceRoot":"","sources":["../src/installCommonGlobals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAMnC,MAAM,CAAC,OAAO,WACZ,YAAY,EAAE,MAAM,CAAC,MAAM,EAC3B,OAAO,EAAE,MAAM,CAAC,aAAa,GAC5B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,aAAa,CAqDtC"}

View File

@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', {
});
exports.default = _default;
function _fs() {
const data = _interopRequireDefault(require('fs'));
function fs() {
const data = _interopRequireWildcard(require('graceful-fs'));
_fs = function _fs() {
fs = function () {
return data;
};
@@ -25,6 +25,48 @@ function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function () {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
return {default: obj};
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
@@ -50,17 +92,17 @@ function _default(globalObject, globals) {
},
[symbol.for('jest-native-read-file')]: {
enumerable: false,
value: _fs().default.readFileSync.bind(_fs().default),
value: fs().readFileSync.bind(fs()),
writable: false
},
[symbol.for('jest-native-write-file')]: {
enumerable: false,
value: _fs().default.writeFileSync.bind(_fs().default),
value: fs().writeFileSync.bind(fs()),
writable: false
},
[symbol.for('jest-native-exists-file')]: {
enumerable: false,
value: _fs().default.existsSync.bind(_fs().default),
value: fs().existsSync.bind(fs()),
writable: false
},
'jest-symbol-do-not-touch': {
@@ -71,9 +113,9 @@ function _default(globalObject, globals) {
}); // Forward some APIs.
DTRACE.forEach(dtrace => {
// @ts-ignore: no index
globalObject[dtrace] = function(...args) {
// @ts-ignore: no index
// @ts-expect-error: no index
globalObject[dtrace] = function (...args) {
// @ts-expect-error: no index
return global[dtrace].apply(this, args);
};
}); // Forward some others (this breaks the sandbox but for now it's OK).

View File

@@ -5,4 +5,3 @@
* LICENSE file in the root directory of this source tree.
*/
export default function interopRequireDefault(obj: any): any;
//# sourceMappingURL=interopRequireDefault.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"interopRequireDefault.d.ts","sourceRoot":"","sources":["../src/interopRequireDefault.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,GAAG,EAAE,GAAG,OAErD"}

View File

@@ -12,6 +12,7 @@ exports.default = interopRequireDefault;
* LICENSE file in the root directory of this source tree.
*/
// copied from https://github.com/babel/babel/blob/56044c7851d583d498f919e9546caddf8f80a72f/packages/babel-helpers/src/helpers.js#L558-L562
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
function interopRequireDefault(obj) {
return obj && obj.__esModule
? obj

View File

@@ -6,4 +6,3 @@
*/
declare const _default: boolean;
export default _default;
//# sourceMappingURL=isInteractive.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"isInteractive.d.ts","sourceRoot":"","sources":["../src/isInteractive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,wBAA8E"}

View File

@@ -8,7 +8,7 @@ exports.default = void 0;
function _isCi() {
const data = _interopRequireDefault(require('is-ci'));
_isCi = function _isCi() {
_isCi = function () {
return data;
};

View File

@@ -6,4 +6,3 @@
*/
declare const isPromise: (candidate: unknown) => candidate is Promise<unknown>;
export default isPromise;
//# sourceMappingURL=isPromise.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"isPromise.d.ts","sourceRoot":"","sources":["../src/isPromise.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,QAAA,MAAM,SAAS,uDAC2B,CAAC;AAC3C,eAAe,SAAS,CAAC"}

View File

@@ -11,6 +11,7 @@ exports.default = void 0;
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// capture global.Promise before it may potentially be overwritten
const Promise = global.Promise; // see ES2015 spec 25.4.4.5, https://stackoverflow.com/a/38339199
const isPromise = candidate => Promise.resolve(candidate) === candidate;

View File

@@ -5,4 +5,3 @@
* LICENSE file in the root directory of this source tree.
*/
export default function pluralize(word: string, count: number): string;
//# sourceMappingURL=pluralize.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../src/pluralize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAE5D"}

View File

@@ -5,6 +5,5 @@
* LICENSE file in the root directory of this source tree.
*/
/// <reference types="node" />
export declare const print: (stream: NodeJS.WritableStream) => void;
export declare const remove: (stream: NodeJS.WritableStream) => void;
//# sourceMappingURL=preRunMessage.d.ts.map
export declare const print: (stream: NodeJS.WriteStream) => void;
export declare const remove: (stream: NodeJS.WriteStream) => void;

View File

@@ -1 +0,0 @@
{"version":3,"file":"preRunMessage.d.ts","sourceRoot":"","sources":["../src/preRunMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAMH,eAAO,MAAM,KAAK,yCAIjB,CAAC;AAEF,eAAO,MAAM,MAAM,yCAIlB,CAAC"}

View File

@@ -8,7 +8,7 @@ exports.remove = exports.print = void 0;
function _chalk() {
const data = _interopRequireDefault(require('chalk'));
_chalk = function _chalk() {
_chalk = function () {
return data;
};

View File

@@ -4,6 +4,5 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { Config } from '@jest/types';
import type { Config } from '@jest/types';
export default function replacePathSepForGlob(path: Config.Path): Config.Glob;
//# sourceMappingURL=replacePathSepForGlob.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"replacePathSepForGlob.d.ts","sourceRoot":"","sources":["../src/replacePathSepForGlob.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAE5E"}

View File

@@ -7,4 +7,3 @@
/// <reference types="node" />
declare const _default: (globalToMutate: NodeJS.Global | Window, key: string, value: unknown) => void;
export default _default;
//# sourceMappingURL=setGlobal.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"setGlobal.d.ts","sourceRoot":"","sources":["../src/setGlobal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAEH,wBAOE"}

View File

@@ -12,7 +12,7 @@ exports.default = void 0;
* LICENSE file in the root directory of this source tree.
*/
var _default = (globalToMutate, key, value) => {
// @ts-ignore: no index
// @ts-expect-error: no index
globalToMutate[key] = value;
};

View File

@@ -12,4 +12,3 @@ export declare const ICONS: {
todo: string;
};
export declare const CLEAR: string;
//# sourceMappingURL=specialChars.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"specialChars.d.ts","sourceRoot":"","sources":["../src/specialChars.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,KAAK,aAAa,CAAC;AAChC,eAAO,MAAM,KAAK;;;;;CAKjB,CAAC;AAEF,eAAO,MAAM,KAAK,QAAwD,CAAC"}

View File

@@ -4,6 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
declare const _default: (testPathPattern: string) => RegExp;
import type { Config } from '@jest/types';
declare const _default: (testPathPattern: Config.GlobalConfig['testPathPattern']) => RegExp;
export default _default;
//# sourceMappingURL=testPathPatternToRegExp.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"testPathPatternToRegExp.d.ts","sourceRoot":"","sources":["../src/testPathPatternToRegExp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,wBACmC"}

8
node_modules/jest-util/build/tryRealpath.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import type { Config } from '@jest/types';
export default function tryRealpath(path: Config.Path): Config.Path;

34
node_modules/jest-util/build/tryRealpath.js generated vendored Normal file
View File

@@ -0,0 +1,34 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = tryRealpath;
function _gracefulFs() {
const data = require('graceful-fs');
_gracefulFs = function () {
return data;
};
return data;
}
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
function tryRealpath(path) {
try {
path = _gracefulFs().realpathSync.native(path);
} catch (error) {
if (error.code !== 'ENOENT') {
throw error;
}
}
return path;
}