Comparing version 29.1.2 to 29.1.3
@@ -8,3 +8,2 @@ import type { SyncTransformer, TransformedSource } from '@jest/transform'; | ||
protected _compiler: CompilerInstance; | ||
private _tsResolvedModulesCachePath; | ||
private _transformCfgStr; | ||
@@ -33,6 +32,2 @@ private _depGraphs; | ||
getCacheKeyAsync(sourceText: string, sourcePath: string, transformOptions: TsJestTransformOptions): Promise<string>; | ||
/** | ||
* Subclasses extends `TsJestTransformer` can call this method to get resolved module disk cache | ||
*/ | ||
private _getFsCachedResolvedModules; | ||
} |
@@ -120,3 +120,2 @@ "use strict"; | ||
this._depGraphs = ccs.depGraphs; | ||
this._tsResolvedModulesCachePath = ccs.tsResolvedModulesCachePath; | ||
this._watchMode = ccs.watchMode; | ||
@@ -137,3 +136,2 @@ configSet = ccs.configSet; | ||
this._depGraphs = serializedCcs.depGraphs; | ||
this._tsResolvedModulesCachePath = serializedCcs.tsResolvedModulesCachePath; | ||
this._watchMode = serializedCcs.watchMode; | ||
@@ -159,3 +157,2 @@ configSet = serializedCcs.configSet; | ||
this._createCompiler(configSet, cacheFS); | ||
this._getFsCachedResolvedModules(configSet); | ||
this._watchMode = process.argv.includes('--watch'); | ||
@@ -168,3 +165,2 @@ TsJestTransformer._cachedConfigSets.push({ | ||
depGraphs: this._depGraphs, | ||
tsResolvedModulesCachePath: this._tsResolvedModulesCachePath, | ||
watchMode: this._watchMode, | ||
@@ -326,3 +322,3 @@ }); | ||
]; | ||
if (!configs.isolatedModules && this._tsResolvedModulesCachePath) { | ||
if (!configs.isolatedModules && configs.tsCacheDir) { | ||
var resolvedModuleNames = void 0; | ||
@@ -343,3 +339,2 @@ if (((_b = this._depGraphs.get(filePath)) === null || _b === void 0 ? void 0 : _b.fileContent) === fileContent) { | ||
}); | ||
(0, fs_1.writeFileSync)(this._tsResolvedModulesCachePath, (0, utils_1.stringify)(__spreadArray([], __read(this._depGraphs), false))); | ||
} | ||
@@ -360,18 +355,2 @@ resolvedModuleNames.forEach(function (moduleName) { | ||
/** | ||
* Subclasses extends `TsJestTransformer` can call this method to get resolved module disk cache | ||
*/ | ||
TsJestTransformer.prototype._getFsCachedResolvedModules = function (configSet) { | ||
var cacheDir = configSet.tsCacheDir; | ||
if (!configSet.isolatedModules && cacheDir) { | ||
// Make sure the cache directory exists before continuing. | ||
(0, fs_1.mkdirSync)(cacheDir, { recursive: true }); | ||
this._tsResolvedModulesCachePath = path_1.default.join(cacheDir, (0, sha1_1.sha1)('ts-jest-resolved-modules', exports.CACHE_KEY_EL_SEPARATOR)); | ||
try { | ||
var cachedTSResolvedModules = (0, fs_1.readFileSync)(this._tsResolvedModulesCachePath, 'utf-8'); | ||
this._depGraphs = new Map((0, utils_1.parse)(cachedTSResolvedModules)); | ||
} | ||
catch (e) { } | ||
} | ||
}; | ||
/** | ||
* cache ConfigSet between test runs | ||
@@ -378,0 +357,0 @@ * |
{ | ||
"name": "ts-jest", | ||
"version": "29.1.2", | ||
"version": "29.1.3", | ||
"main": "dist/index.js", | ||
@@ -65,2 +65,3 @@ "types": "dist/index.d.ts", | ||
"@babel/core": ">=7.0.0-beta.0 <8", | ||
"@jest/transform": "^29.0.0", | ||
"@jest/types": "^29.0.0", | ||
@@ -75,2 +76,5 @@ "babel-jest": "^29.0.0", | ||
}, | ||
"@jest/transform": { | ||
"optional": true | ||
}, | ||
"@jest/types": { | ||
@@ -96,13 +100,13 @@ "optional": true | ||
"@commitlint/config-angular": "^17.6.5", | ||
"@jest/transform": "^29.5.0", | ||
"@jest/types": "^29.5.0", | ||
"@types/babel__core": "7.x", | ||
"@jest/transform": "^29.7.0", | ||
"@jest/types": "^29.6.3", | ||
"@types/babel__core": "7.20.5", | ||
"@types/cross-spawn": "latest", | ||
"@types/fs-extra": "latest", | ||
"@types/js-yaml": "latest", | ||
"@types/lodash.camelcase": "4.x", | ||
"@types/lodash.memoize": "4.x", | ||
"@types/lodash.set": "4.x", | ||
"@types/micromatch": "4.x", | ||
"@types/node": "18.16.18", | ||
"@types/lodash.camelcase": "4.3.9", | ||
"@types/lodash.memoize": "4.1.9", | ||
"@types/lodash.set": "4.3.9", | ||
"@types/micromatch": "4.0.7", | ||
"@types/node": "18.19.33", | ||
"@types/react": "18.x", | ||
@@ -112,7 +116,7 @@ "@types/rimraf": "^3.0.2", | ||
"@types/yargs": "latest", | ||
"@types/yargs-parser": "21.x", | ||
"@typescript-eslint/eslint-plugin": "^5.60.0", | ||
"@typescript-eslint/parser": "^5.60.0", | ||
"babel-jest": "^29.5.0", | ||
"conventional-changelog-cli": "2.x", | ||
"@types/yargs-parser": "21.0.3", | ||
"@typescript-eslint/eslint-plugin": "^5.62.0", | ||
"@typescript-eslint/parser": "^5.62.0", | ||
"babel-jest": "^29.7.0", | ||
"conventional-changelog-cli": "2.2.2", | ||
"cross-spawn": "latest", | ||
@@ -132,3 +136,3 @@ "esbuild": "~0.17.19", | ||
"husky": "4.x", | ||
"jest": "^29.5.0", | ||
"jest": "^29.7.0", | ||
"jest-snapshot-serializer-raw": "^1.2.0", | ||
@@ -151,4 +155,4 @@ "js-yaml": "latest", | ||
"engines": { | ||
"node": "^16.10.0 || ^18.0.0 || >=20.0.0" | ||
"node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
307020
14
4113