ts-jest 29.4.14 → 29.4.15
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 +10 -0
- package/dist/cli/config/migrate.js +2 -2
- package/dist/legacy/compiler/ts-compiler.js +12 -4
- package/npm-view.err +3 -3
- package/package.json +5 -5
package/.ts-jest-digest
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8ac37e2e20f71cc532c053f3e2c9ea0b40375c6b
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [29.4.15](https://github.com/kulshekhar/ts-jest/compare/v29.4.14...v29.4.15) (2026-10-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **compiler:** resolve modules with tsconfig options regardless of cache state ([268746c](https://github.com/kulshekhar/ts-jest/commit/268746c0fcaf72476cebb348c5543e5c2aac3622)), closes [#5216](https://github.com/kulshekhar/ts-jest/issues/5216)
|
|
7
|
+
* support `.cjs` config files in `config:migrate` ([4001b4e](https://github.com/kulshekhar/ts-jest/commit/4001b4e6d28aa461e7468f09157413e113f0bd92)), closes [#4485](https://github.com/kulshekhar/ts-jest/issues/4485)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
## [29.4.14](https://github.com/kulshekhar/ts-jest/compare/v29.4.13...v29.4.14) (2026-09-25)
|
|
2
12
|
|
|
3
13
|
|
|
@@ -56,7 +56,7 @@ const run = async (args /* , logger: Logger*/) => {
|
|
|
56
56
|
}
|
|
57
57
|
const name = (0, path_1.basename)(file);
|
|
58
58
|
const isPackage = name === 'package.json';
|
|
59
|
-
if (!/\.(js|json)$/.test(name)) {
|
|
59
|
+
if (!/\.(c?js|json)$/.test(name)) {
|
|
60
60
|
throw new TypeError(`Configuration file ${file} must be a JavaScript or JSON file.`);
|
|
61
61
|
}
|
|
62
62
|
let actualConfig = require(filePath);
|
|
@@ -164,7 +164,7 @@ Usage:
|
|
|
164
164
|
ts-jest config:migrate [options] <config-file>
|
|
165
165
|
|
|
166
166
|
Arguments:
|
|
167
|
-
<config-file> Can be a js or json Jest config file. If it is a
|
|
167
|
+
<config-file> Can be a js, cjs or json Jest config file. If it is a
|
|
168
168
|
package.json file, the configuration will be read from
|
|
169
169
|
the "jest" property.
|
|
170
170
|
|
|
@@ -93,7 +93,7 @@ class TsCompiler {
|
|
|
93
93
|
getDirectories: (0, lodash_memoize_1.default)(this._ts.sys.getDirectories),
|
|
94
94
|
useCaseSensitiveFileNames: () => this._ts.sys.useCaseSensitiveFileNames,
|
|
95
95
|
};
|
|
96
|
-
this._moduleResolutionCache = this._ts.createModuleResolutionCache(this.configSet.cwd, this._ts.sys.useCaseSensitiveFileNames ? (x) => x : (x) => x.toLowerCase(), this.
|
|
96
|
+
this._moduleResolutionCache = this._ts.createModuleResolutionCache(this.configSet.cwd, this._ts.sys.useCaseSensitiveFileNames ? (x) => x : (x) => x.toLowerCase(), this._initialCompilerOptions);
|
|
97
97
|
this._createLanguageService();
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -536,20 +536,28 @@ class TsCompiler {
|
|
|
536
536
|
return undefined;
|
|
537
537
|
}
|
|
538
538
|
// @ts-expect-error internal TypeScript API
|
|
539
|
-
const moduleResolution = this._ts.getEmitModuleResolutionKind(this.
|
|
539
|
+
const moduleResolution = this._ts.getEmitModuleResolutionKind(this._initialCompilerOptions);
|
|
540
540
|
const { Classic, Node10, NodeJs } = this._ts.ModuleResolutionKind;
|
|
541
541
|
if (moduleResolution === (Node10 ?? NodeJs) || moduleResolution === Classic) {
|
|
542
542
|
return undefined;
|
|
543
543
|
}
|
|
544
544
|
return getImpliedNodeFormat(containingFile, this._moduleResolutionCache?.getPackageJsonInfoCache?.(),
|
|
545
545
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
546
|
-
this._moduleResolutionHost, this.
|
|
546
|
+
this._moduleResolutionHost, this._initialCompilerOptions);
|
|
547
547
|
}
|
|
548
548
|
/**
|
|
549
|
+
* Resolve modules with the compiler options from tsconfig, not with the ones
|
|
550
|
+
* `fixupCompilerOptionsForModuleKind` derives for each compile. Those adapt options
|
|
551
|
+
* such as `module` and `moduleResolution` to what ts-jest emits, e.g. Node10 instead
|
|
552
|
+
* of Bundler on the CommonJS path, and switching between them made imports resolve
|
|
553
|
+
* differently depending on whether another file had been compiled first, i.e.
|
|
554
|
+
* on the state of Jest's cache.
|
|
555
|
+
*
|
|
556
|
+
* @see https://github.com/kulshekhar/ts-jest/issues/5216
|
|
549
557
|
* @internal
|
|
550
558
|
*/
|
|
551
559
|
_resolveModuleName(moduleNameToResolve, containingFile, resolutionMode) {
|
|
552
|
-
return this._ts.resolveModuleName(moduleNameToResolve, containingFile, this.
|
|
560
|
+
return this._ts.resolveModuleName(moduleNameToResolve, containingFile, this._initialCompilerOptions,
|
|
553
561
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
554
562
|
this._moduleResolutionHost,
|
|
555
563
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
package/npm-view.err
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
npm warn Unknown user config "always-auth". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
2
2
|
npm error code E404
|
|
3
|
-
npm error 404 No match found for version 29.4.
|
|
3
|
+
npm error 404 No match found for version 29.4.15
|
|
4
4
|
npm error 404
|
|
5
|
-
npm error 404 The requested resource 'ts-jest@29.4.
|
|
5
|
+
npm error 404 The requested resource 'ts-jest@29.4.15' could not be found or you do not have permission to access it.
|
|
6
6
|
npm error 404
|
|
7
7
|
npm error 404 Note that you can also install from a
|
|
8
8
|
npm error 404 tarball, folder, http url, or git url.
|
|
9
|
-
npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2026-
|
|
9
|
+
npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2026-10-15T05_38_19_257Z-debug-0.log
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-jest",
|
|
3
|
-
"version": "29.4.
|
|
3
|
+
"version": "29.4.15",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"bs-logger": "^0.2.6",
|
|
54
54
|
"fast-json-stable-stringify": "^2.1.0",
|
|
55
|
-
"handlebars": "^4.7.
|
|
55
|
+
"handlebars": "^4.7.10",
|
|
56
56
|
"json5": "^2.2.3",
|
|
57
57
|
"lodash.memoize": "^4.1.2",
|
|
58
58
|
"make-error": "^1.3.6",
|
|
@@ -122,18 +122,18 @@
|
|
|
122
122
|
"eslint-plugin-prettier": "^4.2.5",
|
|
123
123
|
"execa": "5.1.1",
|
|
124
124
|
"fast-glob": "^3.3.3",
|
|
125
|
-
"fs-extra": "^11.4.
|
|
125
|
+
"fs-extra": "^11.4.1",
|
|
126
126
|
"globals": "^16.5.0",
|
|
127
127
|
"husky": "^9.1.7",
|
|
128
128
|
"jest": "^30.5.2",
|
|
129
129
|
"js-yaml": "^4.3.2",
|
|
130
130
|
"lint-staged": "^15.5.2",
|
|
131
|
-
"memfs": "^4.
|
|
131
|
+
"memfs": "^4.80.0",
|
|
132
132
|
"prettier": "^2.8.8",
|
|
133
133
|
"rimraf": "^5.0.10",
|
|
134
134
|
"ts-node": "^10.9.2",
|
|
135
135
|
"typescript": "~5.9.3",
|
|
136
|
-
"typescript-eslint": "^8.
|
|
136
|
+
"typescript-eslint": "^8.71.1"
|
|
137
137
|
},
|
|
138
138
|
"engines": {
|
|
139
139
|
"node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0"
|