Fixed #1 - Fixed the whatsnew-** script for loading release notes into builds
Added test to ensure that release notes are parsed properly Updated to latest dependencies to fix security vulnerability Updated GH Actions Workflow to run test before updating tag Updated README.md to reflect proper whatsnew documentation.
This commit is contained in:
2
node_modules/ts-jest/.gitattributes
generated
vendored
2
node_modules/ts-jest/.gitattributes
generated
vendored
@@ -1,2 +0,0 @@
|
||||
package-lock.json -diff -merge
|
||||
package-lock.json linguist-generated=true
|
||||
2
node_modules/ts-jest/.ts-jest-digest
generated
vendored
2
node_modules/ts-jest/.ts-jest-digest
generated
vendored
@@ -1 +1 @@
|
||||
0aceab77a1f613fedb22a0395a65327e834ef35c
|
||||
e2c1d8a30f4a1fa691815687145c378201aba86a
|
||||
69
node_modules/ts-jest/CHANGELOG.md
generated
vendored
69
node_modules/ts-jest/CHANGELOG.md
generated
vendored
@@ -1,3 +1,38 @@
|
||||
<a name="24.3.0"></a>
|
||||
# [24.3.0](https://github.com/kulshekhar/ts-jest/compare/v24.2.0...v24.3.0) (2020-01-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **config:** support babel config file path as string ([#1332](https://github.com/kulshekhar/ts-jest/issues/1332)) ([78a53c2](https://github.com/kulshekhar/ts-jest/commit/78a53c2))
|
||||
|
||||
|
||||
|
||||
<a name="24.2.0"></a>
|
||||
# [24.2.0](https://github.com/kulshekhar/ts-jest/compare/v24.1.0...v24.2.0) (2019-11-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* typescript serviceHost cache miss on Windows operating systems ([26ee731](https://github.com/kulshekhar/ts-jest/commit/26ee731))
|
||||
* **compiler:** pass filename to sha function instead of file extension ([ac1ac97](https://github.com/kulshekhar/ts-jest/commit/ac1ac97))
|
||||
* **transformers:** hoist jest.enableAutomock and jest.disableAutomock ([ac50bc3](https://github.com/kulshekhar/ts-jest/commit/ac50bc3))
|
||||
|
||||
|
||||
|
||||
<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)
|
||||
|
||||
@@ -205,26 +240,29 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* typos + node 6 compat ([0ed1587](https://github.com/kulshekhar/ts-jest/commit/0ed1587))
|
||||
* **ci:** can't use runInBand for e2e: cache collision ([db650f4](https://github.com/kulshekhar/ts-jest/commit/db650f4))
|
||||
* babel-config + adds test ([12146c3](https://github.com/kulshekhar/ts-jest/commit/12146c3))
|
||||
* fixes js style to be node < 10 compatible ([83d7517](https://github.com/kulshekhar/ts-jest/commit/83d7517))
|
||||
* hoisting per level + memoize fix ([31847b0](https://github.com/kulshekhar/ts-jest/commit/31847b0))
|
||||
* jest 22 did not have default config ([cbaddc3](https://github.com/kulshekhar/ts-jest/commit/cbaddc3))
|
||||
* makes node 6 happy ([f6f82b8](https://github.com/kulshekhar/ts-jest/commit/f6f82b8))
|
||||
* makes node6 happy ([f170285](https://github.com/kulshekhar/ts-jest/commit/f170285))
|
||||
* makes window happy ([36fbebe](https://github.com/kulshekhar/ts-jest/commit/36fbebe))
|
||||
* **ci:** can't use runInBand for e2e: cache collision ([db650f4](https://github.com/kulshekhar/ts-jest/commit/db650f4))
|
||||
* **ci:** do not run e2e sub-tests in band ([18ad865](https://github.com/kulshekhar/ts-jest/commit/18ad865))
|
||||
* **ci:** ensure npm is present with ci ([edb6eda](https://github.com/kulshekhar/ts-jest/commit/edb6eda))
|
||||
* **logger:** removes cyclic imports ([5ef980f](https://github.com/kulshekhar/ts-jest/commit/5ef980f))
|
||||
* babel-config + adds test ([12146c3](https://github.com/kulshekhar/ts-jest/commit/12146c3))
|
||||
* **tests:** CI fixes ([34a41ea](https://github.com/kulshekhar/ts-jest/commit/34a41ea))
|
||||
* fixes js style to be node < 10 compatible ([83d7517](https://github.com/kulshekhar/ts-jest/commit/83d7517))
|
||||
* hoisting per level + memoize fix ([31847b0](https://github.com/kulshekhar/ts-jest/commit/31847b0))
|
||||
* makes node6 happy ([f170285](https://github.com/kulshekhar/ts-jest/commit/f170285))
|
||||
* **tests:** detect npm version to use or not ci ([683a1e5](https://github.com/kulshekhar/ts-jest/commit/683a1e5))
|
||||
* node 6 unhappy again... ([703ad0b](https://github.com/kulshekhar/ts-jest/commit/703ad0b))
|
||||
* **tests:** CI fixes ([34a41ea](https://github.com/kulshekhar/ts-jest/commit/34a41ea))
|
||||
* **tests:** do not use babel in our tests + new API for simple ([3e4de3e](https://github.com/kulshekhar/ts-jest/commit/3e4de3e))
|
||||
* normalizes bundle hash on any node version ([ce7afaf](https://github.com/kulshekhar/ts-jest/commit/ce7afaf))
|
||||
* npm coming with node 6 doesn't talk `ci` ([b87198d](https://github.com/kulshekhar/ts-jest/commit/b87198d))
|
||||
* source maps ([89a30c9](https://github.com/kulshekhar/ts-jest/commit/89a30c9))
|
||||
* typos + node 6 compat ([0ed1587](https://github.com/kulshekhar/ts-jest/commit/0ed1587))
|
||||
* **tests:** more sanitizing for windows compat ([faae274](https://github.com/kulshekhar/ts-jest/commit/faae274))
|
||||
* updates templates ([f2e1da2](https://github.com/kulshekhar/ts-jest/commit/f2e1da2))
|
||||
* uses cross-platform spawn + fix pkg versions ([ac1599c](https://github.com/kulshekhar/ts-jest/commit/ac1599c))
|
||||
* we are not writing files, use normalized EOL ([47fff43](https://github.com/kulshekhar/ts-jest/commit/47fff43))
|
||||
* **tests:** detect npm version to use or not ci ([683a1e5](https://github.com/kulshekhar/ts-jest/commit/683a1e5))
|
||||
* **tests:** do not use babel in our tests + new API for simple ([3e4de3e](https://github.com/kulshekhar/ts-jest/commit/3e4de3e))
|
||||
* **tests:** more sanitizing for windows compat ([faae274](https://github.com/kulshekhar/ts-jest/commit/faae274))
|
||||
|
||||
|
||||
### Features
|
||||
@@ -251,6 +289,7 @@
|
||||
* **babel:** uses babel-jest cache key as part of ours ([f51c4a7](https://github.com/kulshekhar/ts-jest/commit/f51c4a7))
|
||||
* do not type check if fileName doesn't match ([cc45adc](https://github.com/kulshekhar/ts-jest/commit/cc45adc))
|
||||
* faster tests ([37a0187](https://github.com/kulshekhar/ts-jest/commit/37a0187))
|
||||
* improves speed of local test after 1st run ([cc04021](https://github.com/kulshekhar/ts-jest/commit/cc04021))
|
||||
* more cleaning ([c48f7b8](https://github.com/kulshekhar/ts-jest/commit/c48f7b8))
|
||||
* trying to improve travis-ci conf ([e4b4d95](https://github.com/kulshekhar/ts-jest/commit/e4b4d95))
|
||||
* **cache:** share config-sets for parallel test running ([090ca7b](https://github.com/kulshekhar/ts-jest/commit/090ca7b))
|
||||
@@ -267,27 +306,23 @@
|
||||
* **html:** correctly transforms html source when needed ([9a2d74f](https://github.com/kulshekhar/ts-jest/commit/9a2d74f))
|
||||
* **lint:** fixes tslint script & lint issues ([60ab36e](https://github.com/kulshekhar/ts-jest/commit/60ab36e))
|
||||
* **package:** update fs-extra to version 6.0.1 ([7e73536](https://github.com/kulshekhar/ts-jest/commit/7e73536))
|
||||
* **package:** update pkg-dir to version 3.0.0 ([3fb8f9f](https://github.com/kulshekhar/ts-jest/commit/3fb8f9f))
|
||||
* **package:** update yargs to version 12.0.1 ([390ffcd](https://github.com/kulshekhar/ts-jest/commit/390ffcd))
|
||||
* **source-maps:** fix source maps options/calls ([76e27c1](https://github.com/kulshekhar/ts-jest/commit/76e27c1))
|
||||
* allow (but deprecate) use of old preprocessor.js ([a65079f](https://github.com/kulshekhar/ts-jest/commit/a65079f))
|
||||
* big refactor + fixes (mainly cache key + coverage) ([e46caae](https://github.com/kulshekhar/ts-jest/commit/e46caae))
|
||||
* fixes coverage and tests ([09500c2](https://github.com/kulshekhar/ts-jest/commit/09500c2))
|
||||
* gracefully load [@babel](https://github.com/babel)/core or babel-core ([98b2410](https://github.com/kulshekhar/ts-jest/commit/98b2410))
|
||||
* hack for babel < 6 so that breakpoints do work ([90c74ef](https://github.com/kulshekhar/ts-jest/commit/90c74ef)), closes [#627](https://github.com/kulshekhar/ts-jest/issues/627)
|
||||
* makes node 6 happy ([f6f82b8](https://github.com/kulshekhar/ts-jest/commit/f6f82b8))
|
||||
* makes window happy ([36fbebe](https://github.com/kulshekhar/ts-jest/commit/36fbebe))
|
||||
* npm coming with node 6 doesn't talk `ci` ([b87198d](https://github.com/kulshekhar/ts-jest/commit/b87198d))
|
||||
* **package:** update pkg-dir to version 3.0.0 ([3fb8f9f](https://github.com/kulshekhar/ts-jest/commit/3fb8f9f))
|
||||
* **package:** update yargs to version 12.0.1 ([390ffcd](https://github.com/kulshekhar/ts-jest/commit/390ffcd))
|
||||
* resolves correctly config file path (fix [#636](https://github.com/kulshekhar/ts-jest/issues/636)) ([5ab100c](https://github.com/kulshekhar/ts-jest/commit/5ab100c))
|
||||
* test rootDir to handle preset-angular ([8a6a8f7](https://github.com/kulshekhar/ts-jest/commit/8a6a8f7))
|
||||
* Typo in utils.ts ([#534](https://github.com/kulshekhar/ts-jest/issues/534)) ([a650260](https://github.com/kulshekhar/ts-jest/commit/a650260))
|
||||
* **source-maps:** fix source maps options/calls ([76e27c1](https://github.com/kulshekhar/ts-jest/commit/76e27c1))
|
||||
* wrong error message ([c955083](https://github.com/kulshekhar/ts-jest/commit/c955083))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* do not hash cache key, jest does it underneath ([fbe4f1f](https://github.com/kulshekhar/ts-jest/commit/fbe4f1f))
|
||||
* improves speed of local test after 1st run ([cc04021](https://github.com/kulshekhar/ts-jest/commit/cc04021))
|
||||
|
||||
|
||||
|
||||
|
||||
6
node_modules/ts-jest/README.md
generated
vendored
6
node_modules/ts-jest/README.md
generated
vendored
@@ -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
|
||||
|
||||
@@ -57,6 +57,10 @@ We **DO NOT** use [SemVer](http://semver.org/) for versioning. Tho you can think
|
||||
|
||||
See also the list of [contributors](https://github.com/kulshekhar/ts-jest/contributors) who participated in this project.
|
||||
|
||||
## Supporters
|
||||
|
||||
- [JetBrains](https://www.jetbrains.com/?from=ts-jest) has been kind enough to support ts-jest with an [open source license](https://www.jetbrains.com/community/opensource/?from=ts-jest).
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
|
||||
|
||||
10
node_modules/ts-jest/dist/cli/config/init.js
generated
vendored
10
node_modules/ts-jest/dist/cli/config/init.js
generated
vendored
@@ -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];
|
||||
|
||||
19
node_modules/ts-jest/dist/cli/config/migrate.js
generated
vendored
19
node_modules/ts-jest/dist/cli/config/migrate.js
generated
vendored
@@ -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];
|
||||
|
||||
6
node_modules/ts-jest/dist/cli/help.js
generated
vendored
6
node_modules/ts-jest/dist/cli/help.js
generated
vendored
@@ -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];
|
||||
|
||||
12
node_modules/ts-jest/dist/cli/index.js
generated
vendored
12
node_modules/ts-jest/dist/cli/index.js
generated
vendored
@@ -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'],
|
||||
|
||||
42
node_modules/ts-jest/dist/compiler.js
generated
vendored
42
node_modules/ts-jest/dist/compiler.js
generated
vendored
@@ -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,30 +111,33 @@ 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) {
|
||||
var version = memoryCache.versions[fileName];
|
||||
var normalizedFileName = path_1.normalize(fileName);
|
||||
var version = memoryCache.versions[normalizedFileName];
|
||||
return version === undefined ? undefined : String(version);
|
||||
},
|
||||
getScriptSnapshot: function (fileName) {
|
||||
var hit = hasOwn.call(memoryCache.contents, fileName);
|
||||
logger.trace({ fileName: fileName, cacheHit: hit }, "getScriptSnapshot():", 'cache', hit ? 'hit' : 'miss');
|
||||
var normalizedFileName = path_1.normalize(fileName);
|
||||
var hit = hasOwn.call(memoryCache.contents, normalizedFileName);
|
||||
logger.trace({ normalizedFileName: normalizedFileName, cacheHit: hit }, "getScriptSnapshot():", 'cache', hit ? 'hit' : 'miss');
|
||||
if (!hit) {
|
||||
memoryCache.contents[fileName] = ts.sys.readFile(fileName);
|
||||
memoryCache.contents[normalizedFileName] = ts.sys.readFile(normalizedFileName);
|
||||
}
|
||||
var contents = memoryCache.contents[fileName];
|
||||
var contents = memoryCache.contents[normalizedFileName];
|
||||
if (contents === undefined) {
|
||||
return;
|
||||
}
|
||||
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 +215,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;
|
||||
@@ -226,7 +228,7 @@ function updateSourceMap(sourceMapText, fileName, _sourceRoot) {
|
||||
return stableStringify(sourceMap);
|
||||
}
|
||||
function getCacheName(sourceCode, fileName) {
|
||||
return sha1_1.sha1(path_1.extname(fileName), '\x00', sourceCode);
|
||||
return sha1_1.sha1(fileName, '\x00', sourceCode);
|
||||
}
|
||||
function isValidCacheContent(contents) {
|
||||
return /(?:9|0=|Q==)$/.test(contents.slice(-3));
|
||||
|
||||
44
node_modules/ts-jest/dist/config/config-set.d.ts
generated
vendored
44
node_modules/ts-jest/dist/config/config-set.d.ts
generated
vendored
@@ -4,29 +4,29 @@ import { CompilerOptions, CustomTransformers, ParsedCommandLine } from 'typescri
|
||||
import { AstTransformerDesc, BabelConfig, BabelJestTransformer, TTypeScript, TsCompiler, TsJestConfig, TsJestGlobalOptions, TsJestHooksMap } from '../types';
|
||||
export declare class ConfigSet {
|
||||
readonly parentOptions?: TsJestGlobalOptions | undefined;
|
||||
readonly projectPackageJson: Record<string, any>;
|
||||
readonly projectDependencies: Record<string, string>;
|
||||
readonly jest: jest.ProjectConfig;
|
||||
readonly tsJest: TsJestConfig;
|
||||
readonly typescript: ParsedCommandLine;
|
||||
readonly tsconfig: any;
|
||||
readonly versions: Record<string, string>;
|
||||
get projectPackageJson(): Record<string, any>;
|
||||
get projectDependencies(): Record<string, string>;
|
||||
get jest(): jest.ProjectConfig;
|
||||
get tsJest(): TsJestConfig;
|
||||
get typescript(): ParsedCommandLine;
|
||||
get tsconfig(): any;
|
||||
get versions(): Record<string, string>;
|
||||
private static loadConfig;
|
||||
readonly babel: BabelConfig | undefined;
|
||||
readonly compilerModule: TTypeScript;
|
||||
readonly babelJestTransformer: BabelJestTransformer | undefined;
|
||||
readonly tsCompiler: TsCompiler;
|
||||
readonly astTransformers: AstTransformerDesc[];
|
||||
readonly tsCustomTransformers: CustomTransformers;
|
||||
readonly hooks: TsJestHooksMap;
|
||||
readonly shouldReportDiagnostic: (filePath: string) => boolean;
|
||||
readonly shouldStringifyContent: (filePath: string) => boolean;
|
||||
readonly tsCacheDir: string | undefined;
|
||||
readonly overriddenCompilerOptions: Partial<CompilerOptions>;
|
||||
readonly rootDir: string;
|
||||
readonly cwd: string;
|
||||
readonly tsJestDigest: string;
|
||||
readonly cacheKey: string;
|
||||
get babel(): BabelConfig | undefined;
|
||||
get compilerModule(): TTypeScript;
|
||||
get babelJestTransformer(): BabelJestTransformer | undefined;
|
||||
get tsCompiler(): TsCompiler;
|
||||
get astTransformers(): AstTransformerDesc[];
|
||||
get tsCustomTransformers(): CustomTransformers;
|
||||
get hooks(): TsJestHooksMap;
|
||||
get shouldReportDiagnostic(): (filePath: string) => boolean;
|
||||
get shouldStringifyContent(): (filePath: string) => boolean;
|
||||
get tsCacheDir(): string | undefined;
|
||||
get overriddenCompilerOptions(): Partial<CompilerOptions>;
|
||||
get rootDir(): string;
|
||||
get cwd(): string;
|
||||
get tsJestDigest(): string;
|
||||
get cacheKey(): string;
|
||||
readonly logger: Logger;
|
||||
constructor(jestConfig: jest.ProjectConfig, parentOptions?: TsJestGlobalOptions | undefined, parentLogger?: Logger);
|
||||
resolvePath(inputPath: string, { throwIfMissing, nodeResolve }?: {
|
||||
|
||||
37
node_modules/ts-jest/dist/config/config-set.js
generated
vendored
37
node_modules/ts-jest/dist/config/config-set.js
generated
vendored
@@ -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,16 @@ 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')));
|
||||
if (path_1.extname(babelConfig.value) === '.js') {
|
||||
base = __assign(__assign({}, base), require(babelConfig.value));
|
||||
}
|
||||
else {
|
||||
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 +537,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 +640,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;
|
||||
|
||||
6
node_modules/ts-jest/dist/config/create-jest-preset.js
generated
vendored
6
node_modules/ts-jest/dist/config/create-jest-preset.js
generated
vendored
@@ -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;
|
||||
|
||||
15
node_modules/ts-jest/dist/config/paths-to-module-name-mapper.js
generated
vendored
15
node_modules/ts-jest/dist/config/paths-to-module-name-mapper.js
generated
vendored
@@ -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
6
node_modules/ts-jest/dist/index.js
generated
vendored
@@ -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;
|
||||
|
||||
2
node_modules/ts-jest/dist/transformers/hoist-jest.js
generated
vendored
2
node_modules/ts-jest/dist/transformers/hoist-jest.js
generated
vendored
@@ -21,7 +21,7 @@ var __spread = (this && this.__spread) || function () {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var bs_logger_1 = require("bs-logger");
|
||||
var HOIST_METHODS = ['mock', 'unmock'];
|
||||
var HOIST_METHODS = ['mock', 'unmock', 'enableAutomock', 'disableAutomock'];
|
||||
exports.name = 'hoisting-jest-mock';
|
||||
exports.version = 1;
|
||||
function factory(cs) {
|
||||
|
||||
9
node_modules/ts-jest/dist/transformers/index.js
generated
vendored
9
node_modules/ts-jest/dist/transformers/index.js
generated
vendored
@@ -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];
|
||||
|
||||
2
node_modules/ts-jest/dist/ts-jest-transformer.d.ts
generated
vendored
2
node_modules/ts-jest/dist/ts-jest-transformer.d.ts
generated
vendored
@@ -3,7 +3,7 @@ import { Logger } from 'bs-logger';
|
||||
import { ConfigSet } from './config/config-set';
|
||||
import { TsJestGlobalOptions } from './types';
|
||||
export declare class TsJestTransformer implements jest.Transformer {
|
||||
static readonly lastTransformerId: number;
|
||||
static get lastTransformerId(): number;
|
||||
readonly logger: Logger;
|
||||
readonly id: number;
|
||||
readonly options: TsJestGlobalOptions;
|
||||
|
||||
2
node_modules/ts-jest/dist/ts-jest-transformer.js
generated
vendored
2
node_modules/ts-jest/dist/ts-jest-transformer.js
generated
vendored
@@ -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');
|
||||
|
||||
3
node_modules/ts-jest/dist/types.d.ts
generated
vendored
3
node_modules/ts-jest/dist/types.d.ts
generated
vendored
@@ -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;
|
||||
|
||||
6
node_modules/ts-jest/dist/util/backports.js
generated
vendored
6
node_modules/ts-jest/dist/util/backports.js
generated
vendored
@@ -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) {
|
||||
|
||||
2
node_modules/ts-jest/dist/util/ts-error.js
generated
vendored
2
node_modules/ts-jest/dist/util/ts-error.js
generated
vendored
@@ -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
BIN
node_modules/ts-jest/icon.png
generated
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 59 KiB |
1
node_modules/ts-jest/node_modules/.bin/semver
generated
vendored
1
node_modules/ts-jest/node_modules/.bin/semver
generated
vendored
@@ -1 +0,0 @@
|
||||
../semver/bin/semver
|
||||
39
node_modules/ts-jest/node_modules/semver/CHANGELOG.md
generated
vendored
39
node_modules/ts-jest/node_modules/semver/CHANGELOG.md
generated
vendored
@@ -1,39 +0,0 @@
|
||||
# changes log
|
||||
|
||||
## 5.7
|
||||
|
||||
* Add `minVersion` method
|
||||
|
||||
## 5.6
|
||||
|
||||
* Move boolean `loose` param to an options object, with
|
||||
backwards-compatibility protection.
|
||||
* Add ability to opt out of special prerelease version handling with
|
||||
the `includePrerelease` option flag.
|
||||
|
||||
## 5.5
|
||||
|
||||
* Add version coercion capabilities
|
||||
|
||||
## 5.4
|
||||
|
||||
* Add intersection checking
|
||||
|
||||
## 5.3
|
||||
|
||||
* Add `minSatisfying` method
|
||||
|
||||
## 5.2
|
||||
|
||||
* Add `prerelease(v)` that returns prerelease components
|
||||
|
||||
## 5.1
|
||||
|
||||
* Add Backus-Naur for ranges
|
||||
* Remove excessively cute inspection methods
|
||||
|
||||
## 5.0
|
||||
|
||||
* Remove AMD/Browserified build artifacts
|
||||
* Fix ltr and gtr when using the `*` range
|
||||
* Fix for range `*` with a prerelease identifier
|
||||
15
node_modules/ts-jest/node_modules/semver/LICENSE
generated
vendored
15
node_modules/ts-jest/node_modules/semver/LICENSE
generated
vendored
@@ -1,15 +0,0 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
411
node_modules/ts-jest/node_modules/semver/README.md
generated
vendored
411
node_modules/ts-jest/node_modules/semver/README.md
generated
vendored
@@ -1,411 +0,0 @@
|
||||
semver(1) -- The semantic versioner for npm
|
||||
===========================================
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install --save semver
|
||||
````
|
||||
|
||||
## Usage
|
||||
|
||||
As a node module:
|
||||
|
||||
```js
|
||||
const semver = require('semver')
|
||||
|
||||
semver.valid('1.2.3') // '1.2.3'
|
||||
semver.valid('a.b.c') // null
|
||||
semver.clean(' =v1.2.3 ') // '1.2.3'
|
||||
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
|
||||
semver.gt('1.2.3', '9.8.7') // false
|
||||
semver.lt('1.2.3', '9.8.7') // true
|
||||
semver.minVersion('>=1.0.0') // '1.0.0'
|
||||
semver.valid(semver.coerce('v2')) // '2.0.0'
|
||||
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
|
||||
```
|
||||
|
||||
As a command-line utility:
|
||||
|
||||
```
|
||||
$ semver -h
|
||||
|
||||
A JavaScript implementation of the https://semver.org/ specification
|
||||
Copyright Isaac Z. Schlueter
|
||||
|
||||
Usage: semver [options] <version> [<version> [...]]
|
||||
Prints valid versions sorted by SemVer precedence
|
||||
|
||||
Options:
|
||||
-r --range <range>
|
||||
Print versions that match the specified range.
|
||||
|
||||
-i --increment [<level>]
|
||||
Increment a version by the specified level. Level can
|
||||
be one of: major, minor, patch, premajor, preminor,
|
||||
prepatch, or prerelease. Default level is 'patch'.
|
||||
Only one version may be specified.
|
||||
|
||||
--preid <identifier>
|
||||
Identifier to be used to prefix premajor, preminor,
|
||||
prepatch or prerelease version increments.
|
||||
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
-p --include-prerelease
|
||||
Always include prerelease versions in range matching
|
||||
|
||||
-c --coerce
|
||||
Coerce a string into SemVer if possible
|
||||
(does not imply --loose)
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no satisfying versions are found, then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.
|
||||
```
|
||||
|
||||
## Versions
|
||||
|
||||
A "version" is described by the `v2.0.0` specification found at
|
||||
<https://semver.org/>.
|
||||
|
||||
A leading `"="` or `"v"` character is stripped off and ignored.
|
||||
|
||||
## Ranges
|
||||
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
Note that this behavior can be suppressed (treating all prerelease
|
||||
versions as if they were normal versions, for the purpose of range
|
||||
matching) by setting the `includePrerelease` flag on the options
|
||||
object to any
|
||||
[functions](https://github.com/npm/node-semver#functions) that do
|
||||
range matching.
|
||||
|
||||
#### Prerelease Identifiers
|
||||
|
||||
The method `.inc` takes an additional `identifier` string argument that
|
||||
will append the value of the string as a prerelease identifier:
|
||||
|
||||
```javascript
|
||||
semver.inc('1.2.3', 'prerelease', 'beta')
|
||||
// '1.2.4-beta.0'
|
||||
```
|
||||
|
||||
command-line example:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.3 -i prerelease --preid beta
|
||||
1.2.4-beta.0
|
||||
```
|
||||
|
||||
Which then can be used to increment further:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.4-beta.0 -i prerelease
|
||||
1.2.4-beta.1
|
||||
```
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `""` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero digit in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
### Range Grammar
|
||||
|
||||
Putting all this together, here is a Backus-Naur grammar for ranges,
|
||||
for the benefit of parser authors:
|
||||
|
||||
```bnf
|
||||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
All methods and classes take a final `options` object argument. All
|
||||
options in this object are `false` by default. The options supported
|
||||
are:
|
||||
|
||||
- `loose` Be more forgiving about not-quite-valid semver strings.
|
||||
(Any resulting output will always be 100% strict compliant, of
|
||||
course.) For backwards compatibility reasons, if the `options`
|
||||
argument is a boolean value instead of an object, it is interpreted
|
||||
to be the `loose` param.
|
||||
- `includePrerelease` Set to suppress the [default
|
||||
behavior](https://github.com/npm/node-semver#prerelease-tags) of
|
||||
excluding prerelease tagged versions from ranges unless they are
|
||||
explicitly opted into.
|
||||
|
||||
Strict-mode Comparators and Ranges will be strict about the SemVer
|
||||
strings that they parse.
|
||||
|
||||
* `valid(v)`: Return the parsed version, or null if it's not valid.
|
||||
* `inc(v, release)`: Return the version incremented by the release
|
||||
type (`major`, `premajor`, `minor`, `preminor`, `patch`,
|
||||
`prepatch`, or `prerelease`), or null if it's not valid
|
||||
* `premajor` in one call will bump the version up to the next major
|
||||
version and down to a prerelease of that major version.
|
||||
`preminor`, and `prepatch` work the same way.
|
||||
* If called from a non-prerelease version, the `prerelease` will work the
|
||||
same as `prepatch`. It increments the patch version, then makes a
|
||||
prerelease. If the input version is already a prerelease it simply
|
||||
increments it.
|
||||
* `prerelease(v)`: Returns an array of prerelease components, or null
|
||||
if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
|
||||
* `major(v)`: Return the major version number.
|
||||
* `minor(v)`: Return the minor version number.
|
||||
* `patch(v)`: Return the patch version number.
|
||||
* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
|
||||
or comparators intersect.
|
||||
* `parse(v)`: Attempt to parse a string as a semantic version, returning either
|
||||
a `SemVer` object or `null`.
|
||||
|
||||
### Comparison
|
||||
|
||||
* `gt(v1, v2)`: `v1 > v2`
|
||||
* `gte(v1, v2)`: `v1 >= v2`
|
||||
* `lt(v1, v2)`: `v1 < v2`
|
||||
* `lte(v1, v2)`: `v1 <= v2`
|
||||
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
|
||||
even if they're not the exact same string. You already know how to
|
||||
compare strings.
|
||||
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
|
||||
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
|
||||
the corresponding function above. `"==="` and `"!=="` do simple
|
||||
string comparison, but are included for completeness. Throws if an
|
||||
invalid comparison string is provided.
|
||||
* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
|
||||
in descending order when passed to `Array.sort()`.
|
||||
* `diff(v1, v2)`: Returns difference between two versions by the release type
|
||||
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
|
||||
or null if the versions are the same.
|
||||
|
||||
### Comparators
|
||||
|
||||
* `intersects(comparator)`: Return true if the comparators intersect
|
||||
|
||||
### Ranges
|
||||
|
||||
* `validRange(range)`: Return the valid range or null if it's not valid
|
||||
* `satisfies(version, range)`: Return true if the version satisfies the
|
||||
range.
|
||||
* `maxSatisfying(versions, range)`: Return the highest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minSatisfying(versions, range)`: Return the lowest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minVersion(range)`: Return the lowest version that can possibly match
|
||||
the given range.
|
||||
* `gtr(version, range)`: Return `true` if version is greater than all the
|
||||
versions possible in the range.
|
||||
* `ltr(version, range)`: Return `true` if version is less than all the
|
||||
versions possible in the range.
|
||||
* `outside(version, range, hilo)`: Return true if the version is outside
|
||||
the bounds of the range in either the high or low direction. The
|
||||
`hilo` argument must be either the string `'>'` or `'<'`. (This is
|
||||
the function called by `gtr` and `ltr`.)
|
||||
* `intersects(range)`: Return true if any of the ranges comparators intersect
|
||||
|
||||
Note that, since ranges may be non-contiguous, a version might not be
|
||||
greater than a range, less than a range, *or* satisfy a range! For
|
||||
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
|
||||
until `2.0.0`, so the version `1.2.10` would not be greater than the
|
||||
range (because `2.0.1` satisfies, which is higher), nor less than the
|
||||
range (since `1.2.8` satisfies, which is lower), and it also does not
|
||||
satisfy the range.
|
||||
|
||||
If you want to know if a version satisfies or does not satisfy a
|
||||
range, use the `satisfies(version, range)` function.
|
||||
|
||||
### Coercion
|
||||
|
||||
* `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).
|
||||
160
node_modules/ts-jest/node_modules/semver/bin/semver
generated
vendored
160
node_modules/ts-jest/node_modules/semver/bin/semver
generated
vendored
@@ -1,160 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
// Standalone semver comparison program.
|
||||
// Exits successfully and prints matching version(s) if
|
||||
// any supplied version is valid and passes all tests.
|
||||
|
||||
var argv = process.argv.slice(2)
|
||||
|
||||
var versions = []
|
||||
|
||||
var range = []
|
||||
|
||||
var inc = null
|
||||
|
||||
var version = require('../package.json').version
|
||||
|
||||
var loose = false
|
||||
|
||||
var includePrerelease = false
|
||||
|
||||
var coerce = false
|
||||
|
||||
var identifier
|
||||
|
||||
var semver = require('../semver')
|
||||
|
||||
var reverse = false
|
||||
|
||||
var options = {}
|
||||
|
||||
main()
|
||||
|
||||
function main () {
|
||||
if (!argv.length) return help()
|
||||
while (argv.length) {
|
||||
var a = argv.shift()
|
||||
var indexOfEqualSign = a.indexOf('=')
|
||||
if (indexOfEqualSign !== -1) {
|
||||
a = a.slice(0, indexOfEqualSign)
|
||||
argv.unshift(a.slice(indexOfEqualSign + 1))
|
||||
}
|
||||
switch (a) {
|
||||
case '-rv': case '-rev': case '--rev': case '--reverse':
|
||||
reverse = true
|
||||
break
|
||||
case '-l': case '--loose':
|
||||
loose = true
|
||||
break
|
||||
case '-p': case '--include-prerelease':
|
||||
includePrerelease = true
|
||||
break
|
||||
case '-v': case '--version':
|
||||
versions.push(argv.shift())
|
||||
break
|
||||
case '-i': case '--inc': case '--increment':
|
||||
switch (argv[0]) {
|
||||
case 'major': case 'minor': case 'patch': case 'prerelease':
|
||||
case 'premajor': case 'preminor': case 'prepatch':
|
||||
inc = argv.shift()
|
||||
break
|
||||
default:
|
||||
inc = 'patch'
|
||||
break
|
||||
}
|
||||
break
|
||||
case '--preid':
|
||||
identifier = argv.shift()
|
||||
break
|
||||
case '-r': case '--range':
|
||||
range.push(argv.shift())
|
||||
break
|
||||
case '-c': case '--coerce':
|
||||
coerce = true
|
||||
break
|
||||
case '-h': case '--help': case '-?':
|
||||
return help()
|
||||
default:
|
||||
versions.push(a)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
var options = { loose: loose, includePrerelease: includePrerelease }
|
||||
|
||||
versions = versions.map(function (v) {
|
||||
return coerce ? (semver.coerce(v) || { version: v }).version : v
|
||||
}).filter(function (v) {
|
||||
return semver.valid(v)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
if (inc && (versions.length !== 1 || range.length)) { return failInc() }
|
||||
|
||||
for (var i = 0, l = range.length; i < l; i++) {
|
||||
versions = versions.filter(function (v) {
|
||||
return semver.satisfies(v, range[i], options)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
}
|
||||
return success(versions)
|
||||
}
|
||||
|
||||
function failInc () {
|
||||
console.error('--inc can only be used on a single version with no range')
|
||||
fail()
|
||||
}
|
||||
|
||||
function fail () { process.exit(1) }
|
||||
|
||||
function success () {
|
||||
var compare = reverse ? 'rcompare' : 'compare'
|
||||
versions.sort(function (a, b) {
|
||||
return semver[compare](a, b, options)
|
||||
}).map(function (v) {
|
||||
return semver.clean(v, options)
|
||||
}).map(function (v) {
|
||||
return inc ? semver.inc(v, inc, options, identifier) : v
|
||||
}).forEach(function (v, i, _) { console.log(v) })
|
||||
}
|
||||
|
||||
function help () {
|
||||
console.log(['SemVer ' + version,
|
||||
'',
|
||||
'A JavaScript implementation of the https://semver.org/ specification',
|
||||
'Copyright Isaac Z. Schlueter',
|
||||
'',
|
||||
'Usage: semver [options] <version> [<version> [...]]',
|
||||
'Prints valid versions sorted by SemVer precedence',
|
||||
'',
|
||||
'Options:',
|
||||
'-r --range <range>',
|
||||
' Print versions that match the specified range.',
|
||||
'',
|
||||
'-i --increment [<level>]',
|
||||
' Increment a version by the specified level. Level can',
|
||||
' be one of: major, minor, patch, premajor, preminor,',
|
||||
" prepatch, or prerelease. Default level is 'patch'.",
|
||||
' Only one version may be specified.',
|
||||
'',
|
||||
'--preid <identifier>',
|
||||
' Identifier to be used to prefix premajor, preminor,',
|
||||
' prepatch or prerelease version increments.',
|
||||
'',
|
||||
'-l --loose',
|
||||
' Interpret versions and ranges loosely',
|
||||
'',
|
||||
'-p --include-prerelease',
|
||||
' Always include prerelease versions in range matching',
|
||||
'',
|
||||
'-c --coerce',
|
||||
' Coerce a string into SemVer if possible',
|
||||
' (does not imply --loose)',
|
||||
'',
|
||||
'Program exits successfully if any valid version satisfies',
|
||||
'all supplied ranges, and prints all satisfying versions.',
|
||||
'',
|
||||
'If no satisfying versions are found, then exits failure.',
|
||||
'',
|
||||
'Versions are printed in ascending order, so supplying',
|
||||
'multiple versions to the utility will just sort them.'
|
||||
].join('\n'))
|
||||
}
|
||||
64
node_modules/ts-jest/node_modules/semver/package.json
generated
vendored
64
node_modules/ts-jest/node_modules/semver/package.json
generated
vendored
@@ -1,64 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"semver@5.7.0",
|
||||
"/Users/drew.heavner/Documents/Github/upload-google-play"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "semver@5.7.0",
|
||||
"_id": "semver@5.7.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
||||
"_location": "/ts-jest/semver",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "semver@5.7.0",
|
||||
"name": "semver",
|
||||
"escapedName": "semver",
|
||||
"rawSpec": "5.7.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "5.7.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ts-jest"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
||||
"_spec": "5.7.0",
|
||||
"_where": "/Users/drew.heavner/Documents/Github/upload-google-play",
|
||||
"bin": {
|
||||
"semver": "./bin/semver"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/npm/node-semver/issues"
|
||||
},
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"devDependencies": {
|
||||
"tap": "^13.0.0-rc.18"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"range.bnf",
|
||||
"semver.js"
|
||||
],
|
||||
"homepage": "https://github.com/npm/node-semver#readme",
|
||||
"license": "ISC",
|
||||
"main": "semver.js",
|
||||
"name": "semver",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/npm/node-semver.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postpublish": "git push origin --all; git push origin --tags",
|
||||
"postversion": "npm publish",
|
||||
"preversion": "npm test",
|
||||
"test": "tap"
|
||||
},
|
||||
"tap": {
|
||||
"check-coverage": true
|
||||
},
|
||||
"version": "5.7.0"
|
||||
}
|
||||
16
node_modules/ts-jest/node_modules/semver/range.bnf
generated
vendored
16
node_modules/ts-jest/node_modules/semver/range.bnf
generated
vendored
@@ -1,16 +0,0 @@
|
||||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | [1-9] ( [0-9] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
1483
node_modules/ts-jest/node_modules/semver/semver.js
generated
vendored
1483
node_modules/ts-jest/node_modules/semver/semver.js
generated
vendored
File diff suppressed because it is too large
Load Diff
54
node_modules/ts-jest/package.json
generated
vendored
54
node_modules/ts-jest/package.json
generated
vendored
@@ -1,32 +1,27 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"ts-jest@24.0.2",
|
||||
"/Users/drew.heavner/Documents/Github/upload-google-play"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "ts-jest@24.0.2",
|
||||
"_id": "ts-jest@24.0.2",
|
||||
"_from": "ts-jest@24.3.0",
|
||||
"_id": "ts-jest@24.3.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-h6ZCZiA1EQgjczxq+uGLXQlNgeg02WWJBbeT8j6nyIBRQdglqbvzDoHahTEIiS6Eor6x8mK6PfZ7brQ9Q6tzHw==",
|
||||
"_integrity": "sha512-Hb94C/+QRIgjVZlJyiWwouYUF+siNJHJHknyspaOcZ+OQAIdFG/UrdQVXw/0B8Z3No34xkUXZJpOTy9alOWdVQ==",
|
||||
"_location": "/ts-jest",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ts-jest@24.0.2",
|
||||
"raw": "ts-jest@24.3.0",
|
||||
"name": "ts-jest",
|
||||
"escapedName": "ts-jest",
|
||||
"rawSpec": "24.0.2",
|
||||
"rawSpec": "24.3.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "24.0.2"
|
||||
"fetchSpec": "24.3.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.3.0.tgz",
|
||||
"_shasum": "b97814e3eab359ea840a1ac112deae68aa440869",
|
||||
"_spec": "ts-jest@24.3.0",
|
||||
"_where": "/Users/drew.heavner/Documents/Github/upload-google-play",
|
||||
"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",
|
||||
@@ -164,8 +159,9 @@
|
||||
"test:prepare": "npm run test:e2e -- --prepareOnly",
|
||||
"test:unit": "jest",
|
||||
"typecheck": "tsc -p .",
|
||||
"update:e2e": "node scripts/update-e2e-templates.js",
|
||||
"version": "npm run changelog && git add CHANGELOG.md"
|
||||
},
|
||||
"types": "dist/index.d.ts",
|
||||
"version": "24.0.2"
|
||||
"version": "24.3.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user