ts-jest 29.2.4 → 29.2.5
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 +11 -0
- package/dist/legacy/compiler/ts-compiler.js +3 -3
- package/dist/presets/create-jest-preset.js +2 -2
- package/package.json +31 -32
- package/globals.d.ts +0 -18
package/.ts-jest-digest
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2b7ef2723f3aa8f87bfd0da3dcd77adce2ba6314
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
### [29.2.5](https://github.com/kulshekhar/ts-jest/compare/v29.2.4...v29.2.5) (2024-08-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* build: build package with `NodeNext` module ([9b3ade5](https://github.com/kulshekhar/ts-jest/commit/9b3ade5))
|
|
7
|
+
* fix: set value `ts/tsx` `extensionsToTreatAsEsm` in default esm preset ([d9ff362](https://github.com/kulshekhar/ts-jest/commit/d9ff362))
|
|
8
|
+
* fix(compiler): fallback to `NodeJS` module resolution for ts 4.8 ([b7d3409](https://github.com/kulshekhar/ts-jest/commit/b7d3409)), closes [#4499](https://github.com/kulshekhar/ts-jest/issues/4499)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
1
12
|
### [29.2.4](https://github.com/kulshekhar/ts-jest/compare/v29.2.3...v29.2.4) (2024-08-01)
|
|
2
13
|
|
|
3
14
|
|
|
@@ -113,12 +113,12 @@ var TsCompiler = /** @class */ (function () {
|
|
|
113
113
|
return importedModulePaths;
|
|
114
114
|
};
|
|
115
115
|
TsCompiler.prototype.fixupCompilerOptionsForModuleKind = function (compilerOptions, isEsm) {
|
|
116
|
-
var _a;
|
|
117
|
-
var moduleResolution = this._ts.ModuleResolutionKind.Node10;
|
|
116
|
+
var _a, _b;
|
|
117
|
+
var moduleResolution = (_a = this._ts.ModuleResolutionKind.Node10) !== null && _a !== void 0 ? _a : this._ts.ModuleResolutionKind.NodeJs;
|
|
118
118
|
if (!isEsm) {
|
|
119
119
|
return __assign(__assign({}, compilerOptions), { module: this._ts.ModuleKind.CommonJS, moduleResolution: moduleResolution });
|
|
120
120
|
}
|
|
121
|
-
var moduleKind = (
|
|
121
|
+
var moduleKind = (_b = compilerOptions.module) !== null && _b !== void 0 ? _b : this._ts.ModuleKind.ESNext;
|
|
122
122
|
var esModuleInterop = compilerOptions.esModuleInterop;
|
|
123
123
|
if ([this._ts.ModuleKind.Node16, this._ts.ModuleKind.NodeNext].includes(moduleKind)) {
|
|
124
124
|
esModuleInterop = true;
|
|
@@ -135,7 +135,7 @@ function createDefaultEsmPreset(tsJestTransformOptions) {
|
|
|
135
135
|
if (tsJestTransformOptions === void 0) { tsJestTransformOptions = {}; }
|
|
136
136
|
logger.debug('creating default ESM Jest preset');
|
|
137
137
|
return {
|
|
138
|
-
extensionsToTreatAsEsm: __spreadArray(
|
|
138
|
+
extensionsToTreatAsEsm: __spreadArray([], __read(constants_1.TS_EXT_TO_TREAT_AS_ESM), false),
|
|
139
139
|
transform: (_a = {},
|
|
140
140
|
_a[constants_1.ESM_TS_TRANSFORM_PATTERN] = [
|
|
141
141
|
'ts-jest',
|
|
@@ -149,7 +149,7 @@ function createDefaultEsmLegacyPreset(tsJestTransformOptions) {
|
|
|
149
149
|
if (tsJestTransformOptions === void 0) { tsJestTransformOptions = {}; }
|
|
150
150
|
logger.debug('creating default ESM Jest preset');
|
|
151
151
|
return {
|
|
152
|
-
extensionsToTreatAsEsm: __spreadArray(
|
|
152
|
+
extensionsToTreatAsEsm: __spreadArray([], __read(constants_1.TS_EXT_TO_TREAT_AS_ESM), false),
|
|
153
153
|
transform: (_a = {},
|
|
154
154
|
_a[constants_1.ESM_TS_TRANSFORM_PATTERN] = [
|
|
155
155
|
'ts-jest/legacy',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-jest",
|
|
3
|
-
"version": "29.2.
|
|
3
|
+
"version": "29.2.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
"prebuild": "rimraf dist coverage *.tgz",
|
|
12
12
|
"build": "tsc -p tsconfig.build.json",
|
|
13
13
|
"postbuild": "node scripts/post-build.js",
|
|
14
|
-
"
|
|
15
|
-
"test": "jest",
|
|
14
|
+
"test": "jest -c=jest-src.config.ts",
|
|
15
|
+
"test-e2e-cjs": "jest -c=jest-e2e.config.cjs --no-cache",
|
|
16
|
+
"test-e2e-esm": "node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js -c=jest-e2e.config.mjs --no-cache",
|
|
16
17
|
"test-examples": "node scripts/test-examples.js",
|
|
17
18
|
"lint": "eslint --ext .js,.ts .",
|
|
18
19
|
"lint-fix": "eslint --fix --ext .js,.ts .",
|
|
@@ -51,15 +52,15 @@
|
|
|
51
52
|
},
|
|
52
53
|
"homepage": "https://kulshekhar.github.io/ts-jest",
|
|
53
54
|
"dependencies": {
|
|
54
|
-
"bs-logger": "0.
|
|
55
|
+
"bs-logger": "^0.2.6",
|
|
55
56
|
"ejs": "^3.1.10",
|
|
56
|
-
"fast-json-stable-stringify": "2.
|
|
57
|
+
"fast-json-stable-stringify": "^2.1.0",
|
|
57
58
|
"jest-util": "^29.0.0",
|
|
58
59
|
"json5": "^2.2.3",
|
|
59
|
-
"lodash.memoize": "4.
|
|
60
|
-
"make-error": "1.
|
|
61
|
-
"semver": "^7.
|
|
62
|
-
"yargs-parser": "^21.
|
|
60
|
+
"lodash.memoize": "^4.1.2",
|
|
61
|
+
"make-error": "^1.3.6",
|
|
62
|
+
"semver": "^7.6.3",
|
|
63
|
+
"yargs-parser": "^21.1.1"
|
|
63
64
|
},
|
|
64
65
|
"peerDependencies": {
|
|
65
66
|
"@babel/core": ">=7.0.0-beta.0 <8",
|
|
@@ -94,47 +95,45 @@
|
|
|
94
95
|
}
|
|
95
96
|
},
|
|
96
97
|
"devDependencies": {
|
|
97
|
-
"@commitlint/cli": "18.6.1",
|
|
98
|
-
"@commitlint/config-angular": "18.6.1",
|
|
98
|
+
"@commitlint/cli": "~18.6.1",
|
|
99
|
+
"@commitlint/config-angular": "~18.6.1",
|
|
100
|
+
"@jest/globals": "^29.7.0",
|
|
99
101
|
"@jest/transform": "^29.7.0",
|
|
100
102
|
"@jest/types": "^29.6.3",
|
|
101
|
-
"@types/babel__core": "7.20.5",
|
|
102
|
-
"@types/cross-spawn": "latest",
|
|
103
|
+
"@types/babel__core": "^7.20.5",
|
|
103
104
|
"@types/ejs": "^3.1.5",
|
|
104
|
-
"@types/fs-extra": "
|
|
105
|
-
"@types/
|
|
106
|
-
"@types/
|
|
107
|
-
"@types/lodash.
|
|
108
|
-
"@types/lodash.
|
|
109
|
-
"@types/
|
|
110
|
-
"@types/
|
|
111
|
-
"@types/
|
|
112
|
-
"@types/semver": "
|
|
113
|
-
"@types/yargs": "
|
|
105
|
+
"@types/fs-extra": "^11.0.4",
|
|
106
|
+
"@types/jest": "^29.5.12",
|
|
107
|
+
"@types/js-yaml": "^4.0.9",
|
|
108
|
+
"@types/lodash.camelcase": "^4.3.9",
|
|
109
|
+
"@types/lodash.memoize": "^4.1.9",
|
|
110
|
+
"@types/lodash.set": "^4.3.9",
|
|
111
|
+
"@types/micromatch": "^4.0.9",
|
|
112
|
+
"@types/node": "20.16.1",
|
|
113
|
+
"@types/semver": "^7.5.8",
|
|
114
|
+
"@types/yargs": "^17.0.33",
|
|
114
115
|
"@types/yargs-parser": "21.0.3",
|
|
115
116
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
116
117
|
"@typescript-eslint/parser": "^7.18.0",
|
|
117
118
|
"babel-jest": "^29.7.0",
|
|
118
119
|
"conventional-changelog-cli": "^5.0.0",
|
|
119
|
-
"cross-spawn": "latest",
|
|
120
120
|
"esbuild": "~0.21.5",
|
|
121
121
|
"eslint": "^8.57.0",
|
|
122
122
|
"eslint-config-prettier": "^9.1.0",
|
|
123
123
|
"eslint-plugin-import": "^2.29.1",
|
|
124
|
-
"eslint-plugin-jest": "^28.
|
|
125
|
-
"eslint-plugin-jsdoc": "^48.
|
|
124
|
+
"eslint-plugin-jest": "^28.8.0",
|
|
125
|
+
"eslint-plugin-jsdoc": "^48.11.0",
|
|
126
126
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
127
127
|
"eslint-plugin-prettier": "^4.2.1",
|
|
128
128
|
"execa": "5.1.1",
|
|
129
|
-
"fs-extra": "11.2.0",
|
|
129
|
+
"fs-extra": "^11.2.0",
|
|
130
130
|
"glob": "^10.2.6",
|
|
131
|
-
"glob-gitignore": "
|
|
132
|
-
"husky": "4.
|
|
131
|
+
"glob-gitignore": "^1.0.14",
|
|
132
|
+
"husky": "~4.3.8",
|
|
133
133
|
"jest": "^29.7.0",
|
|
134
|
-
"
|
|
135
|
-
"js-yaml": "latest",
|
|
134
|
+
"js-yaml": "^4.1.0",
|
|
136
135
|
"json-schema-to-typescript": "^13.1.2",
|
|
137
|
-
"lint-staged": "
|
|
136
|
+
"lint-staged": "^15.2.9",
|
|
138
137
|
"prettier": "^2.8.8",
|
|
139
138
|
"typescript": "~5.5.4"
|
|
140
139
|
},
|
package/globals.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
const beforeAll: typeof import('@jest/globals').beforeAll
|
|
3
|
-
const beforeEach: typeof import('@jest/globals').beforeEach
|
|
4
|
-
const afterAll: typeof import('@jest/globals').afterAll
|
|
5
|
-
const afterEach: typeof import('@jest/globals').afterEach
|
|
6
|
-
const describe: typeof import('@jest/globals').describe
|
|
7
|
-
const fdescribe: typeof import('@jest/globals').fdescribe
|
|
8
|
-
const xdescribe: typeof import('@jest/globals').xdescribe
|
|
9
|
-
const it: typeof import('@jest/globals').it
|
|
10
|
-
const fit: typeof import('@jest/globals').fit
|
|
11
|
-
const xit: typeof import('@jest/globals').xit
|
|
12
|
-
const test: typeof import('@jest/globals').test
|
|
13
|
-
const xtest: typeof import('@jest/globals').xtest
|
|
14
|
-
const expect: typeof import('@jest/globals').expect
|
|
15
|
-
const jest: typeof import('@jest/globals').jest
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export {}
|