ts-jest 29.4.1 → 29.4.3
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
24f9edf45cda60954ee633a4b195ea486d624aeb
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [29.4.3](https://github.com/kulshekhar/ts-jest/compare/v29.4.2...v29.4.3) (2025-09-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* introduce `transpilation` option to replace `isolatedModules` option ([#5044](https://github.com/kulshekhar/ts-jest/issues/5044)) ([5868761](https://github.com/kulshekhar/ts-jest/commit/58687615142d89a559ada89d12029fe29bb981f2)), closes [#5013](https://github.com/kulshekhar/ts-jest/issues/5013) [#4859](https://github.com/kulshekhar/ts-jest/issues/4859)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [29.4.2](https://github.com/kulshekhar/ts-jest/compare/v29.4.1...v29.4.2) (2025-09-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Bug Fixes
|
|
14
|
+
|
|
15
|
+
* fix: node 14 compatibility ([aa0d563](https://github.com/kulshekhar/ts-jest/commit/aa0d563)), fixes [#5038](https://github.com/kulshekhar/ts-jest/issues/5038)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
## [29.4.1](https://github.com/kulshekhar/ts-jest/compare/v29.4.0...v29.4.1) (2025-08-03)
|
|
2
20
|
|
|
3
21
|
|
|
@@ -140,8 +140,8 @@ class TsCompiler {
|
|
|
140
140
|
getCompiledOutput(fileContent, fileName, options) {
|
|
141
141
|
const isEsmMode = this.configSet.useESM && options.supportsStaticESM;
|
|
142
142
|
this._compilerOptions = this.fixupCompilerOptionsForModuleKind(this._initialCompilerOptions, isEsmMode);
|
|
143
|
-
if (
|
|
144
|
-
this._logger.warn("Using hybrid module kind (Node16/18/Next) is only supported in \"
|
|
143
|
+
if ((0, transpile_module_1.isModernNodeModuleKind)(this._initialCompilerOptions.module) && !this.configSet.isolatedModules) {
|
|
144
|
+
this._logger.warn("Using hybrid module kind (Node16/18/Next) is only supported in \"transpilation: true\". Please set \"transpilation: true\" in for `ts-jest` config in your Jest config file, see https://kulshekhar.github.io/ts-jest/docs/getting-started/options/transpilation" /* Helps.UsingModernNodeResolution */);
|
|
145
145
|
}
|
|
146
146
|
const moduleKind = this._initialCompilerOptions.module;
|
|
147
147
|
const currentModuleKind = this._compilerOptions.module;
|
|
@@ -216,17 +216,9 @@ class ConfigSet {
|
|
|
216
216
|
this._matchTestFilePath = (0, jest_util_1.globsToMatcher)(this._matchablePatterns.filter((pattern) => typeof pattern === 'string'));
|
|
217
217
|
// isolatedModules
|
|
218
218
|
if (options.isolatedModules) {
|
|
219
|
-
this.
|
|
220
|
-
if (this.tsconfigFilePath) {
|
|
221
|
-
this.logger.warn((0, messages_1.interpolate)("\n The \"ts-jest\" config option \"isolatedModules\" is deprecated and will be removed in v30.0.0. Please use \"isolatedModules: true\" in {{tsconfigFilePath}} instead, see https://www.typescriptlang.org/tsconfig/#isolatedModules\n " /* Deprecations.IsolatedModulesWithTsconfigPath */, {
|
|
222
|
-
tsconfigFilePath: this.tsconfigFilePath,
|
|
223
|
-
}));
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
this.logger.warn("\n The \"ts-jest\" config option \"isolatedModules\" is deprecated and will be removed in v30.0.0. Please use \"isolatedModules: true\", see https://www.typescriptlang.org/tsconfig/#isolatedModules\n " /* Deprecations.IsolatedModulesWithoutTsconfigPath */);
|
|
227
|
-
}
|
|
219
|
+
this.logger.warn("\n The \"ts-jest\" config option \"isolatedModules\" is deprecated and will be removed in v30.0.0. Please use \"transpilation: true\" instead, see https://kulshekhar.github.io/ts-jest/docs/getting-started/options/transpilation\n " /* Deprecations.ReplaceIsolatedModulesWithTranspilation */);
|
|
228
220
|
}
|
|
229
|
-
this.isolatedModules =
|
|
221
|
+
this.isolatedModules = options.isolatedModules ?? options.transpilation ?? false;
|
|
230
222
|
this._resolveTsCacheDir();
|
|
231
223
|
}
|
|
232
224
|
/**
|
|
@@ -54,9 +54,11 @@ const shouldCheckProjectPkgJsonContent = (fileName, moduleKind) => {
|
|
|
54
54
|
* - Allow using custom AST transformers with the internal created {@link Program}
|
|
55
55
|
*/
|
|
56
56
|
const transpileWorker = (input, transpileOptions) => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
if (!barebonesLibSourceFile) {
|
|
58
|
+
barebonesLibSourceFile = typescript_1.default.createSourceFile(barebonesLibName, barebonesLibContent, {
|
|
59
|
+
languageVersion: typescript_1.default.ScriptTarget.Latest,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
60
62
|
const diagnostics = [];
|
|
61
63
|
const options = transpileOptions.compilerOptions
|
|
62
64
|
? // @ts-expect-error internal TypeScript API
|
package/dist/types.d.ts
CHANGED
|
@@ -39,13 +39,15 @@ export type TsJestGlobalOptions = Config.TransformerConfig[1] & {
|
|
|
39
39
|
*/
|
|
40
40
|
tsconfig?: boolean | string | RawCompilerOptions | TsConfigCompilerOptionsJson;
|
|
41
41
|
/**
|
|
42
|
-
* @deprecated use {@link
|
|
43
|
-
*
|
|
44
|
-
* Compiles files as isolated modules (disables some features)
|
|
45
|
-
*
|
|
46
|
-
* @default `undefined` (disables transpiling files with {@link _ts.transpileModule})
|
|
42
|
+
* @deprecated use {@link transpilation} instead
|
|
47
43
|
*/
|
|
48
44
|
isolatedModules?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Compiles files using {@link _ts.transpileModule})
|
|
47
|
+
*
|
|
48
|
+
* @default `undefined` (disables)
|
|
49
|
+
*/
|
|
50
|
+
transpilation?: boolean;
|
|
49
51
|
/**
|
|
50
52
|
* Compiler to use
|
|
51
53
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-jest",
|
|
3
|
-
"version": "29.4.
|
|
3
|
+
"version": "29.4.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -93,31 +93,31 @@
|
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@commitlint/cli": "^19.8.1",
|
|
95
95
|
"@commitlint/config-angular": "^19.8.1",
|
|
96
|
-
"@eslint/compat": "^1.3.
|
|
96
|
+
"@eslint/compat": "^1.3.2",
|
|
97
97
|
"@eslint/eslintrc": "^3.3.1",
|
|
98
|
-
"@eslint/js": "^9.
|
|
99
|
-
"@jest/globals": "^30.
|
|
100
|
-
"@jest/transform": "^30.
|
|
98
|
+
"@eslint/js": "^9.35.0",
|
|
99
|
+
"@jest/globals": "^30.1.2",
|
|
100
|
+
"@jest/transform": "^30.1.2",
|
|
101
101
|
"@jest/types": "^30.0.5",
|
|
102
102
|
"@types/babel__core": "^7.20.5",
|
|
103
103
|
"@types/fs-extra": "^11.0.4",
|
|
104
|
-
"@types/handlebars": "^4.1.0",
|
|
105
104
|
"@types/jest": "^29.5.14",
|
|
106
105
|
"@types/js-yaml": "^4.0.9",
|
|
107
106
|
"@types/lodash.camelcase": "^4.3.9",
|
|
108
107
|
"@types/lodash.memoize": "^4.1.9",
|
|
109
108
|
"@types/lodash.set": "^4.3.9",
|
|
110
109
|
"@types/micromatch": "^4.0.9",
|
|
111
|
-
"@types/node": "20.19.
|
|
112
|
-
"@types/semver": "^7.7.
|
|
110
|
+
"@types/node": "20.19.16",
|
|
111
|
+
"@types/semver": "^7.7.1",
|
|
113
112
|
"@types/yargs": "^17.0.33",
|
|
114
113
|
"@types/yargs-parser": "21.0.3",
|
|
115
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
116
|
-
"@typescript-eslint/parser": "^8.
|
|
117
|
-
"babel-jest": "^30.
|
|
114
|
+
"@typescript-eslint/eslint-plugin": "^8.44.0",
|
|
115
|
+
"@typescript-eslint/parser": "^8.44.0",
|
|
116
|
+
"babel-jest": "^30.1.2",
|
|
117
|
+
"conventional-changelog-angular": "^8.0.0",
|
|
118
118
|
"conventional-changelog-cli": "^5.0.0",
|
|
119
|
-
"esbuild": "~0.25.
|
|
120
|
-
"eslint": "^9.
|
|
119
|
+
"esbuild": "~0.25.10",
|
|
120
|
+
"eslint": "^9.35.0",
|
|
121
121
|
"eslint-config-prettier": "^10.1.8",
|
|
122
122
|
"eslint-plugin-import": "^2.32.0",
|
|
123
123
|
"eslint-plugin-jest": "^28.14.0",
|
|
@@ -125,18 +125,18 @@
|
|
|
125
125
|
"eslint-plugin-prettier": "^4.2.5",
|
|
126
126
|
"execa": "5.1.1",
|
|
127
127
|
"fast-glob": "^3.3.3",
|
|
128
|
-
"fs-extra": "^11.3.
|
|
129
|
-
"globals": "^16.
|
|
128
|
+
"fs-extra": "^11.3.2",
|
|
129
|
+
"globals": "^16.4.0",
|
|
130
130
|
"husky": "^9.1.7",
|
|
131
|
-
"jest": "^30.
|
|
131
|
+
"jest": "^30.1.3",
|
|
132
132
|
"js-yaml": "^4.1.0",
|
|
133
133
|
"lint-staged": "^15.5.2",
|
|
134
|
-
"memfs": "^4.
|
|
134
|
+
"memfs": "^4.42.0",
|
|
135
135
|
"prettier": "^2.8.8",
|
|
136
136
|
"rimraf": "^5.0.10",
|
|
137
137
|
"ts-node": "^10.9.2",
|
|
138
|
-
"typescript": "~5.
|
|
139
|
-
"typescript-eslint": "^8.
|
|
138
|
+
"typescript": "~5.9.2",
|
|
139
|
+
"typescript-eslint": "^8.44.0"
|
|
140
140
|
},
|
|
141
141
|
"engines": {
|
|
142
142
|
"node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0"
|