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

@@ -8,7 +8,7 @@ exports.default = void 0;
function _assert() {
const data = _interopRequireDefault(require('assert'));
_assert = function _assert() {
_assert = function () {
return data;
};
@@ -18,7 +18,7 @@ function _assert() {
function _console() {
const data = require('console');
_console = function _console() {
_console = function () {
return data;
};
@@ -28,7 +28,7 @@ function _console() {
function _util() {
const data = require('util');
_util = function _util() {
_util = function () {
return data;
};
@@ -38,17 +38,17 @@ function _util() {
function _chalk() {
const data = _interopRequireDefault(require('chalk'));
_chalk = function _chalk() {
_chalk = function () {
return data;
};
return data;
}
function _sourceMap() {
const data = require('@jest/source-map');
function _jestUtil() {
const data = require('jest-util');
_sourceMap = function _sourceMap() {
_jestUtil = function () {
return data;
};
@@ -74,38 +74,37 @@ function _defineProperty(obj, key, value) {
}
class BufferedConsole extends _console().Console {
constructor(getSourceMaps) {
const buffer = [];
constructor() {
super({
write: message => {
BufferedConsole.write(buffer, 'log', message, null, getSourceMaps());
BufferedConsole.write(this._buffer, 'log', message, null);
return true;
}
});
_defineProperty(this, '_buffer', void 0);
_defineProperty(this, '_buffer', []);
_defineProperty(this, '_counters', void 0);
_defineProperty(this, '_counters', {});
_defineProperty(this, '_timers', void 0);
_defineProperty(this, '_timers', {});
_defineProperty(this, '_groupDepth', void 0);
_defineProperty(this, '_groupDepth', 0);
_defineProperty(this, '_getSourceMaps', void 0);
this._getSourceMaps = getSourceMaps;
this._buffer = buffer;
this._counters = {};
this._timers = {};
this._groupDepth = 0;
_defineProperty(this, 'Console', _console().Console);
}
static write(buffer, type, message, level, sourceMaps) {
const callsite = (0, _sourceMap().getCallsite)(
level != null ? level : 2,
sourceMaps
);
const origin = callsite.getFileName() + ':' + callsite.getLineNumber();
static write(buffer, type, message, level) {
const stackLevel = level != null ? level : 2;
const rawStack = new (_jestUtil().ErrorWithStack)(
undefined,
BufferedConsole.write
).stack;
invariant(rawStack, 'always have a stack trace');
const origin = rawStack
.split('\n')
.slice(stackLevel)
.filter(Boolean)
.join('\n');
buffer.push({
message,
origin,
@@ -119,8 +118,7 @@ class BufferedConsole extends _console().Console {
this._buffer,
type,
' '.repeat(this._groupDepth) + message,
3,
this._getSourceMaps()
3
);
}
@@ -214,12 +212,32 @@ class BufferedConsole extends _console().Console {
const endTime = new Date();
const time = endTime.getTime() - startTime.getTime();
this._log('time', (0, _util().format)(`${label}: ${time}ms`));
this._log(
'time',
(0, _util().format)(`${label}: ${(0, _jestUtil().formatTime)(time)}`)
);
delete this._timers[label];
}
}
timeLog(label = 'default', ...data) {
const startTime = this._timers[label];
if (startTime) {
const endTime = new Date();
const time = endTime.getTime() - startTime.getTime();
this._log(
'time',
(0, _util().format)(
`${label}: ${(0, _jestUtil().formatTime)(time)}`,
...data
)
);
}
}
warn(firstArg, ...rest) {
this._log('warn', (0, _util().format)(firstArg, ...rest));
}
@@ -230,3 +248,9 @@ class BufferedConsole extends _console().Console {
}
exports.default = BufferedConsole;
function invariant(condition, message) {
if (!condition) {
throw new Error(message);
}
}