ts-jest 29.4.2 → 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 +1 -1
- package/CHANGELOG.md +9 -0
- package/dist/legacy/compiler/ts-compiler.js +2 -2
- package/dist/legacy/config/config-set.js +2 -10
- package/dist/types.d.ts +7 -5
- package/package.json +12 -12
package/.ts-jest-digest
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
24f9edf45cda60954ee633a4b195ea486d624aeb
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
## [29.4.2](https://github.com/kulshekhar/ts-jest/compare/v29.4.1...v29.4.2) (2025-09-15)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -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
|
/**
|
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",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"@eslint/compat": "^1.3.2",
|
|
97
97
|
"@eslint/eslintrc": "^3.3.1",
|
|
98
98
|
"@eslint/js": "^9.35.0",
|
|
99
|
-
"@jest/globals": "^30.
|
|
100
|
-
"@jest/transform": "^30.
|
|
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",
|
|
@@ -107,16 +107,16 @@
|
|
|
107
107
|
"@types/lodash.memoize": "^4.1.9",
|
|
108
108
|
"@types/lodash.set": "^4.3.9",
|
|
109
109
|
"@types/micromatch": "^4.0.9",
|
|
110
|
-
"@types/node": "20.19.
|
|
110
|
+
"@types/node": "20.19.16",
|
|
111
111
|
"@types/semver": "^7.7.1",
|
|
112
112
|
"@types/yargs": "^17.0.33",
|
|
113
113
|
"@types/yargs-parser": "21.0.3",
|
|
114
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
115
|
-
"@typescript-eslint/parser": "^8.
|
|
116
|
-
"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
117
|
"conventional-changelog-angular": "^8.0.0",
|
|
118
118
|
"conventional-changelog-cli": "^5.0.0",
|
|
119
|
-
"esbuild": "~0.25.
|
|
119
|
+
"esbuild": "~0.25.10",
|
|
120
120
|
"eslint": "^9.35.0",
|
|
121
121
|
"eslint-config-prettier": "^10.1.8",
|
|
122
122
|
"eslint-plugin-import": "^2.32.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.
|
|
128
|
+
"fs-extra": "^11.3.2",
|
|
129
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
138
|
"typescript": "~5.9.2",
|
|
139
|
-
"typescript-eslint": "^8.
|
|
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"
|