mirror of
https://github.com/actions/labeler.git
synced 2025-12-19 08:38:15 +00:00
build
This commit is contained in:
78
node_modules/@jest/core/build/runGlobalHook.js
generated
vendored
78
node_modules/@jest/core/build/runGlobalHook.js
generated
vendored
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user