Update metadata

This commit is contained in:
Imran Ismail
2019-09-05 12:08:20 +08:00
parent 6e5c237523
commit 56c04146d7
1454 changed files with 204046 additions and 234789 deletions

View File

@@ -1,2 +0,0 @@
package-lock.json -diff -merge
package-lock.json linguist-generated=true

View File

@@ -1 +1 @@
0aceab77a1f613fedb22a0395a65327e834ef35c
7145adc485d1d0fa5bc7b6467bd416798f0a9a49

13
node_modules/ts-jest/CHANGELOG.md generated vendored
View File

@@ -1,3 +1,16 @@
<a name="24.1.0"></a>
# [24.1.0](https://github.com/kulshekhar/ts-jest/compare/v24.0.2...v24.1.0) (2019-09-12)
### Bug Fixes
* [#825](https://github.com/kulshekhar/ts-jest/issues/825) handle symlinked modules (ala pnpm) correctly ([e190b23](https://github.com/kulshekhar/ts-jest/commit/e190b23))
* handle tsBuildInfoFile option ([f9583e9](https://github.com/kulshekhar/ts-jest/commit/f9583e9)), closes [#1095](https://github.com/kulshekhar/ts-jest/issues/1095)
* **perf:** add cache for fs calls ([#908](https://github.com/kulshekhar/ts-jest/issues/908)) ([3dada81](https://github.com/kulshekhar/ts-jest/commit/3dada81))
* **types:** unforce esModuleInterop in tsconfig.json ([c2d39b6](https://github.com/kulshekhar/ts-jest/commit/c2d39b6))
<a name="24.0.2"></a>
## [24.0.2](https://github.com/kulshekhar/ts-jest/compare/v24.0.1...v24.0.2) (2019-04-05)

2
node_modules/ts-jest/README.md generated vendored
View File

@@ -46,7 +46,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
## Versioning
We **DO NOT** use [SemVer](http://semver.org/) for versioning. Tho you can think about SemVer when reading our version, except our major number follows the one of Jest. For the versions available, see the [tags on this repository](https://github.com/kulshekhar/ts-jest/tags).
We **DO NOT** use [SemVer](http://semver.org/) for versioning. Though you can think about SemVer when reading our version, except our major number follows the one of Jest. For the versions available, see the [tags on this repository](https://github.com/kulshekhar/ts-jest/tags).
## Authors/maintainers

View File

@@ -11,10 +11,11 @@ var __assign = (this && this.__assign) || function () {
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
@@ -45,13 +46,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });
var fs_1 = require("fs");
var json5_1 = require("json5");
var path_1 = require("path");
var presets_1 = require("../helpers/presets");
exports.run = function (args) { return __awaiter(_this, void 0, void 0, function () {
exports.run = function (args) { return __awaiter(void 0, void 0, void 0, function () {
var file, filePath, name, isPackage, exists, pkgFile, hasPackage, _a, jestPreset, askedTsconfig, force, jsdom, tsconfig, pkgJson, jsFilesProcessor, shouldPostProcessWithBabel, preset, body, base, tsJestConf, content;
return __generator(this, function (_b) {
file = args._[0] || 'jest.config.js';
@@ -110,7 +110,7 @@ exports.run = function (args) { return __awaiter(_this, void 0, void 0, function
if (shouldPostProcessWithBabel)
tsJestConf.babelConfig = true;
}
body = JSON.stringify(__assign({}, pkgJson, { jest: base }), undefined, ' ');
body = JSON.stringify(__assign(__assign({}, pkgJson), { jest: base }), undefined, ' ');
}
else {
content = [];
@@ -144,7 +144,7 @@ exports.run = function (args) { return __awaiter(_this, void 0, void 0, function
return [2];
});
}); };
exports.help = function () { return __awaiter(_this, void 0, void 0, function () {
exports.help = function () { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
process.stdout.write("\nUsage:\n ts-jest config:init [options] [<config-file>]\n\nArguments:\n <config-file> Can be a js or json Jest config file. If it is a\n package.json file, the configuration will be read from\n the \"jest\" property.\n Default: jest.config.js\n\nOptions:\n --force Discard any existing Jest config\n --js ts|babel Process .js files with ts-jest if 'ts' or with\n babel-jest if 'babel'\n --no-jest-preset Disable the use of Jest presets\n --tsconfig <file> Path to the tsconfig.json file\n --babel Pipe babel-jest after ts-jest\n --jsdom Use jsdom as test environment instead of node\n");
return [2];

View File

@@ -1,9 +1,10 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
@@ -54,19 +55,15 @@ var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });
var bs_logger_1 = require("bs-logger");
var fast_json_stable_stringify_1 = __importDefault(require("fast-json-stable-stringify"));
var stringifyJson = require("fast-json-stable-stringify");
var fs_1 = require("fs");
var json5_1 = require("json5");
var path_1 = require("path");
var backports_1 = require("../../util/backports");
var presets_1 = require("../helpers/presets");
exports.run = function (args) { return __awaiter(_this, void 0, void 0, function () {
exports.run = function (args) { return __awaiter(void 0, void 0, void 0, function () {
var nullLogger, file, filePath, footNotes, name, isPackage, actualConfig, migratedConfig, presetName, preset, jsTransformers, jsWithTs, jsWithBabel, presetValue, migratedValue, presetValue, migratedValue, before, after, stringify, prefix;
return __generator(this, function (_a) {
nullLogger = bs_logger_1.createLogger({ targets: [] });
@@ -158,13 +155,13 @@ exports.run = function (args) { return __awaiter(_this, void 0, void 0, function
}
if (preset &&
migratedConfig.transform &&
fast_json_stable_stringify_1.default(migratedConfig.transform) === fast_json_stable_stringify_1.default(preset.value.transform)) {
stringifyJson(migratedConfig.transform) === stringifyJson(preset.value.transform)) {
delete migratedConfig.transform;
}
cleanupConfig(actualConfig);
cleanupConfig(migratedConfig);
before = fast_json_stable_stringify_1.default(actualConfig);
after = fast_json_stable_stringify_1.default(migratedConfig);
before = stringifyJson(actualConfig);
after = stringifyJson(migratedConfig);
if (after === before) {
process.stderr.write("\nNo migration needed for given Jest configuration\n ");
return [2];
@@ -212,7 +209,7 @@ function dedupSort(arr) {
.filter(function (s, i, a) { return a.findIndex(function (e) { return s.toString() === e.toString(); }) === i; })
.sort(function (a, b) { return (a.toString() > b.toString() ? 1 : a.toString() < b.toString() ? -1 : 0); });
}
exports.help = function () { return __awaiter(_this, void 0, void 0, function () {
exports.help = function () { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
process.stdout.write("\nUsage:\n ts-jest config:migrate [options] <config-file>\n\nArguments:\n <config-file> Can be a js or json Jest config file. If it is a\n package.json file, the configuration will be read from\n the \"jest\" property.\n\nOptions:\n --js ts|babel Process .js files with ts-jest if 'ts' or with\n babel-jest if 'babel'\n --no-jest-preset Disable the use of Jest presets\n");
return [2];

View File

@@ -1,9 +1,10 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
@@ -34,9 +35,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });
exports.run = function (_) { return __awaiter(_this, void 0, void 0, function () {
exports.run = function (_) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
process.stdout.write("\nUsage:\n ts-jest command [options] [...args]\n\nCommands:\n config:init Creates initial Jest configuration\n config:migrate Migrates a given Jest configuration\n help [command] Show this help, or help about a command\n\nExample:\n ts-jest help config:migrate\n");
return [2];

View File

@@ -1,9 +1,10 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
@@ -34,13 +35,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
var bs_logger_1 = require("bs-logger");
var yargs_parser_1 = __importDefault(require("yargs-parser"));
var yargsParser = require("yargs-parser");
var logger_1 = require("../util/logger");
var VALID_COMMANDS = ['help', 'config:migrate', 'config:init'];
var logger = logger_1.rootLogger.child((_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'cli', _a[bs_logger_1.LogContexts.application] = 'ts-jest', _a));
@@ -48,7 +46,7 @@ function cli(args) {
return __awaiter(this, void 0, void 0, function () {
var parsedArgv, command, isHelp, _a, run, help, cmd;
return __generator(this, function (_b) {
parsedArgv = yargs_parser_1.default(args, {
parsedArgv = yargsParser(args, {
boolean: ['dry-run', 'jest-preset', 'allow-js', 'diff', 'babel', 'force', 'jsdom'],
string: ['tsconfig', 'js'],
count: ['verbose'],

View File

@@ -10,15 +10,16 @@ var __assign = (this && this.__assign) || function () {
};
return __assign.apply(this, arguments);
};
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
return {
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
@@ -36,14 +37,12 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var bs_logger_1 = require("bs-logger");
var buffer_from_1 = __importDefault(require("buffer-from"));
var bufferFrom = require("buffer-from");
var stableStringify = require("fast-json-stable-stringify");
var fs_1 = require("fs");
var memoize = require("lodash.memoize");
var mkdirp = require("mkdirp");
var path_1 = require("path");
var messages_1 = require("./util/messages");
@@ -112,7 +111,7 @@ function createCompiler(configs) {
_b.namespace = 'ts:serviceHost',
_b.call = null,
_b);
var serviceHostTraceCtx = __assign({}, serviceHostDebugCtx, (_c = {}, _c[bs_logger_1.LogContexts.logLevel] = bs_logger_1.LogLevels.trace, _c));
var serviceHostTraceCtx = __assign(__assign({}, serviceHostDebugCtx), (_c = {}, _c[bs_logger_1.LogContexts.logLevel] = bs_logger_1.LogLevels.trace, _c));
var serviceHost = {
getScriptFileNames: function () { return Object.keys(memoryCache.versions); },
getScriptVersion: function (fileName) {
@@ -131,11 +130,12 @@ function createCompiler(configs) {
}
return ts.ScriptSnapshot.fromString(contents);
},
fileExists: ts.sys.fileExists,
readFile: logger.wrap(serviceHostTraceCtx, 'readFile', ts.sys.readFile),
readDirectory: ts.sys.readDirectory,
getDirectories: ts.sys.getDirectories,
directoryExists: ts.sys.directoryExists,
fileExists: memoize(ts.sys.fileExists),
readFile: logger.wrap(serviceHostTraceCtx, 'readFile', memoize(ts.sys.readFile)),
readDirectory: memoize(ts.sys.readDirectory),
getDirectories: memoize(ts.sys.getDirectories),
directoryExists: memoize(ts.sys.directoryExists),
realpath: memoize(ts.sys.realpath),
getNewLine: function () { return '\n'; },
getCurrentDirectory: function () { return cwd; },
getCompilationSettings: function () { return compilerOptions; },
@@ -213,7 +213,7 @@ function readThrough(cachedir, memoryCache, compile, getExtension, cwd, logger)
}
function updateOutput(outputText, fileName, sourceMap, getExtension, sourceRoot) {
var base = path_1.basename(fileName);
var base64Map = buffer_from_1.default(updateSourceMap(sourceMap, fileName, sourceRoot), 'utf8').toString('base64');
var base64Map = bufferFrom(updateSourceMap(sourceMap, fileName, sourceRoot), 'utf8').toString('base64');
var sourceMapContent = "data:application/json;charset=utf-8;base64," + base64Map;
var sourceMapLength = (base + ".map").length + (getExtension(fileName).length - path_1.extname(fileName).length);
return outputText.slice(0, -sourceMapLength) + sourceMapContent;

View File

@@ -16,15 +16,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
return {
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
@@ -46,15 +47,12 @@ var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var bs_logger_1 = require("bs-logger");
var fs_1 = require("fs");
var json5_1 = __importDefault(require("json5"));
var json5 = require("json5");
var path_1 = require("path");
var semver_1 = __importDefault(require("semver"));
var semver = require("semver");
var __1 = require("..");
var compiler_1 = require("../compiler");
var transformers_1 = require("../transformers");
@@ -88,8 +86,8 @@ var toDiagnosticCode = function (code) {
return code ? parseInt(("" + code).trim().replace(/^TS/, ''), 10) || undefined : undefined;
};
var toDiagnosticCodeList = function (items, into) {
if (into === void 0) { into = []; }
var e_1, _a;
if (into === void 0) { into = []; }
if (!Array.isArray(items))
items = [items];
try {
@@ -166,7 +164,7 @@ var ConfigSet = (function () {
Object.defineProperty(ConfigSet.prototype, "projectDependencies", {
get: function () {
var pkg = this.projectPackageJson;
var names = Object.keys(__assign({}, pkg.optionalDependencies, pkg.peerDependencies, pkg.devDependencies, pkg.dependencies));
var names = Object.keys(__assign(__assign(__assign(__assign({}, pkg.optionalDependencies), pkg.peerDependencies), pkg.devDependencies), pkg.dependencies));
return names.reduce(function (map, name) {
var version = get_package_version_1.getPackageVersion(name);
if (version)
@@ -182,7 +180,7 @@ var ConfigSet = (function () {
var config = backports_1.backportJestConfig(this.logger, this._jestConfig);
if (this.parentOptions) {
var globals = config.globals || (config.globals = {});
globals['ts-jest'] = __assign({}, this.parentOptions, globals['ts-jest']);
globals['ts-jest'] = __assign(__assign({}, this.parentOptions), globals['ts-jest']);
}
this.logger.debug({ jestConfig: config }, 'normalized jest config');
return config;
@@ -342,7 +340,7 @@ var ConfigSet = (function () {
});
ConfigSet.loadConfig = function (base) {
var _a = importer_1.importer.babelCore(messages_1.ImportReasons.BabelJest), OptionManager = _a.OptionManager, loadPartialConfig = _a.loadPartialConfig, version = _a.version;
if (version && semver_1.default.satisfies(version, '>=6 <7')) {
if (version && semver.satisfies(version, '>=6 <7')) {
delete base.cwd;
}
if (typeof loadPartialConfig === 'function') {
@@ -363,11 +361,11 @@ var ConfigSet = (function () {
var base = { cwd: this.cwd };
if (babelConfig.kind === 'file') {
if (babelConfig.value) {
base = __assign({}, base, json5_1.default.parse(fs_1.readFileSync(babelConfig.value, 'utf8')));
base = __assign(__assign({}, base), json5.parse(fs_1.readFileSync(babelConfig.value, 'utf8')));
}
}
else if (babelConfig.kind === 'inline') {
base = __assign({}, base, babelConfig.value);
base = __assign(__assign({}, base), babelConfig.value);
}
var config = ConfigSet.loadConfig(base);
this.logger.debug({ babelConfig: config }, 'normalized babel config');
@@ -534,7 +532,9 @@ var ConfigSet = (function () {
declarationDir: undefined,
declarationMap: undefined,
emitDeclarationOnly: undefined,
incremental: undefined,
sourceRoot: undefined,
tsBuildInfoFile: undefined,
};
if (!this.tsJest.babelConfig) {
options.module = this.compilerModule.ModuleKind.CommonJS;
@@ -635,11 +635,11 @@ var ConfigSet = (function () {
};
}
config = result_1.config;
input = __assign({}, result_1.config, { compilerOptions: __assign({}, (result_1.config && result_1.config.compilerOptions), compilerOptions) });
input = __assign(__assign({}, result_1.config), { compilerOptions: __assign(__assign({}, (result_1.config && result_1.config.compilerOptions)), compilerOptions) });
basePath = normalize_slashes_1.normalizeSlashes(path_1.dirname(configFileName));
}
}
config.compilerOptions = __assign({}, config.compilerOptions, compilerOptions);
config.compilerOptions = __assign(__assign({}, config.compilerOptions), compilerOptions);
var result = ts.parseJsonConfigFileContent(config, ts.sys, basePath, undefined, configFileName);
var forcedOptions = this.overriddenCompilerOptions;
var finalOptions = result.options;

View File

@@ -14,10 +14,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
var logger_1 = require("../util/logger");
var logger = logger_1.rootLogger.child({ namespace: 'jest-preset' });
function createJestPreset(_a, from) {
var _b = (_a === void 0 ? {} : _a).allowJs, allowJs = _b === void 0 ? false : _b;
var _b;
var _c = (_a === void 0 ? {} : _a).allowJs, allowJs = _c === void 0 ? false : _c;
if (from === void 0) { from = {}; }
var _c;
logger.debug({ allowJs: allowJs }, 'creating jest presets', allowJs ? 'handling' : 'not handling', 'JavaScript files');
return __assign({ transform: __assign({}, from.transform, (_c = {}, _c[allowJs ? '^.+\\.[tj]sx?$' : '^.+\\.tsx?$'] = 'ts-jest', _c)) }, (from.testMatch ? { testMatch: from.testMatch } : undefined), (from.moduleFileExtensions ? { moduleFileExtensions: from.moduleFileExtensions } : undefined));
return __assign(__assign({ transform: __assign(__assign({}, from.transform), (_b = {}, _b[allowJs ? '^.+\\.[tj]sx?$' : '^.+\\.tsx?$'] = 'ts-jest', _b)) }, (from.testMatch ? { testMatch: from.testMatch } : undefined)), (from.moduleFileExtensions ? { moduleFileExtensions: from.moduleFileExtensions } : undefined));
}
exports.createJestPreset = createJestPreset;

View File

@@ -1,24 +1,25 @@
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
return {
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
var bs_logger_1 = require("bs-logger");
var logger_1 = require("../util/logger");
var messages_1 = require("../util/messages");
var escapeRegex = function (str) { return str.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&'); };
var logger = logger_1.rootLogger.child((_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'path-mapper', _a));
exports.pathsToModuleNameMapper = function (mapping, _a) {
var _b = (_a === void 0 ? {} : _a).prefix, prefix = _b === void 0 ? '' : _b;
var e_1, _c;
var e_1, _b;
var _c = (_a === void 0 ? {} : _a).prefix, prefix = _c === void 0 ? '' : _c;
var jestMap = {};
try {
for (var _d = __values(Object.keys(mapping)), _e = _d.next(); !_e.done; _e = _d.next()) {
@@ -54,7 +55,7 @@ exports.pathsToModuleNameMapper = function (mapping, _a) {
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
if (_e && !_e.done && (_b = _d.return)) _b.call(_d);
}
finally { if (e_1) throw e_1.error; }
}

6
node_modules/ts-jest/dist/index.js generated vendored
View File

@@ -19,8 +19,8 @@ var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
var bs_logger_1 = require("bs-logger");
var fs_1 = require("fs");
var path_1 = require("path");
@@ -50,20 +50,20 @@ function createTransformer(baseConfig) {
}
exports.createTransformer = createTransformer;
function process() {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _a;
return (_a = defaultTransformer()).process.apply(_a, __spread(args));
}
exports.process = process;
function getCacheKey() {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _a;
return (_a = defaultTransformer()).getCacheKey.apply(_a, __spread(args));
}
exports.getCacheKey = getCacheKey;

View File

@@ -1,11 +1,4 @@
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var hoisting = __importStar(require("./hoist-jest"));
var hoisting = require("./hoist-jest");
exports.internals = [hoisting];

View File

@@ -107,7 +107,7 @@ var TsJestTransformer = (function () {
}
if (babelJest) {
this.logger.debug({ fileName: filePath }, 'calling babel-jest processor');
result = babelJest.process(result, filePath, jestConfig, __assign({}, transformOptions, { instrument: false }));
result = babelJest.process(result, filePath, jestConfig, __assign(__assign({}, transformOptions), { instrument: false }));
}
if (hooks.afterProcess) {
this.logger.debug({ fileName: filePath, hookName: 'afterProcess' }, 'calling afterProcess hook');

View File

@@ -1,6 +1,7 @@
/// <reference types="jest" />
import * as _babel from 'babel__core';
import _ts, { CompilerOptions, SourceFile, TransformerFactory } from 'typescript';
import { CompilerOptions, SourceFile, TransformerFactory } from 'typescript';
import * as _ts from 'typescript';
import { ConfigSet } from './config/config-set';
export declare type TBabelCore = typeof _babel;
export declare type TTypeScript = typeof _ts;

View File

@@ -10,13 +10,13 @@ var __assign = (this && this.__assign) || function () {
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
var bs_logger_1 = require("bs-logger");
var messages_1 = require("./messages");
var context = (_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'backports', _a);
exports.backportJestConfig = function (logger, config) {
logger.debug(__assign({}, context, { config: config }), 'backporting config');
logger.debug(__assign(__assign({}, context), { config: config }), 'backporting config');
var _a = (config || {}).globals, globals = _a === void 0 ? {} : _a;
var _b = globals["ts-jest"], tsJest = _b === void 0 ? {} : _b;
var mergeTsJest = {};
@@ -84,7 +84,7 @@ exports.backportJestConfig = function (logger, config) {
if (hadWarnings) {
logger.warn(context, messages_1.Helps.MigrateConfigUsingCLI);
}
return __assign({}, config, { globals: __assign({}, globals, { 'ts-jest': __assign({}, mergeTsJest, tsJest) }) });
return __assign(__assign({}, config), { globals: __assign(__assign({}, globals), { 'ts-jest': __assign(__assign({}, mergeTsJest), tsJest) }) });
};
exports.backportTsJestDebugEnvVar = function (logger) {
if ('TS_JEST_DEBUG' in process.env) {

View File

@@ -5,7 +5,7 @@ var __extends = (this && this.__extends) || (function () {
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }

BIN
node_modules/ts-jest/icon.png generated vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -398,14 +398,15 @@ range, use the `satisfies(version, range)` function.
* `coerce(version)`: Coerces a string to semver if possible
This aims to provide a very forgiving translation of a non-semver
string to semver. It looks for the first digit in a string, and
consumes all remaining characters which satisfy at least a partial semver
(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters).
Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`).
All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`).
Only text which lacks digits will fail coercion (`version one` is not valid).
The maximum length for any semver component considered for coercion is 16 characters;
longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`).
The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`;
higher value components are invalid (`9999999999999999.4.7.4` is likely invalid).
This aims to provide a very forgiving translation of a non-semver string to
semver. It looks for the first digit in a string, and consumes all
remaining characters which satisfy at least a partial semver (e.g., `1`,
`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
`3.4.0`). Only text which lacks digits will fail coercion (`version one`
is not valid). The maximum length for any semver component considered for
coercion is 16 characters; longer components will be ignored
(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
components are invalid (`9999999999999999.4.7.4` is likely invalid).

View File

@@ -1,39 +1,35 @@
{
"_args": [
[
"semver@5.7.0",
"/Users/imranismail/Projects/setup-kustomize"
]
],
"_development": true,
"_from": "semver@5.7.0",
"_id": "semver@5.7.0",
"_from": "semver@^5.5",
"_id": "semver@5.7.1",
"_inBundle": false,
"_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"_integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"_location": "/ts-jest/semver",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "semver@5.7.0",
"raw": "semver@^5.5",
"name": "semver",
"escapedName": "semver",
"rawSpec": "5.7.0",
"rawSpec": "^5.5",
"saveSpec": null,
"fetchSpec": "5.7.0"
"fetchSpec": "^5.5"
},
"_requiredBy": [
"/ts-jest"
],
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
"_spec": "5.7.0",
"_where": "/Users/imranismail/Projects/setup-kustomize",
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"_shasum": "a954f931aeba508d307bbf069eff0c01c96116f7",
"_spec": "semver@^5.5",
"_where": "/Users/imranismail/Projects/setup-kustomize/node_modules/ts-jest",
"bin": {
"semver": "./bin/semver"
},
"bugs": {
"url": "https://github.com/npm/node-semver/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "The semantic version parser used by npm.",
"devDependencies": {
"tap": "^13.0.0-rc.18"
@@ -60,5 +56,5 @@
"tap": {
"check-coverage": true
},
"version": "5.7.0"
"version": "5.7.1"
}

53
node_modules/ts-jest/package.json generated vendored
View File

@@ -1,32 +1,27 @@
{
"_args": [
[
"ts-jest@24.0.2",
"/Users/imranismail/Projects/setup-kustomize"
]
],
"_development": true,
"_from": "ts-jest@24.0.2",
"_id": "ts-jest@24.0.2",
"_from": "ts-jest@24.1.0",
"_id": "ts-jest@24.1.0",
"_inBundle": false,
"_integrity": "sha512-h6ZCZiA1EQgjczxq+uGLXQlNgeg02WWJBbeT8j6nyIBRQdglqbvzDoHahTEIiS6Eor6x8mK6PfZ7brQ9Q6tzHw==",
"_integrity": "sha512-HEGfrIEAZKfu1pkaxB9au17b1d9b56YZSqz5eCVE8mX68+5reOvlM93xGOzzCREIov9mdH7JBG+s0UyNAqr0tQ==",
"_location": "/ts-jest",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "ts-jest@24.0.2",
"raw": "ts-jest@24.1.0",
"name": "ts-jest",
"escapedName": "ts-jest",
"rawSpec": "24.0.2",
"rawSpec": "24.1.0",
"saveSpec": null,
"fetchSpec": "24.0.2"
"fetchSpec": "24.1.0"
},
"_requiredBy": [
"#DEV:/"
"#DEV:/",
"#USER"
],
"_resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.0.2.tgz",
"_spec": "24.0.2",
"_resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.1.0.tgz",
"_shasum": "2eaa813271a2987b7e6c3fefbda196301c131734",
"_spec": "ts-jest@24.1.0",
"_where": "/Users/imranismail/Projects/setup-kustomize",
"author": {
"name": "Kulshekhar Kabra",
@@ -39,6 +34,7 @@
"bugs": {
"url": "https://github.com/kulshekhar/ts-jest/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Huafu Gandon",
@@ -51,15 +47,17 @@
"buffer-from": "1.x",
"fast-json-stable-stringify": "2.x",
"json5": "2.x",
"lodash.memoize": "4.x",
"make-error": "1.x",
"mkdirp": "0.x",
"resolve": "1.x",
"semver": "^5.5",
"yargs-parser": "10.x"
},
"deprecated": false,
"description": "A preprocessor with source maps support to help use TypeScript with Jest",
"devDependencies": {
"@commitlint/cli": "7.x",
"@commitlint/cli": "8.x",
"@commitlint/config-conventional": "7.x",
"@types/babel__core": "7.x",
"@types/buffer-from": "latest",
@@ -85,7 +83,6 @@
"jest": "24.x",
"js-yaml": "latest",
"lint-staged": "latest",
"lodash.memoize": "4.x",
"lodash.merge": "4.x",
"lodash.set": "4.x",
"npm-run-all": "latest",
@@ -116,16 +113,14 @@
],
"license": "MIT",
"lint-staged": {
"linters": {
"*.{ts,tsx}": [
"tslint --fix",
"git add"
],
"*.{js,jsx}": [
"eslint --fix",
"git add"
]
}
"*.{ts,tsx}": [
"tslint --fix",
"git add"
],
"*.{js,jsx}": [
"eslint --fix",
"git add"
]
},
"main": "dist/index.js",
"name": "ts-jest",
@@ -167,5 +162,5 @@
"version": "npm run changelog && git add CHANGELOG.md"
},
"types": "dist/index.d.ts",
"version": "24.0.2"
"version": "24.1.0"
}