ts-jest 29.4.8 → 29.4.9

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
- 5a52a8b09815c44895c89cd5d7b70f8b997b82a2
1
+ 58edfe49f3f9192570efa8fa26d9cbc324d1324e
package/CHANGELOG.md CHANGED
@@ -1,11 +1,3 @@
1
- ## [29.4.8](https://github.com/kulshekhar/ts-jest/compare/v29.4.7...v29.4.8) (2026-04-01)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- - wrong published assets
7
-
8
-
9
1
  ## [29.4.7](https://github.com/kulshekhar/ts-jest/compare/v29.4.6...v29.4.7) (2026-04-01)
10
2
 
11
3
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-jest",
3
- "version": "29.4.8",
3
+ "version": "29.4.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "commonjs",
@@ -1,17 +0,0 @@
1
- /**
2
- * Helper function to define a Jest configuration with ts-jest.
3
- * This function provides type safety and runtime validation for experimental features.
4
- *
5
- * @example
6
- * ```typescript
7
- * import { defineConfig } from 'ts-jest'
8
- *
9
- * export default defineConfig({
10
- * testEnvironment: 'node',
11
- * future: {
12
- * // experimental features go here
13
- * }
14
- * })
15
- * ```
16
- */
17
- export declare const defineConfig: (config: InitialTestConfig) => InitialTestConfig;
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defineConfig = void 0;
4
- const experimental_1 = require("../experimental");
5
- /**
6
- * Helper function to define a Jest configuration with ts-jest.
7
- * This function provides type safety and runtime validation for experimental features.
8
- *
9
- * @example
10
- * ```typescript
11
- * import { defineConfig } from 'ts-jest'
12
- *
13
- * export default defineConfig({
14
- * testEnvironment: 'node',
15
- * future: {
16
- * // experimental features go here
17
- * }
18
- * })
19
- * ```
20
- */
21
- const defineConfig = (config) => {
22
- if ('future' in config) {
23
- if (typeof config.future !== 'object' || config.future === null || Array.isArray(config.future)) {
24
- throw new TypeError("Invalid 'future' configuration: Future config must be an object");
25
- }
26
- if (config.future?.experimental_validateOptions) {
27
- if (config.transform) {
28
- for (const [, transformer] of Object.entries(config.transform)) {
29
- if (Array.isArray(transformer) && transformer.length > 1) {
30
- const [transformerName, options] = transformer;
31
- if (typeof transformerName === 'string' && transformerName === 'ts-jest') {
32
- (0, experimental_1.validateOptions)(options);
33
- }
34
- }
35
- }
36
- }
37
- }
38
- }
39
- return config;
40
- };
41
- exports.defineConfig = defineConfig;
@@ -1,5 +0,0 @@
1
- export declare const TsJestDiagnosticCodes: {
2
- readonly Generic: 151000;
3
- readonly ConfigModuleOption: 151001;
4
- readonly ModernNodeModule: 151002;
5
- };
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TsJestDiagnosticCodes = void 0;
4
- exports.TsJestDiagnosticCodes = {
5
- Generic: 151000,
6
- ConfigModuleOption: 151001,
7
- ModernNodeModule: 151002,
8
- };
@@ -1 +0,0 @@
1
- export * from './option-validator';
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./option-validator"), exports);
@@ -1 +0,0 @@
1
- export {};
@@ -1,67 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.validateOptions = void 0;
37
- const v = __importStar(require("valibot"));
38
- /**
39
- * Valibot schema for ts-jest options validation
40
- */
41
- const tsJestOptionsSchema = v.strictObject({
42
- tsconfig: v.optional(v.union([v.string(), v.record(v.string(), v.any())])),
43
- isolatedModules: v.optional(v.boolean()),
44
- compiler: v.optional(v.string()),
45
- astTransformers: v.optional(v.record(v.string(), v.any())),
46
- diagnostics: v.optional(v.union([v.boolean(), v.record(v.string(), v.any())])),
47
- babelConfig: v.optional(v.union([v.boolean(), v.string(), v.record(v.string(), v.any())])),
48
- stringifyContentPathRegex: v.optional(v.union([v.string(), v.instance(RegExp)])),
49
- useESM: v.optional(v.boolean()),
50
- });
51
- /**
52
- * @internal
53
- *
54
- * Validates `ts-jest` transformer options with both TypeScript types and runtime validation about unrecognized options to help catch typos and configuration errors.
55
- */
56
- const validateOptions = (options) => {
57
- try {
58
- v.parse(tsJestOptionsSchema, options);
59
- }
60
- catch (error) {
61
- if (error instanceof v.ValiError) {
62
- throw new Error(error.message);
63
- }
64
- throw error;
65
- }
66
- };
67
- exports.validateOptions = validateOptions;