ts-jest 27.1.1 → 27.1.4

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
- 89e23259863a0cf11a2b03a32d700d94c8b151b2
1
+ 606cdd028ccae5bd2e9b9917b4e8ac7f4e76229a
package/CHANGELOG.md CHANGED
@@ -1,10 +1,39 @@
1
+ ## [27.1.4](https://github.com/kulshekhar/ts-jest/compare/v27.1.3...v27.1.4) (2022-03-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **compiler:** revert [#3194](https://github.com/kulshekhar/ts-jest/issues/3194) ([#3362](https://github.com/kulshekhar/ts-jest/issues/3362)) ([2b7dffe](https://github.com/kulshekhar/ts-jest/commit/2b7dffeac940f779922c43cefba3f741a3911b49)), closes [#3272](https://github.com/kulshekhar/ts-jest/issues/3272)
7
+ * remove `esbuild` from peer dependency ([#3360](https://github.com/kulshekhar/ts-jest/issues/3360)) ([8c8c1ca](https://github.com/kulshekhar/ts-jest/commit/8c8c1ca615b1edeedc9f4282557c28e82acee543)), closes [#3346](https://github.com/kulshekhar/ts-jest/issues/3346)
8
+ * support Babel config file with `.cjs` extension ([#3361](https://github.com/kulshekhar/ts-jest/issues/3361)) ([5e5ac4a](https://github.com/kulshekhar/ts-jest/commit/5e5ac4ac286bdcce157d0bdc31f3a57202fdbdfe)), closes [#3335](https://github.com/kulshekhar/ts-jest/issues/3335)
9
+
10
+
11
+
12
+ ## [27.1.3](https://github.com/kulshekhar/ts-jest/compare/v27.1.2...v27.1.3) (2022-01-14)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **compiler:** update memory cache for compiler using received file content ([#3194](https://github.com/kulshekhar/ts-jest/issues/3194)) ([e4d9541](https://github.com/kulshekhar/ts-jest/commit/e4d9541f262ca14cb25563c757c0f2345dbf5c51))
18
+
19
+
20
+
21
+ ## [27.1.2](https://github.com/kulshekhar/ts-jest/compare/v27.1.1...v27.1.2) (2021-12-15)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * stimulate `esbuild` type to avoid importing `esbuild` directly ([#3147](https://github.com/kulshekhar/ts-jest/issues/3147)) ([9ace0a9](https://github.com/kulshekhar/ts-jest/commit/9ace0a9991da8bcb0f04a2e603f7601d6fb630e7))
27
+
28
+
29
+
1
30
  ## [27.1.1](https://github.com/kulshekhar/ts-jest/compare/v27.1.0...v27.1.1) (2021-12-07)
2
31
 
3
32
 
4
33
  ### Bug Fixes
5
34
 
6
35
  * bring back `afterProcess` hook ([#3132](https://github.com/kulshekhar/ts-jest/issues/3132)) ([2b6b86e](https://github.com/kulshekhar/ts-jest/commit/2b6b86e01dcd3d9d9906f24fe3db5cadb799146a))
7
- * make `esbuild` as optional peer dependency ([#3129](https://github.com/kulshekhar/ts-jest/issues/3129)) ([20258de](https://github.com/kulshekhar/ts-jest/commit/20258de54c9c10f8d2495bda174f9865a3cebc91))
36
+ * make `esbuild` as optional peer dependency ([#3129](https://github.com/kulshekhar/ts-jest/pull/3129)) ([20258de](https://github.com/kulshekhar/ts-jest/commit/20258de54c9c10f8d2495bda174f9865a3cebc91))
8
37
 
9
38
 
10
39
 
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -181,7 +181,8 @@ var ConfigSet = (function () {
181
181
  var baseBabelCfg = { cwd: this.cwd };
182
182
  if (typeof options.babelConfig === 'string') {
183
183
  var babelCfgPath = this.resolvePath(options.babelConfig);
184
- if ((0, path_1.extname)(options.babelConfig) === '.js') {
184
+ var babelFileExtName = (0, path_1.extname)(options.babelConfig);
185
+ if (babelFileExtName === '.js' || babelFileExtName === '.cjs') {
185
186
  this.babelConfig = __assign(__assign({}, baseBabelCfg), require(babelCfgPath));
186
187
  }
187
188
  else {
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/types.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { TransformOptions } from '@jest/transform';
2
2
  import type { Config } from '@jest/types';
3
3
  import type * as _babel from 'babel__core';
4
- import type * as _esbuild from 'esbuild';
5
4
  import type * as _ts from 'typescript';
6
5
  import type { ConfigSet } from './config';
7
6
  import type { RawCompilerOptions } from './raw-compiler-options';
@@ -13,7 +12,16 @@ declare module '@jest/types' {
13
12
  }
14
13
  }
15
14
  export declare type TTypeScript = typeof _ts;
16
- export declare type TEsBuild = typeof _esbuild;
15
+ export interface TEsBuild {
16
+ transformSync(input: string, options?: {
17
+ loader: 'ts' | 'js';
18
+ format: 'cjs' | 'esm';
19
+ target: string;
20
+ }): {
21
+ code: string;
22
+ map: string;
23
+ };
24
+ }
17
25
  export declare type BabelConfig = _babel.TransformOptions;
18
26
  export declare type TsJestPresets = Pick<Config.InitialOptions, 'extensionsToTreatAsEsm' | 'moduleFileExtensions' | 'transform' | 'testMatch'>;
19
27
  export interface AstTransformer<T = Record<string, unknown>> {
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-jest",
3
- "version": "27.1.1",
3
+ "version": "27.1.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "bin": {
@@ -14,13 +14,13 @@
14
14
  "pretest": "tsc -p tsconfig.spec.json --noEmit && node scripts/prepare-test.js",
15
15
  "test": "jest",
16
16
  "test-examples": "node scripts/test-examples.js",
17
- "lint": "node_modules/.bin/eslint --ext .js,.ts .",
18
- "lint-fix": "node_modules/.bin/eslint --fix --ext .js,.ts .",
17
+ "lint": "eslint --ext .js,.ts .",
18
+ "lint-fix": "eslint --fix --ext .js,.ts .",
19
19
  "lint-prettier": "prettier '**/*.{yml,yaml,md}' --write",
20
20
  "lint-prettier-ci": "prettier '**/*.{yml,yaml,md}' --check",
21
21
  "doc": "cd website && npm run start",
22
22
  "doc:build": "cd website && npm run build",
23
- "changelog": "node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
23
+ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
24
24
  "prepare": "npm run build",
25
25
  "prepublishOnly": "npm run test",
26
26
  "preversion": "npm run test",
@@ -64,7 +64,6 @@
64
64
  "@babel/core": ">=7.0.0-beta.0 <8",
65
65
  "@types/jest": "^27.0.0",
66
66
  "babel-jest": ">=27.0.0 <28",
67
- "esbuild": "~0.14.0",
68
67
  "jest": "^27.0.0",
69
68
  "typescript": ">=3.8 <5.0"
70
69
  },
@@ -90,8 +89,8 @@
90
89
  }
91
90
  },
92
91
  "devDependencies": {
93
- "@commitlint/cli": "15.x",
94
- "@commitlint/config-angular": "^15.0.0",
92
+ "@commitlint/cli": "16.x",
93
+ "@commitlint/config-angular": "^16.0.0",
95
94
  "@jest/transform": "^27.4.2",
96
95
  "@jest/types": "^27.4.2",
97
96
  "@types/babel__core": "7.x",
@@ -103,7 +102,7 @@
103
102
  "@types/lodash.memoize": "4.x",
104
103
  "@types/lodash.set": "4.x",
105
104
  "@types/micromatch": "4.x",
106
- "@types/node": "16.11.12",
105
+ "@types/node": "17.0.21",
107
106
  "@types/node-fetch": "^3.0.3",
108
107
  "@types/react": "17.x",
109
108
  "@types/rimraf": "^3.0.2",
@@ -115,7 +114,7 @@
115
114
  "conventional-changelog-cli": "2.x",
116
115
  "cross-spawn": "latest",
117
116
  "esbuild": "~0.14.2",
118
- "eslint": "8.4.1",
117
+ "eslint": "^8.4.1",
119
118
  "eslint-config-prettier": "latest",
120
119
  "eslint-plugin-import": "latest",
121
120
  "eslint-plugin-jest": "latest",
@@ -136,8 +135,7 @@
136
135
  "lodash.set": "^4.3.2",
137
136
  "node-fetch": "^3.0.0",
138
137
  "prettier": "^2.4.0",
139
- "react": "^17.0.2",
140
- "typescript": "~4.5.2"
138
+ "typescript": "~4.6.2"
141
139
  },
142
140
  "lint-staged": {
143
141
  "*.{ts,tsx,js,jsx}": [