ts-jest 28.0.2 → 28.0.5
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 +37 -1
- package/README.md +1 -1
- package/dist/legacy/compiler/ts-compiler.d.ts +2 -2
- package/dist/legacy/compiler/ts-compiler.js +37 -29
- package/dist/legacy/compiler/ts-jest-compiler.d.ts +2 -3
- package/dist/legacy/config/config-set.js +2 -2
- package/dist/legacy/ts-jest-transformer.js +18 -10
- package/dist/types.d.ts +4 -1
- package/globals.d.ts +18 -0
- package/package.json +20 -24
- package/renovate.json +65 -0
package/.ts-jest-digest
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
60d8111ee0c613e292a844a081abf56c285c9036
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## [28.0.5](https://github.com/kulshekhar/ts-jest/compare/v28.0.4...v28.0.5) (2022-06-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **legacy:** throw type check error in ESM mode with `reject` ([#3618](https://github.com/kulshekhar/ts-jest/issues/3618)) ([7dd01ff](https://github.com/kulshekhar/ts-jest/commit/7dd01ffe0c7ad3add87b11227964544f2586355a)), closes [#3507](https://github.com/kulshekhar/ts-jest/issues/3507)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [28.0.4](https://github.com/kulshekhar/ts-jest/compare/v28.0.3...v28.0.4) (2022-06-02)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* remove `@types/jest` from peer deps ([#3592](https://github.com/kulshekhar/ts-jest/issues/3592)) ([b66b656](https://github.com/kulshekhar/ts-jest/commit/b66b656e0f29eea9234a4d1e883c6d249437f03c))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [28.0.3](https://github.com/kulshekhar/ts-jest/compare/v28.0.2...v28.0.3) (2022-05-23)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **security:** update version of `json5` ([#3528](https://github.com/kulshekhar/ts-jest/issues/3528)) ([b31f5ba](https://github.com/kulshekhar/ts-jest/commit/b31f5bab142466fd8b6157ec03eff7316584e51d))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
1
28
|
## [28.0.2](https://github.com/kulshekhar/ts-jest/compare/v28.0.1...v28.0.2) (2022-05-07)
|
|
2
29
|
|
|
3
30
|
|
|
@@ -51,6 +78,15 @@
|
|
|
51
78
|
|
|
52
79
|
|
|
53
80
|
|
|
81
|
+
## [27.1.5](https://github.com/kulshekhar/ts-jest/compare/v27.1.3...v27.1.4) (2022-05-17)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Bug Fixes
|
|
85
|
+
|
|
86
|
+
* **transformers** use `Array.sort` in hoisting transformer ([#3498](https://github.com/kulshekhar/ts-jest/pull/3498)) ([e400a6e](https://github.com/kulshekhar/ts-jest/commit/e400a6ec0e4706f606ae9b1e2897b0bb1cff6343)), fixes [#3476](https://github.com/kulshekhar/ts-jest/issues/3476)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
54
90
|
## [27.1.4](https://github.com/kulshekhar/ts-jest/compare/v27.1.3...v27.1.4) (2022-03-24)
|
|
55
91
|
|
|
56
92
|
|
|
@@ -834,7 +870,7 @@ import { mocked, createJestPreset, pathsToModuleNameMapper` } from 'ts-jest/util
|
|
|
834
870
|
### BREAKING CHANGES
|
|
835
871
|
|
|
836
872
|
* Requires a minimum of TypeScript v3.8
|
|
837
|
-
* Drop support for Node 8
|
|
873
|
+
* Drop support for Node 8
|
|
838
874
|
|
|
839
875
|
|
|
840
876
|
<a name="25.5.1"></a>
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ These instructions will get you setup to use `ts-jest` in your project. For more
|
|
|
39
39
|
| **Prerequisites** | `npm i -D jest typescript` | `yarn add --dev jest typescript` |
|
|
40
40
|
| **Installing** | `npm i -D ts-jest @types/jest` | `yarn add --dev ts-jest @types/jest` |
|
|
41
41
|
| **Creating config** | `npx ts-jest config:init` | `yarn ts-jest config:init` |
|
|
42
|
-
| **Running tests** | `npm
|
|
42
|
+
| **Running tests** | `npm test` or `npx jest` | `yarn test` or `yarn jest` |
|
|
43
43
|
|
|
44
44
|
## Built With
|
|
45
45
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { TransformedSource } from '@jest/transform';
|
|
2
1
|
import { Logger } from 'bs-logger';
|
|
3
2
|
import type { CompilerOptions, CustomTransformers, Program, TranspileOutput } from 'typescript';
|
|
4
3
|
import type { StringMap, TsCompilerInstance, TsJestAstTransformer, TsJestCompileOptions, TTypeScript } from '../../types';
|
|
4
|
+
import { CompiledOutput } from '../../types';
|
|
5
5
|
import type { ConfigSet } from '../config/config-set';
|
|
6
6
|
export declare class TsCompiler implements TsCompilerInstance {
|
|
7
7
|
readonly configSet: ConfigSet;
|
|
@@ -15,7 +15,7 @@ export declare class TsCompiler implements TsCompilerInstance {
|
|
|
15
15
|
program: Program | undefined;
|
|
16
16
|
constructor(configSet: ConfigSet, runtimeCacheFS: StringMap);
|
|
17
17
|
getResolvedModules(fileContent: string, fileName: string, runtimeCacheFS: StringMap): string[];
|
|
18
|
-
getCompiledOutput(fileContent: string, fileName: string, options: TsJestCompileOptions):
|
|
18
|
+
getCompiledOutput(fileContent: string, fileName: string, options: TsJestCompileOptions): CompiledOutput;
|
|
19
19
|
protected _transpileOutput(fileContent: string, fileName: string): TranspileOutput;
|
|
20
20
|
protected _makeTransformers(customTransformers: TsJestAstTransformer): CustomTransformers;
|
|
21
21
|
}
|
|
@@ -107,10 +107,12 @@ var TsCompiler = (function () {
|
|
|
107
107
|
return importedModulePaths;
|
|
108
108
|
};
|
|
109
109
|
TsCompiler.prototype.getCompiledOutput = function (fileContent, fileName, options) {
|
|
110
|
+
var e_1, _a;
|
|
110
111
|
var moduleKind = this._initialCompilerOptions.module;
|
|
111
112
|
var esModuleInterop = this._initialCompilerOptions.esModuleInterop;
|
|
112
113
|
var allowSyntheticDefaultImports = this._initialCompilerOptions.allowSyntheticDefaultImports;
|
|
113
114
|
var currentModuleKind = this._compilerOptions.module;
|
|
115
|
+
var isEsmMode = this.configSet.useESM && options.supportsStaticESM;
|
|
114
116
|
if ((this.configSet.babelJestTransformer || (!this.configSet.babelJestTransformer && options.supportsStaticESM)) &&
|
|
115
117
|
this.configSet.useESM) {
|
|
116
118
|
moduleKind =
|
|
@@ -130,7 +132,33 @@ var TsCompiler = (function () {
|
|
|
130
132
|
this._logger.debug({ fileName: fileName }, 'getCompiledOutput(): compiling using language service');
|
|
131
133
|
this._updateMemoryCache(fileContent, fileName, currentModuleKind === moduleKind);
|
|
132
134
|
var output = this._languageService.getEmitOutput(fileName);
|
|
133
|
-
this.
|
|
135
|
+
var diagnostics = this.getDiagnostics(fileName);
|
|
136
|
+
if (!isEsmMode && diagnostics.length) {
|
|
137
|
+
this.configSet.raiseDiagnostics(diagnostics, fileName, this._logger);
|
|
138
|
+
if (options.watchMode) {
|
|
139
|
+
this._logger.debug({ fileName: fileName }, '_doTypeChecking(): starting watch mode computing diagnostics');
|
|
140
|
+
try {
|
|
141
|
+
for (var _b = __values(options.depGraphs.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
142
|
+
var entry = _c.value;
|
|
143
|
+
var normalizedModuleNames = entry[1].resolvedModuleNames.map(function (moduleName) { return (0, path_1.normalize)(moduleName); });
|
|
144
|
+
var fileToReTypeCheck = entry[0];
|
|
145
|
+
if (normalizedModuleNames.includes(fileName) && this.configSet.shouldReportDiagnostics(fileToReTypeCheck)) {
|
|
146
|
+
this._logger.debug({ fileToReTypeCheck: fileToReTypeCheck }, '_doTypeChecking(): computing diagnostics using language service');
|
|
147
|
+
this._updateMemoryCache(this._getFileContentFromCache(fileToReTypeCheck), fileToReTypeCheck);
|
|
148
|
+
var importedModulesDiagnostics = __spreadArray(__spreadArray([], __read(this._languageService.getSemanticDiagnostics(fileToReTypeCheck)), false), __read(this._languageService.getSyntacticDiagnostics(fileToReTypeCheck)), false);
|
|
149
|
+
this.configSet.raiseDiagnostics(importedModulesDiagnostics, fileName, this._logger);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
154
|
+
finally {
|
|
155
|
+
try {
|
|
156
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
157
|
+
}
|
|
158
|
+
finally { if (e_1) throw e_1.error; }
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
134
162
|
if (output.emitSkipped) {
|
|
135
163
|
if (constants_1.TS_TSX_REGEX.test(fileName)) {
|
|
136
164
|
throw new Error((0, messages_1.interpolate)("Unable to process '{{file}}', please make sure that `outDir` in your tsconfig is neither `''` or `'.'`. You can also configure Jest config option `transformIgnorePatterns` to inform `ts-jest` to transform {{file}}", { file: fileName }));
|
|
@@ -151,9 +179,11 @@ var TsCompiler = (function () {
|
|
|
151
179
|
return this._compilerOptions.sourceMap
|
|
152
180
|
? {
|
|
153
181
|
code: (0, compiler_utils_1.updateOutput)(outputFiles[1].text, fileName, outputFiles[0].text),
|
|
182
|
+
diagnostics: diagnostics,
|
|
154
183
|
}
|
|
155
184
|
: {
|
|
156
185
|
code: (0, compiler_utils_1.updateOutput)(outputFiles[0].text, fileName),
|
|
186
|
+
diagnostics: diagnostics,
|
|
157
187
|
};
|
|
158
188
|
}
|
|
159
189
|
else {
|
|
@@ -191,6 +221,7 @@ var TsCompiler = (function () {
|
|
|
191
221
|
};
|
|
192
222
|
TsCompiler.prototype._createLanguageService = function () {
|
|
193
223
|
var _this = this;
|
|
224
|
+
var _a;
|
|
194
225
|
this._parsedTsConfig.fileNames
|
|
195
226
|
.filter(function (fileName) { return constants_1.TS_TSX_REGEX.test(fileName) && !_this.configSet.isTestFile(fileName); })
|
|
196
227
|
.forEach(function (fileName) { return _this._fileVersionCache.set(fileName, 0); });
|
|
@@ -220,7 +251,7 @@ var TsCompiler = (function () {
|
|
|
220
251
|
return _this._ts.ScriptSnapshot.fromString(contents);
|
|
221
252
|
},
|
|
222
253
|
fileExists: (0, lodash_memoize_1.default)(this._ts.sys.fileExists),
|
|
223
|
-
readFile: this._cachedReadFile,
|
|
254
|
+
readFile: (_a = this._cachedReadFile) !== null && _a !== void 0 ? _a : this._ts.sys.readFile,
|
|
224
255
|
readDirectory: (0, lodash_memoize_1.default)(this._ts.sys.readDirectory),
|
|
225
256
|
getDirectories: (0, lodash_memoize_1.default)(this._ts.sys.getDirectories),
|
|
226
257
|
directoryExists: (0, lodash_memoize_1.default)(this._ts.sys.directoryExists),
|
|
@@ -290,36 +321,13 @@ var TsCompiler = (function () {
|
|
|
290
321
|
if (shouldIncrementProjectVersion)
|
|
291
322
|
this._projectVersion++;
|
|
292
323
|
};
|
|
293
|
-
TsCompiler.prototype.
|
|
294
|
-
var
|
|
324
|
+
TsCompiler.prototype.getDiagnostics = function (fileName) {
|
|
325
|
+
var diagnostics = [];
|
|
295
326
|
if (this.configSet.shouldReportDiagnostics(fileName)) {
|
|
296
327
|
this._logger.debug({ fileName: fileName }, '_doTypeChecking(): computing diagnostics using language service');
|
|
297
|
-
|
|
298
|
-
this.configSet.raiseDiagnostics(diagnostics, fileName, this._logger);
|
|
299
|
-
}
|
|
300
|
-
if (watchMode) {
|
|
301
|
-
this._logger.debug({ fileName: fileName }, '_doTypeChecking(): starting watch mode computing diagnostics');
|
|
302
|
-
try {
|
|
303
|
-
for (var _b = __values(depGraphs.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
304
|
-
var entry = _c.value;
|
|
305
|
-
var normalizedModuleNames = entry[1].resolvedModuleNames.map(function (moduleName) { return (0, path_1.normalize)(moduleName); });
|
|
306
|
-
var fileToReTypeCheck = entry[0];
|
|
307
|
-
if (normalizedModuleNames.includes(fileName) && this.configSet.shouldReportDiagnostics(fileToReTypeCheck)) {
|
|
308
|
-
this._logger.debug({ fileToReTypeCheck: fileToReTypeCheck }, '_doTypeChecking(): computing diagnostics using language service');
|
|
309
|
-
this._updateMemoryCache(this._getFileContentFromCache(fileToReTypeCheck), fileToReTypeCheck);
|
|
310
|
-
var importedModulesDiagnostics = __spreadArray(__spreadArray([], __read(this._languageService.getSemanticDiagnostics(fileToReTypeCheck)), false), __read(this._languageService.getSyntacticDiagnostics(fileToReTypeCheck)), false);
|
|
311
|
-
this.configSet.raiseDiagnostics(importedModulesDiagnostics, fileName, this._logger);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
316
|
-
finally {
|
|
317
|
-
try {
|
|
318
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
319
|
-
}
|
|
320
|
-
finally { if (e_1) throw e_1.error; }
|
|
321
|
-
}
|
|
328
|
+
diagnostics.push.apply(diagnostics, __spreadArray(__spreadArray([], __read(this._languageService.getSemanticDiagnostics(fileName)), false), __read(this._languageService.getSyntacticDiagnostics(fileName)), false));
|
|
322
329
|
}
|
|
330
|
+
return diagnostics;
|
|
323
331
|
};
|
|
324
332
|
return TsCompiler;
|
|
325
333
|
}());
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CompilerInstance, StringMap, TsJestCompileOptions } from '../../types';
|
|
1
|
+
import type { CompilerInstance, CompiledOutput, StringMap, TsJestCompileOptions } from '../../types';
|
|
3
2
|
import type { ConfigSet } from '../config/config-set';
|
|
4
3
|
export declare class TsJestCompiler implements CompilerInstance {
|
|
5
4
|
private readonly _compilerInstance;
|
|
6
5
|
constructor(configSet: ConfigSet, runtimeCacheFS: StringMap);
|
|
7
6
|
getResolvedModules(fileContent: string, fileName: string, runtimeCacheFS: StringMap): string[];
|
|
8
|
-
getCompiledOutput(fileContent: string, fileName: string, options: TsJestCompileOptions):
|
|
7
|
+
getCompiledOutput(fileContent: string, fileName: string, options: TsJestCompileOptions): CompiledOutput;
|
|
9
8
|
}
|
|
@@ -457,7 +457,7 @@ var ConfigSet = (function () {
|
|
|
457
457
|
});
|
|
458
458
|
if (!filteredDiagnostics.length)
|
|
459
459
|
return;
|
|
460
|
-
var error = this.
|
|
460
|
+
var error = this.createTsError(filteredDiagnostics);
|
|
461
461
|
var importantCategories = [DiagnosticCategory.Warning, DiagnosticCategory.Error];
|
|
462
462
|
if (this._diagnostics.throws && filteredDiagnostics.some(function (d) { return importantCategories.includes(d.category); })) {
|
|
463
463
|
throw error;
|
|
@@ -470,7 +470,7 @@ var ConfigSet = (function () {
|
|
|
470
470
|
? this.parsedTsConfig.options.checkJs && !this._shouldIgnoreDiagnosticsForFile(filePath)
|
|
471
471
|
: !this._shouldIgnoreDiagnosticsForFile(filePath);
|
|
472
472
|
};
|
|
473
|
-
ConfigSet.prototype.
|
|
473
|
+
ConfigSet.prototype.createTsError = function (diagnostics) {
|
|
474
474
|
var _this = this;
|
|
475
475
|
var formatDiagnostics = this._diagnostics.pretty
|
|
476
476
|
? this.compilerModule.formatDiagnosticsWithColorAndContext
|
|
@@ -157,7 +157,9 @@ var TsJestTransformer = (function () {
|
|
|
157
157
|
var configs = this._configsFor(transformOptions);
|
|
158
158
|
var shouldStringifyContent = configs.shouldStringifyContent(sourcePath);
|
|
159
159
|
var babelJest = shouldStringifyContent ? undefined : configs.babelJestTransformer;
|
|
160
|
-
var result =
|
|
160
|
+
var result = {
|
|
161
|
+
code: this.processWithTs(sourceText, sourcePath, transformOptions).code,
|
|
162
|
+
};
|
|
161
163
|
if (babelJest) {
|
|
162
164
|
this._logger.debug({ fileName: sourcePath }, 'calling babel-jest processor');
|
|
163
165
|
result = babelJest.process(result.code, sourcePath, __assign(__assign({}, transformOptions), { instrument: false }));
|
|
@@ -170,21 +172,28 @@ var TsJestTransformer = (function () {
|
|
|
170
172
|
var _this = this;
|
|
171
173
|
return __generator(this, function (_a) {
|
|
172
174
|
this._logger.debug({ fileName: sourcePath, transformOptions: transformOptions }, 'processing', sourcePath);
|
|
173
|
-
return [2, new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
174
|
-
var configs, shouldStringifyContent, babelJest, result;
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
return [2, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
176
|
+
var configs, shouldStringifyContent, babelJest, result, processWithTsResult;
|
|
177
|
+
var _a;
|
|
178
|
+
return __generator(this, function (_b) {
|
|
179
|
+
switch (_b.label) {
|
|
177
180
|
case 0:
|
|
178
181
|
configs = this._configsFor(transformOptions);
|
|
179
182
|
shouldStringifyContent = configs.shouldStringifyContent(sourcePath);
|
|
180
183
|
babelJest = shouldStringifyContent ? undefined : configs.babelJestTransformer;
|
|
181
|
-
|
|
184
|
+
processWithTsResult = this.processWithTs(sourceText, sourcePath, transformOptions);
|
|
185
|
+
result = {
|
|
186
|
+
code: processWithTsResult.code,
|
|
187
|
+
};
|
|
188
|
+
if ((_a = processWithTsResult.diagnostics) === null || _a === void 0 ? void 0 : _a.length) {
|
|
189
|
+
reject(configs.createTsError(processWithTsResult.diagnostics));
|
|
190
|
+
}
|
|
182
191
|
if (!babelJest) return [3, 2];
|
|
183
192
|
this._logger.debug({ fileName: sourcePath }, 'calling babel-jest processor');
|
|
184
193
|
return [4, babelJest.processAsync(result.code, sourcePath, __assign(__assign({}, transformOptions), { instrument: false }))];
|
|
185
194
|
case 1:
|
|
186
|
-
result =
|
|
187
|
-
|
|
195
|
+
result = _b.sent();
|
|
196
|
+
_b.label = 2;
|
|
188
197
|
case 2:
|
|
189
198
|
result = this.runTsJestHook(sourcePath, sourceText, transformOptions, result);
|
|
190
199
|
resolve(result);
|
|
@@ -292,9 +301,8 @@ var TsJestTransformer = (function () {
|
|
|
292
301
|
};
|
|
293
302
|
TsJestTransformer.prototype.getCacheKeyAsync = function (sourceText, sourcePath, transformOptions) {
|
|
294
303
|
return __awaiter(this, void 0, void 0, function () {
|
|
295
|
-
var _this = this;
|
|
296
304
|
return __generator(this, function (_a) {
|
|
297
|
-
return [2,
|
|
305
|
+
return [2, Promise.resolve(this.getCacheKey(sourceText, sourcePath, transformOptions))];
|
|
298
306
|
});
|
|
299
307
|
});
|
|
300
308
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -79,9 +79,12 @@ export interface TsJestCompileOptions {
|
|
|
79
79
|
watchMode: boolean;
|
|
80
80
|
supportsStaticESM: boolean;
|
|
81
81
|
}
|
|
82
|
+
export interface CompiledOutput extends TransformedSource {
|
|
83
|
+
diagnostics?: _ts.Diagnostic[];
|
|
84
|
+
}
|
|
82
85
|
export interface CompilerInstance {
|
|
83
86
|
getResolvedModules(fileContent: string, fileName: string, runtimeCacheFS: StringMap): string[];
|
|
84
|
-
getCompiledOutput(fileContent: string, fileName: string, options: TsJestCompileOptions):
|
|
87
|
+
getCompiledOutput(fileContent: string, fileName: string, options: TsJestCompileOptions): CompiledOutput;
|
|
85
88
|
}
|
|
86
89
|
export interface TsCompilerInstance extends CompilerInstance {
|
|
87
90
|
configSet: ConfigSet;
|
package/globals.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
const beforeAll: typeof import('@jest/globals').beforeAll
|
|
3
|
+
const beforeEach: typeof import('@jest/globals').beforeEach
|
|
4
|
+
const afterAll: typeof import('@jest/globals').afterAll
|
|
5
|
+
const afterEach: typeof import('@jest/globals').afterEach
|
|
6
|
+
const describe: typeof import('@jest/globals').describe
|
|
7
|
+
const fdescribe: typeof import('@jest/globals').fdescribe
|
|
8
|
+
const xdescribe: typeof import('@jest/globals').xdescribe
|
|
9
|
+
const it: typeof import('@jest/globals').it
|
|
10
|
+
const fit: typeof import('@jest/globals').fit
|
|
11
|
+
const xit: typeof import('@jest/globals').xit
|
|
12
|
+
const test: typeof import('@jest/globals').test
|
|
13
|
+
const xtest: typeof import('@jest/globals').xtest
|
|
14
|
+
const expect: typeof import('@jest/globals').expect
|
|
15
|
+
const jest: typeof import('@jest/globals').jest
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-jest",
|
|
3
|
-
"version": "28.0.
|
|
3
|
+
"version": "28.0.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -54,15 +54,14 @@
|
|
|
54
54
|
"bs-logger": "0.x",
|
|
55
55
|
"fast-json-stable-stringify": "2.x",
|
|
56
56
|
"jest-util": "^28.0.0",
|
|
57
|
-
"json5": "2.
|
|
57
|
+
"json5": "^2.2.1",
|
|
58
58
|
"lodash.memoize": "4.x",
|
|
59
59
|
"make-error": "1.x",
|
|
60
60
|
"semver": "7.x",
|
|
61
|
-
"yargs-parser": "^
|
|
61
|
+
"yargs-parser": "^21.0.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@babel/core": ">=7.0.0-beta.0 <8",
|
|
65
|
-
"@types/jest": "^27.0.0",
|
|
66
65
|
"babel-jest": "^28.0.0",
|
|
67
66
|
"jest": "^28.0.0",
|
|
68
67
|
"typescript": ">=4.3"
|
|
@@ -71,9 +70,6 @@
|
|
|
71
70
|
"@babel/core": {
|
|
72
71
|
"optional": true
|
|
73
72
|
},
|
|
74
|
-
"@types/jest": {
|
|
75
|
-
"optional": true
|
|
76
|
-
},
|
|
77
73
|
"babel-jest": {
|
|
78
74
|
"optional": true
|
|
79
75
|
},
|
|
@@ -89,32 +85,32 @@
|
|
|
89
85
|
}
|
|
90
86
|
},
|
|
91
87
|
"devDependencies": {
|
|
92
|
-
"@commitlint/cli": "
|
|
93
|
-
"@commitlint/config-angular": "^
|
|
94
|
-
"@jest/transform": "^28.
|
|
95
|
-
"@jest/types": "^28.
|
|
88
|
+
"@commitlint/cli": "17.x",
|
|
89
|
+
"@commitlint/config-angular": "^17.0.0",
|
|
90
|
+
"@jest/transform": "^28.1.1",
|
|
91
|
+
"@jest/types": "^28.1.1",
|
|
96
92
|
"@types/babel__core": "7.x",
|
|
97
93
|
"@types/cross-spawn": "latest",
|
|
98
94
|
"@types/fs-extra": "latest",
|
|
99
|
-
"@types/jest": "^27.0.3",
|
|
100
95
|
"@types/js-yaml": "latest",
|
|
101
96
|
"@types/lodash.camelcase": "4.x",
|
|
102
97
|
"@types/lodash.memoize": "4.x",
|
|
103
98
|
"@types/lodash.set": "4.x",
|
|
104
99
|
"@types/micromatch": "4.x",
|
|
105
|
-
"@types/node": "17.0.
|
|
100
|
+
"@types/node": "17.0.35",
|
|
106
101
|
"@types/node-fetch": "^3.0.3",
|
|
107
102
|
"@types/react": "18.x",
|
|
108
103
|
"@types/rimraf": "^3.0.2",
|
|
109
104
|
"@types/semver": "latest",
|
|
110
105
|
"@types/yargs": "latest",
|
|
111
|
-
"@types/yargs-parser": "
|
|
112
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
113
|
-
"@typescript-eslint/parser": "^5.
|
|
106
|
+
"@types/yargs-parser": "21.x",
|
|
107
|
+
"@typescript-eslint/eslint-plugin": "^5.27.1",
|
|
108
|
+
"@typescript-eslint/parser": "^5.27.1",
|
|
109
|
+
"babel-jest": "^28.1.1",
|
|
114
110
|
"conventional-changelog-cli": "2.x",
|
|
115
111
|
"cross-spawn": "latest",
|
|
116
|
-
"esbuild": "~0.14.
|
|
117
|
-
"eslint": "^8.
|
|
112
|
+
"esbuild": "~0.14.43",
|
|
113
|
+
"eslint": "^8.17.0",
|
|
118
114
|
"eslint-config-prettier": "latest",
|
|
119
115
|
"eslint-plugin-import": "latest",
|
|
120
116
|
"eslint-plugin-jest": "latest",
|
|
@@ -123,19 +119,19 @@
|
|
|
123
119
|
"eslint-plugin-prettier": "latest",
|
|
124
120
|
"execa": "5.1.1",
|
|
125
121
|
"fs-extra": "10.x",
|
|
126
|
-
"glob": "^8.0.
|
|
122
|
+
"glob": "^8.0.3",
|
|
127
123
|
"glob-gitignore": "latest",
|
|
128
124
|
"husky": "4.x",
|
|
129
|
-
"jest": "^28.
|
|
125
|
+
"jest": "^28.1.1",
|
|
130
126
|
"jest-snapshot-serializer-raw": "^1.2.0",
|
|
131
127
|
"js-yaml": "latest",
|
|
132
|
-
"json-schema-to-typescript": "^10.1.
|
|
128
|
+
"json-schema-to-typescript": "^10.1.5",
|
|
133
129
|
"lint-staged": "latest",
|
|
134
130
|
"lodash.camelcase": "^4.3.0",
|
|
135
131
|
"lodash.set": "^4.3.2",
|
|
136
|
-
"node-fetch": "^3.
|
|
137
|
-
"prettier": "^2.
|
|
138
|
-
"typescript": "~4.
|
|
132
|
+
"node-fetch": "^3.2.6",
|
|
133
|
+
"prettier": "^2.6.2",
|
|
134
|
+
"typescript": "~4.7.3"
|
|
139
135
|
},
|
|
140
136
|
"lint-staged": {
|
|
141
137
|
"*.{ts,tsx,js,jsx}": [
|
package/renovate.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"group:babelMonorepo",
|
|
4
|
+
"group:commitlintMonorepo",
|
|
5
|
+
"group:docusaurusMonorepo",
|
|
6
|
+
":prHourlyLimit2",
|
|
7
|
+
"workarounds:all",
|
|
8
|
+
"helpers:pinGitHubActionDigests"
|
|
9
|
+
],
|
|
10
|
+
"timezone": "UTC",
|
|
11
|
+
"rangeStrategy": "bump",
|
|
12
|
+
"separateMajorMinor": true,
|
|
13
|
+
"prConcurrentLimit": 2,
|
|
14
|
+
"semanticCommits": "enabled",
|
|
15
|
+
"commitMessagePrefix": "build(deps):",
|
|
16
|
+
"ignorePaths": ["examples/react-app"],
|
|
17
|
+
"ignoreDeps": [
|
|
18
|
+
"@mdx-js/react",
|
|
19
|
+
"@types/react",
|
|
20
|
+
"execa",
|
|
21
|
+
"chalk",
|
|
22
|
+
"husky"
|
|
23
|
+
],
|
|
24
|
+
"packageRules": [
|
|
25
|
+
{
|
|
26
|
+
"matchPaths": ["examples/**"],
|
|
27
|
+
"matchUpdateTypes": ["major"],
|
|
28
|
+
"enabled": false
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"matchPaths": ["examples/react-app"],
|
|
32
|
+
"enabled": false
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"matchPaths": ["package.json"],
|
|
36
|
+
"matchPackagePatterns": ["jest"],
|
|
37
|
+
"excludePackageNames": ["eslint-plugin-jest"],
|
|
38
|
+
"matchUpdateTypes": ["patch", "minor"],
|
|
39
|
+
"groupName": "Jest packages"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"extends": ["packages:eslint"],
|
|
43
|
+
"groupName": "ESLint packages"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"matchPackagePrefixes": ["esbuild"],
|
|
47
|
+
"groupName": "Esbuild packages"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"matchFiles": ["package.json"],
|
|
51
|
+
"matchDepTypes": ["dependencies", "optionalDependencies"],
|
|
52
|
+
"rangeStrategy": "in-range-only"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"matchPaths": ["e2e/**"],
|
|
56
|
+
"matchPackagePatterns": ["react"],
|
|
57
|
+
"groupName": "React e2e packages",
|
|
58
|
+
"enabled": true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"matchDepTypes": ["peerDependencies"],
|
|
62
|
+
"enabled": false
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|