This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

View File

@@ -5,16 +5,6 @@ Object.defineProperty(exports, '__esModule', {
});
exports.default = void 0;
function _path() {
const data = require('path');
_path = function _path() {
return data;
};
return data;
}
function _pEachSeries() {
const data = _interopRequireDefault(require('p-each-series'));
@@ -25,16 +15,6 @@ function _pEachSeries() {
return data;
}
function _pirates() {
const data = require('pirates');
_pirates = function _pirates() {
return data;
};
return data;
}
function _transform() {
const data = require('@jest/transform');
@@ -125,48 +105,30 @@ var _default =
: allTests[0].context.config;
const transformer = new (_transform()).ScriptTransformer(
projectConfig
); // Load the transformer to avoid a cycle where we need to load a
// transformer in order to transform it in the require hooks
);
yield transformer.requireAndTranspileModule(
modulePath,
/*#__PURE__*/
(function() {
var _ref3 = _asyncToGenerator(function*(m) {
const globalModule = (0, _jestUtil().interopRequireDefault)(
m
).default;
transformer.preloadTransformer(modulePath);
let transforming = false;
const revertHook = (0, _pirates().addHook)(
(code, filename) => {
try {
transforming = true;
return (
transformer.transformSource(filename, code, false).code ||
code
);
} finally {
transforming = false;
}
},
{
exts: [(0, _path().extname)(modulePath)],
ignoreNodeModules: false,
matcher: (...args) => {
if (transforming) {
// Don't transform any dependency required by the transformer itself
return false;
if (typeof globalModule !== 'function') {
throw new TypeError(
`${moduleName} file must export a function at ${modulePath}`
);
}
return transformer.shouldTransform(...args);
}
}
yield globalModule(globalConfig);
});
return function(_x3) {
return _ref3.apply(this, arguments);
};
})()
);
const globalModule = (0, _jestUtil().interopRequireDefault)(
require(modulePath)
).default;
if (typeof globalModule !== 'function') {
throw new TypeError(
`${moduleName} file must export a function at ${modulePath}`
);
}
yield globalModule(globalConfig);
revertHook();
});
return function(_x2) {