ts-jest 26.1.2 → 26.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ts-jest-digest +1 -1
- package/CHANGELOG.md +33 -0
- package/dist/compiler/language-service.js +3 -1
- package/dist/config/config-set.d.ts +2 -2
- package/dist/config/config-set.js +74 -15
- package/dist/config/create-jest-preset.d.ts +1 -1
- package/dist/config/paths-to-module-name-mapper.d.ts +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/ts-jest-transformer.d.ts +3 -3
- package/dist/types.d.ts +8 -49
- package/dist/util/{exported.d.ts → index.d.ts} +0 -0
- package/dist/util/{exported.js → index.js} +0 -0
- package/dist/util/version-checkers.js +22 -19
- package/package.json +3 -4
- package/utils/index.d.ts +1 -1
- package/utils/index.js +1 -1
- package/jest-base.js +0 -12
- package/tsconfig.spec.json +0 -4
package/.ts-jest-digest
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3793ca0e5f06b7056a87f12d06ee54c5afb1dc2a
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
# [26.2.0](https://github.com/kulshekhar/ts-jest/compare/v26.1.4...v26.2.0) (2020-08-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* move `@types/jest` to dependencies to work well with yarn 2 ([#1859](https://github.com/kulshekhar/ts-jest/issues/1859)) ([5eb1389](https://github.com/kulshekhar/ts-jest/commit/5eb1389caaa0431e49ae6ca26b18e290208e0a0a)), closes [#1857](https://github.com/kulshekhar/ts-jest/issues/1857)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **config:** support `after` and `afterDeclarations` AST transformers ([#1831](https://github.com/kulshekhar/ts-jest/issues/1831)) ([be20a7c](https://github.com/kulshekhar/ts-jest/commit/be20a7c78c97027b33aec178da0f533095790871))
|
|
12
|
+
* allow opt-out version warning message by environment variable `TS_JEST_DISABLE_VER_CHECKER` ([#1821](https://github.com/kulshekhar/ts-jest/issues/1821)) ([e6b42fc](https://github.com/kulshekhar/ts-jest/commit/e6b42fcd7a75c7b14e636a45cda04de18a46908b)), closes [#1774](https://github.com/kulshekhar/ts-jest/issues/1774)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [26.1.4](https://github.com/kulshekhar/ts-jest/compare/v26.1.3...v26.1.4) (2020-07-28)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **compiler:** check if test file exists before doing type check ([#1827](https://github.com/kulshekhar/ts-jest/issues/1827)) ([cc89d5b](https://github.com/kulshekhar/ts-jest/commit/cc89d5b1f912975cd29114c5b3b0bf18426816da)), closes [#1506](https://github.com/kulshekhar/ts-jest/issues/1506)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [26.1.3](https://github.com/kulshekhar/ts-jest/compare/v26.1.2...v26.1.3) (2020-07-16)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* revert [#1793](https://github.com/kulshekhar/ts-jest/issues/1793) ([#1804](https://github.com/kulshekhar/ts-jest/issues/1804)) ([5095525](https://github.com/kulshekhar/ts-jest/commit/5095525333c8579c9c5e7f3149294b31f28d6774))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
1
34
|
## [26.1.2](https://github.com/kulshekhar/ts-jest/compare/v26.1.1...v26.1.2) (2020-07-13)
|
|
2
35
|
|
|
3
36
|
|
|
@@ -254,7 +254,9 @@ exports.initializeLanguageServiceInstance = function (configs, logger) {
|
|
|
254
254
|
try {
|
|
255
255
|
for (var _c = __values(memoryCache.resolvedModules.entries()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
256
256
|
var _e = __read(_d.value, 2), testFileName = _e[0], resolvedModules = _e[1];
|
|
257
|
-
if (resolvedModules.includes(fileName) &&
|
|
257
|
+
if (resolvedModules.includes(fileName) &&
|
|
258
|
+
!diagnosedFiles.includes(testFileName) &&
|
|
259
|
+
fs_1.existsSync(testFileName)) {
|
|
258
260
|
var testFileContent = (_b = memoryCache.files.get(testFileName)) === null || _b === void 0 ? void 0 : _b.text;
|
|
259
261
|
if (!testFileContent) {
|
|
260
262
|
updateMemoryCache(cacheReadFile(testFileName), testFileName);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Config } from '@jest/types';
|
|
1
|
+
import type { Config } from '@jest/types';
|
|
2
2
|
import { Logger } from 'bs-logger';
|
|
3
|
-
import { TsCompiler, TsJestGlobalOptions, TTypeScript } from '../types';
|
|
3
|
+
import type { TsCompiler, TsJestGlobalOptions, TTypeScript } from '../types';
|
|
4
4
|
export declare class ConfigSet {
|
|
5
5
|
readonly parentOptions?: TsJestGlobalOptions | undefined;
|
|
6
6
|
get versions(): Record<string, string>;
|
|
@@ -139,16 +139,18 @@ var ConfigSet = (function () {
|
|
|
139
139
|
Object.defineProperty(ConfigSet.prototype, "projectPackageJson", {
|
|
140
140
|
get: function () {
|
|
141
141
|
var packageJson = this.tsJest.packageJson;
|
|
142
|
-
if (packageJson
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
if (packageJson) {
|
|
143
|
+
if (packageJson.kind === 'inline') {
|
|
144
|
+
return packageJson.value;
|
|
145
|
+
}
|
|
146
|
+
else if (packageJson.kind === 'file' && packageJson.value) {
|
|
147
|
+
var path = this.resolvePath(packageJson.value);
|
|
148
|
+
if (fs_1.existsSync(path)) {
|
|
149
|
+
return require(path);
|
|
150
|
+
}
|
|
151
|
+
this.logger.warn("Unable to find the root of the project where ts-jest has been installed.");
|
|
152
|
+
return {};
|
|
149
153
|
}
|
|
150
|
-
this.logger.warn("Unable to find the root of the project where ts-jest has been installed.");
|
|
151
|
-
return {};
|
|
152
154
|
}
|
|
153
155
|
var tsJestRoot = path_1.resolve(__dirname, '..', '..');
|
|
154
156
|
var pkgPath = path_1.resolve(tsJestRoot, '..', '..', 'package.json');
|
|
@@ -186,7 +188,7 @@ var ConfigSet = (function () {
|
|
|
186
188
|
var _a;
|
|
187
189
|
var config = backports_1.backportJestConfig(this.logger, this._jestConfig);
|
|
188
190
|
if (this.parentOptions) {
|
|
189
|
-
var globals = (_a = config.globals) !== null && _a !== void 0 ? _a :
|
|
191
|
+
var globals = (_a = config.globals) !== null && _a !== void 0 ? _a : Object.create(null);
|
|
190
192
|
globals['ts-jest'] = __assign(__assign({}, this.parentOptions), globals['ts-jest']);
|
|
191
193
|
}
|
|
192
194
|
this.logger.debug({ jestConfig: config }, 'normalized jest config');
|
|
@@ -247,7 +249,35 @@ var ConfigSet = (function () {
|
|
|
247
249
|
value: packageJsonOpt,
|
|
248
250
|
};
|
|
249
251
|
}
|
|
250
|
-
var transformers =
|
|
252
|
+
var transformers = Object.create(null);
|
|
253
|
+
var astTransformers = options.astTransformers;
|
|
254
|
+
if (astTransformers) {
|
|
255
|
+
if (Array.isArray(astTransformers)) {
|
|
256
|
+
this.logger.warn("The configuration for astTransformers as string[] is deprecated and will be removed in ts-jest 27. Please define your custom AST transformers in a form of an object. More information you can check online documentation https://kulshekhar.github.io/ts-jest/user/config/astTransformers");
|
|
257
|
+
transformers = {
|
|
258
|
+
before: astTransformers.map(function (transformerPath) { return _this.resolvePath(transformerPath, { nodeResolve: true }); }),
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
if (astTransformers.before) {
|
|
263
|
+
transformers = {
|
|
264
|
+
before: astTransformers.before.map(function (transformerPath) {
|
|
265
|
+
return _this.resolvePath(transformerPath, { nodeResolve: true });
|
|
266
|
+
}),
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
if (astTransformers.after) {
|
|
270
|
+
transformers = __assign(__assign({}, transformers), { after: astTransformers.after.map(function (transformerPath) {
|
|
271
|
+
return _this.resolvePath(transformerPath, { nodeResolve: true });
|
|
272
|
+
}) });
|
|
273
|
+
}
|
|
274
|
+
if (astTransformers.afterDeclarations) {
|
|
275
|
+
transformers = __assign(__assign({}, transformers), { afterDeclarations: astTransformers.afterDeclarations.map(function (transformerPath) {
|
|
276
|
+
return _this.resolvePath(transformerPath, { nodeResolve: true });
|
|
277
|
+
}) });
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
251
281
|
var babelConfigOpt = options.babelConfig;
|
|
252
282
|
var babelConfig;
|
|
253
283
|
if (typeof babelConfigOpt === 'string' || babelConfigOpt === true) {
|
|
@@ -411,7 +441,24 @@ var ConfigSet = (function () {
|
|
|
411
441
|
});
|
|
412
442
|
Object.defineProperty(ConfigSet.prototype, "astTransformers", {
|
|
413
443
|
get: function () {
|
|
414
|
-
|
|
444
|
+
var astTransformers = {
|
|
445
|
+
before: __spread(transformers_1.internals),
|
|
446
|
+
};
|
|
447
|
+
var transformers = this.tsJest.transformers;
|
|
448
|
+
if (transformers.before) {
|
|
449
|
+
astTransformers = {
|
|
450
|
+
before: __spread(astTransformers.before, transformers.before.map(function (transformerFilePath) { return require(transformerFilePath); })),
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
if (transformers.after) {
|
|
454
|
+
astTransformers = __assign(__assign({}, astTransformers), { after: transformers.after.map(function (transformerFilePath) { return require(transformerFilePath); }) });
|
|
455
|
+
}
|
|
456
|
+
if (transformers.afterDeclarations) {
|
|
457
|
+
astTransformers = __assign(__assign({}, astTransformers), { afterDeclarations: transformers.afterDeclarations.map(function (transformerFilePath) {
|
|
458
|
+
return require(transformerFilePath);
|
|
459
|
+
}) });
|
|
460
|
+
}
|
|
461
|
+
return astTransformers;
|
|
415
462
|
},
|
|
416
463
|
enumerable: false,
|
|
417
464
|
configurable: true
|
|
@@ -419,9 +466,16 @@ var ConfigSet = (function () {
|
|
|
419
466
|
Object.defineProperty(ConfigSet.prototype, "tsCustomTransformers", {
|
|
420
467
|
get: function () {
|
|
421
468
|
var _this = this;
|
|
422
|
-
|
|
423
|
-
before: this.astTransformers.map(function (t) { return t.factory(_this); }),
|
|
469
|
+
var customTransformers = {
|
|
470
|
+
before: this.astTransformers.before.map(function (t) { return t.factory(_this); }),
|
|
424
471
|
};
|
|
472
|
+
if (this.astTransformers.after) {
|
|
473
|
+
customTransformers = __assign(__assign({}, customTransformers), { after: this.astTransformers.after.map(function (t) { return t.factory(_this); }) });
|
|
474
|
+
}
|
|
475
|
+
if (this.astTransformers.afterDeclarations) {
|
|
476
|
+
customTransformers = __assign(__assign({}, customTransformers), { afterDeclarations: this.astTransformers.afterDeclarations.map(function (t) { return t.factory(_this); }) });
|
|
477
|
+
}
|
|
478
|
+
return customTransformers;
|
|
425
479
|
},
|
|
426
480
|
enumerable: false,
|
|
427
481
|
configurable: true
|
|
@@ -585,7 +639,9 @@ var ConfigSet = (function () {
|
|
|
585
639
|
versions: this.versions,
|
|
586
640
|
projectDepVersions: this.projectDependencies,
|
|
587
641
|
digest: this.tsJestDigest,
|
|
588
|
-
transformers: this.astTransformers
|
|
642
|
+
transformers: Object.values(this.astTransformers)
|
|
643
|
+
.reduce(function (acc, val) { return acc.concat(val); }, [])
|
|
644
|
+
.map(function (t) { return t.name + "@" + t.version; }),
|
|
589
645
|
jest: jest,
|
|
590
646
|
tsJest: this.tsJest,
|
|
591
647
|
babel: this.babel,
|
|
@@ -739,6 +795,9 @@ var ConfigSet = (function () {
|
|
|
739
795
|
__decorate([
|
|
740
796
|
memoize_1.Memoize()
|
|
741
797
|
], ConfigSet.prototype, "jest", null);
|
|
798
|
+
__decorate([
|
|
799
|
+
memoize_1.Memoize()
|
|
800
|
+
], ConfigSet.prototype, "isTestFile", null);
|
|
742
801
|
__decorate([
|
|
743
802
|
memoize_1.Memoize()
|
|
744
803
|
], ConfigSet.prototype, "tsJest", null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Config } from '@jest/types';
|
|
1
|
+
import type { Config } from '@jest/types';
|
|
2
2
|
declare type JestPathMapping = Config.InitialOptions['moduleNameMapper'];
|
|
3
3
|
export declare const pathsToModuleNameMapper: (mapping: import("typescript").MapLike<string[]>, { prefix }?: {
|
|
4
4
|
prefix?: string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createJestPreset as createJestPresetCore } from './config/create-jest-preset';
|
|
2
2
|
import { TsJestTransformer } from './ts-jest-transformer';
|
|
3
|
-
import { TsJestGlobalOptions } from './types';
|
|
3
|
+
import type { TsJestGlobalOptions } from './types';
|
|
4
4
|
import { mocked as mockedCore } from './util/testing';
|
|
5
5
|
declare module '@jest/types' {
|
|
6
6
|
namespace Config {
|
|
@@ -16,8 +16,6 @@ export declare const pathsToModuleNameMapper: (mapping: import("typescript").Map
|
|
|
16
16
|
}) => {
|
|
17
17
|
[key: string]: string | string[];
|
|
18
18
|
} | undefined;
|
|
19
|
-
export declare const version: string;
|
|
20
|
-
export declare const digest: string;
|
|
21
19
|
export declare function createTransformer(baseConfig?: TsJestGlobalOptions): TsJestTransformer;
|
|
22
20
|
declare const jestPreset: Pick<Partial<{
|
|
23
21
|
automock: boolean;
|
|
@@ -35,7 +33,7 @@ declare const jestPreset: Pick<Partial<{
|
|
|
35
33
|
coverageDirectory: string;
|
|
36
34
|
coveragePathIgnorePatterns: string[];
|
|
37
35
|
coverageProvider: "babel" | "v8";
|
|
38
|
-
coverageReporters:
|
|
36
|
+
coverageReporters: import("@jest/types/build/Config").CoverageReporters;
|
|
39
37
|
coverageThreshold: {
|
|
40
38
|
global: {
|
|
41
39
|
[key: string]: number;
|
|
@@ -98,6 +96,7 @@ declare const jestPreset: Pick<Partial<{
|
|
|
98
96
|
silent: boolean;
|
|
99
97
|
skipFilter: boolean;
|
|
100
98
|
skipNodeResolution: boolean;
|
|
99
|
+
slowTestThreshold: number;
|
|
101
100
|
snapshotResolver: string;
|
|
102
101
|
snapshotSerializers: string[];
|
|
103
102
|
errorOnDeprecated: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CacheKeyOptions, TransformOptions, TransformedSource, Transformer } from '@jest/transform';
|
|
2
|
-
import { Config } from '@jest/types';
|
|
1
|
+
import type { CacheKeyOptions, TransformOptions, TransformedSource, Transformer } from '@jest/transform';
|
|
2
|
+
import type { Config } from '@jest/types';
|
|
3
3
|
import { ConfigSet } from './config/config-set';
|
|
4
|
-
import { TsJestGlobalOptions } from './types';
|
|
4
|
+
import type { TsJestGlobalOptions } from './types';
|
|
5
5
|
export declare class TsJestTransformer implements Transformer {
|
|
6
6
|
private readonly logger;
|
|
7
7
|
private readonly id;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import * as _babel from 'babel__core';
|
|
2
|
-
import * as _ts from 'typescript';
|
|
1
|
+
import type * as _babel from 'babel__core';
|
|
2
|
+
import type * as _ts from 'typescript';
|
|
3
3
|
export declare type TTypeScript = typeof _ts;
|
|
4
4
|
export declare type BabelConfig = _babel.TransformOptions;
|
|
5
|
+
export interface ConfigCustomTransformer {
|
|
6
|
+
before?: string[];
|
|
7
|
+
after?: string[];
|
|
8
|
+
afterDeclarations?: string[];
|
|
9
|
+
}
|
|
5
10
|
export interface TsJestGlobalOptions {
|
|
6
11
|
tsConfig?: boolean | string | _ts.CompilerOptions;
|
|
7
12
|
tsconfig?: boolean | string | _ts.CompilerOptions;
|
|
8
13
|
packageJson?: boolean | string | Record<string, unknown>;
|
|
9
14
|
isolatedModules?: boolean;
|
|
10
15
|
compiler?: string;
|
|
11
|
-
astTransformers?: string[];
|
|
16
|
+
astTransformers?: string[] | ConfigCustomTransformer;
|
|
12
17
|
diagnostics?: boolean | {
|
|
13
18
|
pretty?: boolean;
|
|
14
19
|
ignoreCodes?: number | string | (number | string)[];
|
|
@@ -18,52 +23,6 @@ export interface TsJestGlobalOptions {
|
|
|
18
23
|
babelConfig?: boolean | string | BabelConfig;
|
|
19
24
|
stringifyContentPathRegex?: string | RegExp;
|
|
20
25
|
}
|
|
21
|
-
interface TsJestConfig$tsConfig$file {
|
|
22
|
-
kind: 'file';
|
|
23
|
-
value: string | undefined;
|
|
24
|
-
}
|
|
25
|
-
interface TsJestConfig$tsConfig$inline {
|
|
26
|
-
kind: 'inline';
|
|
27
|
-
value: _ts.CompilerOptions;
|
|
28
|
-
}
|
|
29
|
-
declare type TsJestConfig$tsConfig = TsJestConfig$tsConfig$file | TsJestConfig$tsConfig$inline | undefined;
|
|
30
|
-
interface TsJestConfig$diagnostics {
|
|
31
|
-
pretty: boolean;
|
|
32
|
-
ignoreCodes: number[];
|
|
33
|
-
pathRegex?: string | undefined;
|
|
34
|
-
throws: boolean;
|
|
35
|
-
warnOnly?: boolean;
|
|
36
|
-
}
|
|
37
|
-
interface TsJestConfig$babelConfig$file {
|
|
38
|
-
kind: 'file';
|
|
39
|
-
value: string | undefined;
|
|
40
|
-
}
|
|
41
|
-
interface TsJestConfig$babelConfig$inline {
|
|
42
|
-
kind: 'inline';
|
|
43
|
-
value: BabelConfig;
|
|
44
|
-
}
|
|
45
|
-
declare type TsJestConfig$babelConfig = TsJestConfig$babelConfig$file | TsJestConfig$babelConfig$inline | undefined;
|
|
46
|
-
interface TsJestConfig$packageJson$file {
|
|
47
|
-
kind: 'file';
|
|
48
|
-
value: string | undefined;
|
|
49
|
-
}
|
|
50
|
-
interface TsJestConfig$packageJson$inline {
|
|
51
|
-
kind: 'inline';
|
|
52
|
-
value: any;
|
|
53
|
-
}
|
|
54
|
-
declare type TsJestConfig$packageJson = TsJestConfig$packageJson$file | TsJestConfig$packageJson$inline | undefined;
|
|
55
|
-
declare type TsJestConfig$stringifyContentPathRegex = string | undefined;
|
|
56
|
-
export interface TsJestConfig {
|
|
57
|
-
tsConfig: TsJestConfig$tsConfig;
|
|
58
|
-
packageJson: TsJestConfig$packageJson;
|
|
59
|
-
isolatedModules: boolean;
|
|
60
|
-
compiler: string;
|
|
61
|
-
diagnostics: TsJestConfig$diagnostics;
|
|
62
|
-
babelConfig: TsJestConfig$babelConfig;
|
|
63
|
-
transformers: string[];
|
|
64
|
-
stringifyContentPathRegex: TsJestConfig$stringifyContentPathRegex;
|
|
65
|
-
}
|
|
66
26
|
export interface TsCompiler {
|
|
67
27
|
program: _ts.Program | undefined;
|
|
68
28
|
}
|
|
69
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
@@ -14,25 +14,28 @@ exports.VersionCheckers = {
|
|
|
14
14
|
};
|
|
15
15
|
function checkVersion(name, expectedRange, action) {
|
|
16
16
|
if (action === void 0) { action = 'warn'; }
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
actualVersion
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
17
|
+
var success = true;
|
|
18
|
+
if (!('TS_JEST_DISABLE_VER_CHECKER' in process.env)) {
|
|
19
|
+
var version = get_package_version_1.getPackageVersion(name);
|
|
20
|
+
success = !!version && semver_1.satisfies(version, expectedRange);
|
|
21
|
+
logger.debug({
|
|
22
|
+
actualVersion: version,
|
|
23
|
+
expectedVersion: expectedRange,
|
|
24
|
+
}, 'checking version of %s: %s', name, success ? 'OK' : 'NOT OK');
|
|
25
|
+
if (!action || success)
|
|
26
|
+
return success;
|
|
27
|
+
var message = messages_1.interpolate(version ? "Version {{actualVersion}} of {{module}} installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version ({{expectedVersion}}). Please do not report issues in ts-jest if you are using unsupported versions." : "Module {{module}} is not installed. If you're experiencing issues, consider installing a supported version ({{expectedVersion}}).", {
|
|
28
|
+
module: name,
|
|
29
|
+
actualVersion: version || '??',
|
|
30
|
+
expectedVersion: rangeToHumanString(expectedRange),
|
|
31
|
+
});
|
|
32
|
+
if (action === 'warn') {
|
|
33
|
+
logger.warn(message);
|
|
34
|
+
}
|
|
35
|
+
else if (action === 'throw') {
|
|
36
|
+
logger.fatal(message);
|
|
37
|
+
throw new RangeError(message);
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
return success;
|
|
38
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-jest",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.2.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"bin": "cli.js",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"prebuild": "node scripts/clean-dist.js",
|
|
10
10
|
"build": "tsc -p tsconfig.build.json",
|
|
11
11
|
"postbuild": "node scripts/post-build.js",
|
|
12
|
-
"build:watch": "tsc -p tsconfig.build.json -w",
|
|
13
12
|
"clean": "node scripts/clean.js",
|
|
14
13
|
"pretest": "npm run lint",
|
|
15
14
|
"test": "run-s -s test:e2e \"test:unit -- {@}\" --",
|
|
@@ -57,6 +56,7 @@
|
|
|
57
56
|
},
|
|
58
57
|
"homepage": "https://kulshekhar.github.io/ts-jest",
|
|
59
58
|
"dependencies": {
|
|
59
|
+
"@types/jest": "26.x",
|
|
60
60
|
"bs-logger": "0.x",
|
|
61
61
|
"buffer-from": "1.x",
|
|
62
62
|
"fast-json-stable-stringify": "2.x",
|
|
@@ -88,7 +88,6 @@
|
|
|
88
88
|
"@types/buffer-from": "latest",
|
|
89
89
|
"@types/cross-spawn": "latest",
|
|
90
90
|
"@types/fs-extra": "latest",
|
|
91
|
-
"@types/jest": "26.x",
|
|
92
91
|
"@types/js-yaml": "latest",
|
|
93
92
|
"@types/json5": "latest",
|
|
94
93
|
"@types/lodash.memoize": "4.x",
|
|
@@ -130,6 +129,6 @@
|
|
|
130
129
|
]
|
|
131
130
|
},
|
|
132
131
|
"engines": {
|
|
133
|
-
"node": ">= 10
|
|
132
|
+
"node": ">= 10"
|
|
134
133
|
}
|
|
135
134
|
}
|
package/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../dist/util
|
|
1
|
+
export * from '../dist/util'
|
package/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('../dist/util
|
|
1
|
+
module.exports = require('../dist/util')
|
package/jest-base.js
DELETED
package/tsconfig.spec.json
DELETED