mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 09:56:46 +00:00
Fix.
This commit is contained in:
parent
596a6da241
commit
c1a589c5b6
7078 changed files with 1882834 additions and 319 deletions
16
node_modules/babel-jest/build/index.d.ts
generated
vendored
Normal file
16
node_modules/babel-jest/build/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* 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 { Transformer } from '@jest/transform';
|
||||
import { TransformOptions } from '@babel/core';
|
||||
interface BabelJestTransformer extends Transformer {
|
||||
canInstrument: true;
|
||||
}
|
||||
declare const transformer: BabelJestTransformer & {
|
||||
createTransformer: (options?: TransformOptions) => BabelJestTransformer;
|
||||
};
|
||||
export = transformer;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/babel-jest/build/index.d.ts.map
generated
vendored
Normal file
1
node_modules/babel-jest/build/index.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAGL,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AASrB,UAAU,oBAAqB,SAAQ,WAAW;IAChD,aAAa,EAAE,IAAI,CAAC;CACrB;AAwGD,QAAA,MAAM,WAAW,EAAE,oBAAoB,GAAG;IACxC,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,gBAAgB,KAAK,oBAAoB,CAAC;CAMzE,CAAC;AAEF,SAAS,WAAW,CAAC"}
|
226
node_modules/babel-jest/build/index.js
generated
vendored
Normal file
226
node_modules/babel-jest/build/index.js
generated
vendored
Normal file
|
@ -0,0 +1,226 @@
|
|||
'use strict';
|
||||
|
||||
function _crypto() {
|
||||
const data = _interopRequireDefault(require('crypto'));
|
||||
|
||||
_crypto = function _crypto() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _fs() {
|
||||
const data = _interopRequireDefault(require('fs'));
|
||||
|
||||
_fs = function _fs() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require('path'));
|
||||
|
||||
_path = function _path() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _core() {
|
||||
const data = require('@babel/core');
|
||||
|
||||
_core = function _core() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _slash() {
|
||||
const data = _interopRequireDefault(require('slash'));
|
||||
|
||||
_slash = function _slash() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(
|
||||
Object.getOwnPropertySymbols(source).filter(function(sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
})
|
||||
);
|
||||
}
|
||||
ownKeys.forEach(function(key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
const THIS_FILE = _fs().default.readFileSync(__filename);
|
||||
|
||||
const jestPresetPath = require.resolve('babel-preset-jest');
|
||||
|
||||
const babelIstanbulPlugin = require.resolve('babel-plugin-istanbul'); // Narrow down the types
|
||||
|
||||
const createTransformer = (options = {}) => {
|
||||
options = _objectSpread({}, options, {
|
||||
caller: {
|
||||
name: 'babel-jest',
|
||||
supportsStaticESM: false
|
||||
},
|
||||
compact: false,
|
||||
plugins: (options && options.plugins) || [],
|
||||
presets: ((options && options.presets) || []).concat(jestPresetPath),
|
||||
sourceMaps: 'both'
|
||||
});
|
||||
|
||||
function loadBabelConfig(cwd, filename) {
|
||||
// `cwd` first to allow incoming options to override it
|
||||
const babelConfig = (0, _core().loadPartialConfig)(
|
||||
_objectSpread(
|
||||
{
|
||||
cwd
|
||||
},
|
||||
options,
|
||||
{
|
||||
filename
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
if (!babelConfig) {
|
||||
throw new Error(
|
||||
`babel-jest: Babel ignores ${_chalk().default.bold(
|
||||
(0, _slash().default)(_path().default.relative(cwd, filename))
|
||||
)} - make sure to include the file in Jest's ${_chalk().default.bold(
|
||||
'transformIgnorePatterns'
|
||||
)} as well.`
|
||||
);
|
||||
}
|
||||
|
||||
return babelConfig;
|
||||
}
|
||||
|
||||
return {
|
||||
canInstrument: true,
|
||||
|
||||
getCacheKey(
|
||||
fileData,
|
||||
filename,
|
||||
configString,
|
||||
{config, instrument, rootDir}
|
||||
) {
|
||||
const babelOptions = loadBabelConfig(config.cwd, filename);
|
||||
const configPath = [
|
||||
babelOptions.config || '',
|
||||
babelOptions.babelrc || ''
|
||||
];
|
||||
return _crypto()
|
||||
.default.createHash('md5')
|
||||
.update(THIS_FILE)
|
||||
.update('\0', 'utf8')
|
||||
.update(JSON.stringify(babelOptions.options))
|
||||
.update('\0', 'utf8')
|
||||
.update(fileData)
|
||||
.update('\0', 'utf8')
|
||||
.update(_path().default.relative(rootDir, filename))
|
||||
.update('\0', 'utf8')
|
||||
.update(configString)
|
||||
.update('\0', 'utf8')
|
||||
.update(configPath.join(''))
|
||||
.update('\0', 'utf8')
|
||||
.update(instrument ? 'instrument' : '')
|
||||
.update('\0', 'utf8')
|
||||
.update(process.env.NODE_ENV || '')
|
||||
.update('\0', 'utf8')
|
||||
.update(process.env.BABEL_ENV || '')
|
||||
.digest('hex');
|
||||
},
|
||||
|
||||
process(src, filename, config, transformOptions) {
|
||||
const babelOptions = _objectSpread(
|
||||
{},
|
||||
loadBabelConfig(config.cwd, filename).options
|
||||
);
|
||||
|
||||
if (transformOptions && transformOptions.instrument) {
|
||||
babelOptions.auxiliaryCommentBefore = ' istanbul ignore next '; // Copied from jest-runtime transform.js
|
||||
|
||||
babelOptions.plugins = (babelOptions.plugins || []).concat([
|
||||
[
|
||||
babelIstanbulPlugin,
|
||||
{
|
||||
// files outside `cwd` will not be instrumented
|
||||
cwd: config.rootDir,
|
||||
exclude: []
|
||||
}
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
const transformResult = (0, _core().transformSync)(src, babelOptions);
|
||||
|
||||
if (transformResult) {
|
||||
const code = transformResult.code,
|
||||
map = transformResult.map;
|
||||
|
||||
if (typeof code === 'string') {
|
||||
return {
|
||||
code,
|
||||
map
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return src;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const transformer = _objectSpread({}, createTransformer(), {
|
||||
// Assigned here so only the exported transformer has `createTransformer`,
|
||||
// instead of all created transformers by the function
|
||||
createTransformer
|
||||
});
|
||||
|
||||
module.exports = transformer;
|
Loading…
Add table
Add a link
Reference in a new issue