ts-jest 28.0.5 → 28.0.8

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
- 60d8111ee0c613e292a844a081abf56c285c9036
1
+ 52094263bf7d17e2c2650e5a9499d7adbdd08c8e
package/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ ## [28.0.8](https://github.com/kulshekhar/ts-jest/compare/v28.0.7...v28.0.8) (2022-08-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * allow `.mts` to be processed ([#3713](https://github.com/kulshekhar/ts-jest/issues/3713)) ([effae71](https://github.com/kulshekhar/ts-jest/commit/effae717369860e16cb0ccbf24027651493b9bf1)), closes [#3702](https://github.com/kulshekhar/ts-jest/issues/3702)
7
+
8
+
9
+
10
+ ## [28.0.7](https://github.com/kulshekhar/ts-jest/compare/v28.0.6...v28.0.7) (2022-07-15)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * update `@jest/types` to be an optional peer dependency ([#3690](https://github.com/kulshekhar/ts-jest/issues/3690)) ([8a8c3fa](https://github.com/kulshekhar/ts-jest/commit/8a8c3fafecffd19380171c661e94246024cae2ff)), closes [#3689](https://github.com/kulshekhar/ts-jest/issues/3689)
16
+
17
+
18
+
19
+ ## [28.0.6](https://github.com/kulshekhar/ts-jest/compare/v28.0.5...v28.0.6) (2022-07-13)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **config:** don't show diagnostics warning with `diagnostics: false` ([#3647](https://github.com/kulshekhar/ts-jest/issues/3647)) ([9a9bc02](https://github.com/kulshekhar/ts-jest/commit/9a9bc02935968fb5eb9fd3614a1f7cce019b80d8)), closes [#3638](https://github.com/kulshekhar/ts-jest/issues/3638)
25
+ * **legacy:** add `useCaseSensitiveFileNames` wherever needed ([#3683](https://github.com/kulshekhar/ts-jest/issues/3683)) ([c40bc34](https://github.com/kulshekhar/ts-jest/commit/c40bc34625d63cccc0db7296e616af27868fe1fe)), closes [#3665](https://github.com/kulshekhar/ts-jest/issues/3665)
26
+ * set `@jest/types` as peer dependency ([#3633](https://github.com/kulshekhar/ts-jest/issues/3633)) ([24567e1](https://github.com/kulshekhar/ts-jest/commit/24567e13d2780ad8a11c7ff35f9151ec53f8c211))
27
+
28
+
29
+
1
30
  ## [28.0.5](https://github.com/kulshekhar/ts-jest/compare/v28.0.4...v28.0.5) (2022-06-11)
2
31
 
3
32
 
package/dist/constants.js CHANGED
@@ -4,8 +4,8 @@ exports.DEFAULT_JEST_TEST_MATCH = exports.JS_EXT_TO_TREAT_AS_ESM = exports.TS_EX
4
4
  exports.LINE_FEED = '\n';
5
5
  exports.DECLARATION_TYPE_EXT = '.d.ts';
6
6
  exports.JS_JSX_EXTENSIONS = ['.js', '.jsx'];
7
- exports.TS_TSX_REGEX = /\.tsx?$/;
8
- exports.JS_JSX_REGEX = /\.jsx?$/;
9
- exports.TS_EXT_TO_TREAT_AS_ESM = ['.ts', '.tsx'];
7
+ exports.TS_TSX_REGEX = /\.m?tsx?$/;
8
+ exports.JS_JSX_REGEX = /\.m?jsx?$/;
9
+ exports.TS_EXT_TO_TREAT_AS_ESM = ['.ts', '.tsx', '.mts'];
10
10
  exports.JS_EXT_TO_TREAT_AS_ESM = ['.jsx'];
11
11
  exports.DEFAULT_JEST_TEST_MATCH = ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'];
@@ -87,8 +87,9 @@ var TsCompiler = (function () {
87
87
  getCurrentDirectory: function () { return _this.configSet.cwd; },
88
88
  realpath: this._ts.sys.realpath && (0, lodash_memoize_1.default)(this._ts.sys.realpath),
89
89
  getDirectories: (0, lodash_memoize_1.default)(this._ts.sys.getDirectories),
90
+ useCaseSensitiveFileNames: function () { return _this._ts.sys.useCaseSensitiveFileNames; },
90
91
  };
91
- this._moduleResolutionCache = this._ts.createModuleResolutionCache(this.configSet.cwd, function (x) { return x; }, this._compilerOptions);
92
+ this._moduleResolutionCache = this._ts.createModuleResolutionCache(this.configSet.cwd, this._ts.sys.useCaseSensitiveFileNames ? function (x) { return x; } : function (x) { return x.toLowerCase(); }, this._compilerOptions);
92
93
  this._createLanguageService();
93
94
  }
94
95
  }
@@ -226,6 +227,7 @@ var TsCompiler = (function () {
226
227
  .filter(function (fileName) { return constants_1.TS_TSX_REGEX.test(fileName) && !_this.configSet.isTestFile(fileName); })
227
228
  .forEach(function (fileName) { return _this._fileVersionCache.set(fileName, 0); });
228
229
  var serviceHost = {
230
+ useCaseSensitiveFileNames: function () { return _this._ts.sys.useCaseSensitiveFileNames; },
229
231
  getProjectVersion: function () { return String(_this._projectVersion); },
230
232
  getScriptFileNames: function () { return __spreadArray([], __read(_this._fileVersionCache.keys()), false); },
231
233
  getScriptVersion: function (fileName) {
@@ -266,7 +268,7 @@ var TsCompiler = (function () {
266
268
  },
267
269
  };
268
270
  this._logger.debug('created language service');
269
- this._languageService = this._ts.createLanguageService(serviceHost, this._ts.createDocumentRegistry());
271
+ this._languageService = this._ts.createLanguageService(serviceHost, this._ts.createDocumentRegistry(this._ts.sys.useCaseSensitiveFileNames, this.configSet.cwd));
270
272
  this.program = this._languageService.getProgram();
271
273
  };
272
274
  TsCompiler.prototype._getFileContentFromCache = function (filePath) {
@@ -247,9 +247,14 @@ var ConfigSet = (function () {
247
247
  throws: diagnosticsOpt,
248
248
  };
249
249
  }
250
- this._shouldIgnoreDiagnosticsForFile = this._diagnostics.exclude.length
251
- ? (0, jest_util_1.globsToMatcher)(this._diagnostics.exclude)
252
- : function () { return false; };
250
+ if (diagnosticsOpt) {
251
+ this._shouldIgnoreDiagnosticsForFile = this._diagnostics.exclude.length
252
+ ? (0, jest_util_1.globsToMatcher)(this._diagnostics.exclude)
253
+ : function () { return false; };
254
+ }
255
+ else {
256
+ this._shouldIgnoreDiagnosticsForFile = function () { return true; };
257
+ }
253
258
  this.logger.debug({ diagnostics: this._diagnostics }, 'normalized diagnostics config via ts-jest option');
254
259
  var tsconfigOpt = options.tsconfig;
255
260
  var configFilePath = typeof tsconfigOpt === 'string' ? this.resolvePath(tsconfigOpt) : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-jest",
3
- "version": "28.0.5",
3
+ "version": "28.0.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "bin": {
@@ -62,6 +62,7 @@
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@babel/core": ">=7.0.0-beta.0 <8",
65
+ "@jest/types": "^28.0.0",
65
66
  "babel-jest": "^28.0.0",
66
67
  "jest": "^28.0.0",
67
68
  "typescript": ">=4.3"
@@ -70,6 +71,9 @@
70
71
  "@babel/core": {
71
72
  "optional": true
72
73
  },
74
+ "@jest/types": {
75
+ "optional": true
76
+ },
73
77
  "babel-jest": {
74
78
  "optional": true
75
79
  },
@@ -86,9 +90,9 @@
86
90
  },
87
91
  "devDependencies": {
88
92
  "@commitlint/cli": "17.x",
89
- "@commitlint/config-angular": "^17.0.0",
90
- "@jest/transform": "^28.1.1",
91
- "@jest/types": "^28.1.1",
93
+ "@commitlint/config-angular": "^17.0.3",
94
+ "@jest/transform": "^28.1.3",
95
+ "@jest/types": "^28.1.3",
92
96
  "@types/babel__core": "7.x",
93
97
  "@types/cross-spawn": "latest",
94
98
  "@types/fs-extra": "latest",
@@ -104,13 +108,13 @@
104
108
  "@types/semver": "latest",
105
109
  "@types/yargs": "latest",
106
110
  "@types/yargs-parser": "21.x",
107
- "@typescript-eslint/eslint-plugin": "^5.27.1",
108
- "@typescript-eslint/parser": "^5.27.1",
109
- "babel-jest": "^28.1.1",
111
+ "@typescript-eslint/eslint-plugin": "^5.33.0",
112
+ "@typescript-eslint/parser": "^5.33.0",
113
+ "babel-jest": "^28.1.3",
110
114
  "conventional-changelog-cli": "2.x",
111
115
  "cross-spawn": "latest",
112
- "esbuild": "~0.14.43",
113
- "eslint": "^8.17.0",
116
+ "esbuild": "~0.15.3",
117
+ "eslint": "^8.22.0",
114
118
  "eslint-config-prettier": "latest",
115
119
  "eslint-plugin-import": "latest",
116
120
  "eslint-plugin-jest": "latest",
@@ -122,16 +126,16 @@
122
126
  "glob": "^8.0.3",
123
127
  "glob-gitignore": "latest",
124
128
  "husky": "4.x",
125
- "jest": "^28.1.1",
129
+ "jest": "^28.1.3",
126
130
  "jest-snapshot-serializer-raw": "^1.2.0",
127
131
  "js-yaml": "latest",
128
- "json-schema-to-typescript": "^10.1.5",
132
+ "json-schema-to-typescript": "^11.0.2",
129
133
  "lint-staged": "latest",
130
134
  "lodash.camelcase": "^4.3.0",
131
135
  "lodash.set": "^4.3.2",
132
- "node-fetch": "^3.2.6",
133
- "prettier": "^2.6.2",
134
- "typescript": "~4.7.3"
136
+ "node-fetch": "^3.2.10",
137
+ "prettier": "^2.7.1",
138
+ "typescript": "~4.7.4"
135
139
  },
136
140
  "lint-staged": {
137
141
  "*.{ts,tsx,js,jsx}": [
package/renovate.json DELETED
@@ -1,65 +0,0 @@
1
- {
2
- "extends": [
3
- "group:babelMonorepo",
4
- "group:commitlintMonorepo",
5
- "group:docusaurusMonorepo",
6
- ":prHourlyLimit2",
7
- "workarounds:all",
8
- "helpers:pinGitHubActionDigests"
9
- ],
10
- "timezone": "UTC",
11
- "rangeStrategy": "bump",
12
- "separateMajorMinor": true,
13
- "prConcurrentLimit": 2,
14
- "semanticCommits": "enabled",
15
- "commitMessagePrefix": "build(deps):",
16
- "ignorePaths": ["examples/react-app"],
17
- "ignoreDeps": [
18
- "@mdx-js/react",
19
- "@types/react",
20
- "execa",
21
- "chalk",
22
- "husky"
23
- ],
24
- "packageRules": [
25
- {
26
- "matchPaths": ["examples/**"],
27
- "matchUpdateTypes": ["major"],
28
- "enabled": false
29
- },
30
- {
31
- "matchPaths": ["examples/react-app"],
32
- "enabled": false
33
- },
34
- {
35
- "matchPaths": ["package.json"],
36
- "matchPackagePatterns": ["jest"],
37
- "excludePackageNames": ["eslint-plugin-jest"],
38
- "matchUpdateTypes": ["patch", "minor"],
39
- "groupName": "Jest packages"
40
- },
41
- {
42
- "extends": ["packages:eslint"],
43
- "groupName": "ESLint packages"
44
- },
45
- {
46
- "matchPackagePrefixes": ["esbuild"],
47
- "groupName": "Esbuild packages"
48
- },
49
- {
50
- "matchFiles": ["package.json"],
51
- "matchDepTypes": ["dependencies", "optionalDependencies"],
52
- "rangeStrategy": "in-range-only"
53
- },
54
- {
55
- "matchPaths": ["e2e/**"],
56
- "matchPackagePatterns": ["react"],
57
- "groupName": "React e2e packages",
58
- "enabled": true
59
- },
60
- {
61
- "matchDepTypes": ["peerDependencies"],
62
- "enabled": false
63
- }
64
- ]
65
- }