ts-jest 29.4.10 → 29.4.11

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
- 19e702f0a49983ce6d92683fb1199ea2acf8e36a
1
+ 73233cd15fa36234d30a07a1efa9643162305524
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [29.4.11](https://github.com/kulshekhar/ts-jest/compare/v29.4.10...v29.4.11) (2026-05-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * preserve Bundler on the CJS path under TypeScript >= 6 ([3941818](https://github.com/kulshekhar/ts-jest/commit/39418187515f11b6584d35a4e3ddf50231f74936)), closes [#4198](https://github.com/kulshekhar/ts-jest/issues/4198)
7
+
8
+
9
+
1
10
  ## [29.4.10](https://github.com/kulshekhar/ts-jest/compare/v29.4.9...v29.4.10) (2026-05-18)
2
11
 
3
12
 
@@ -66,11 +66,11 @@ export declare class TsCompiler implements TsCompilerInstance {
66
66
  * supports.)
67
67
  *
68
68
  * - User-supplied Bundler with a non-Bundler-compatible forced module is
69
- * also TS5095 on the supported TS range — substitute Node10. (TypeScript
70
- * 6 relaxed this for `module: CommonJS` specifically; that relaxation is
71
- * deliberately not encoded here so behavior stays consistent across the
72
- * full peerDependency range. See `isBundlerCompatibleModuleKind` for the
73
- * follow-up pointer.)
69
+ * TS5095, substitute Node10. (TypeScript 6 relaxed this for
70
+ * `module: CommonJS` specifically; that relaxation is encoded inside
71
+ * `isBundlerCompatibleModuleKind` via a runtime version check, so on
72
+ * TS 6 user-supplied Bundler passes through unchanged on the CJS
73
+ * path.)
74
74
  *
75
75
  * - Anything else (Node10 / Classic / unset) passes through or falls back
76
76
  * to Node10. These pairings are valid with every forced module kind.
@@ -94,13 +94,12 @@ export declare class TsCompiler implements TsCompilerInstance {
94
94
  * user-supplied-`Bundler` pass-through, so neither path emits an invalid
95
95
  * pair when the user has selected a non-ES `module`.
96
96
  *
97
- * Note: TypeScript 6.0 relaxed this restriction for `module: CommonJS`
98
- * specifically (`CommonJS` + `Bundler` is now a valid pair on TS ≥ 6); the
99
- * other non-ES module kinds (`AMD` / `UMD` / `System` / `None`) remain
100
- * Bundler-incompatible on every TypeScript version. The TS 6 relaxation is
101
- * intentionally not encoded here to keep behavior consistent across the full
102
- * peerDependency range (`>=4.3 <7`); honoring it can ride in as a follow-up
103
- * once the TS 6 baseline lands.
97
+ * TypeScript 6.0 relaxed TS5095 for `module: CommonJS` specifically
98
+ * (`CommonJS` + `Bundler` is a valid pair on TS ≥ 6); the other non-ES
99
+ * module kinds (`AMD` / `UMD` / `System` / `None`) remain Bundler-incompatible
100
+ * on every TypeScript version. The version is detected at runtime from
101
+ * `this._ts.version` so the function stays correct across the full
102
+ * peerDependency range (`>=4.3 <7`).
104
103
  *
105
104
  * @see https://www.typescriptlang.org/tsconfig/#moduleResolution
106
105
  */
@@ -181,11 +181,11 @@ class TsCompiler {
181
181
  * supports.)
182
182
  *
183
183
  * - User-supplied Bundler with a non-Bundler-compatible forced module is
184
- * also TS5095 on the supported TS range — substitute Node10. (TypeScript
185
- * 6 relaxed this for `module: CommonJS` specifically; that relaxation is
186
- * deliberately not encoded here so behavior stays consistent across the
187
- * full peerDependency range. See `isBundlerCompatibleModuleKind` for the
188
- * follow-up pointer.)
184
+ * TS5095, substitute Node10. (TypeScript 6 relaxed this for
185
+ * `module: CommonJS` specifically; that relaxation is encoded inside
186
+ * `isBundlerCompatibleModuleKind` via a runtime version check, so on
187
+ * TS 6 user-supplied Bundler passes through unchanged on the CJS
188
+ * path.)
189
189
  *
190
190
  * - Anything else (Node10 / Classic / unset) passes through or falls back
191
191
  * to Node10. These pairings are valid with every forced module kind.
@@ -224,13 +224,12 @@ class TsCompiler {
224
224
  * user-supplied-`Bundler` pass-through, so neither path emits an invalid
225
225
  * pair when the user has selected a non-ES `module`.
226
226
  *
227
- * Note: TypeScript 6.0 relaxed this restriction for `module: CommonJS`
228
- * specifically (`CommonJS` + `Bundler` is now a valid pair on TS ≥ 6); the
229
- * other non-ES module kinds (`AMD` / `UMD` / `System` / `None`) remain
230
- * Bundler-incompatible on every TypeScript version. The TS 6 relaxation is
231
- * intentionally not encoded here to keep behavior consistent across the full
232
- * peerDependency range (`>=4.3 <7`); honoring it can ride in as a follow-up
233
- * once the TS 6 baseline lands.
227
+ * TypeScript 6.0 relaxed TS5095 for `module: CommonJS` specifically
228
+ * (`CommonJS` + `Bundler` is a valid pair on TS ≥ 6); the other non-ES
229
+ * module kinds (`AMD` / `UMD` / `System` / `None`) remain Bundler-incompatible
230
+ * on every TypeScript version. The version is detected at runtime from
231
+ * `this._ts.version` so the function stays correct across the full
232
+ * peerDependency range (`>=4.3 <7`).
234
233
  *
235
234
  * @see https://www.typescriptlang.org/tsconfig/#moduleResolution
236
235
  */
@@ -244,6 +243,11 @@ class TsCompiler {
244
243
  if (M.Preserve !== undefined && moduleKind === M.Preserve) {
245
244
  return true;
246
245
  }
246
+ // TS 6 made `CommonJS` + `Bundler` a valid pair.
247
+ if (moduleKind === M.CommonJS) {
248
+ const tsMajor = parseInt(this._ts.version.split('.')[0], 10);
249
+ return tsMajor >= 6;
250
+ }
247
251
  return false;
248
252
  }
249
253
  /**
package/npm-view.err ADDED
@@ -0,0 +1,9 @@
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
+ npm error code E404
3
+ npm error 404 No match found for version 29.4.11
4
+ npm error 404
5
+ npm error 404 The requested resource 'ts-jest@29.4.11' could not be found or you do not have permission to access it.
6
+ npm error 404
7
+ npm error 404 Note that you can also install from a
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-05-21T13_47_16_595Z-debug-0.log
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-jest",
3
- "version": "29.4.10",
3
+ "version": "29.4.11",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "commonjs",