jest-preset-angular 16.1.2 → 16.1.3
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [16.1.3](https://github.com/thymikee/jest-preset-angular/compare/v16.1.2...v16.1.3) (2026-04-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* correct the condition to detect ng 21 when patching module resolution ([#3741](https://github.com/thymikee/jest-preset-angular/issues/3741)) ([681a8c1](https://github.com/thymikee/jest-preset-angular/commit/681a8c193f1d964ebe8dee571a221b02afb48d42))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
## [16.1.2](https://github.com/thymikee/jest-preset-angular/compare/v16.1.1...v16.1.2) (2026-03-30)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -6,7 +6,7 @@ export declare class NgJestCompiler extends TsCompiler {
|
|
|
6
6
|
constructor(configSet: ConfigSet, jestCacheFS: Map<string, string>);
|
|
7
7
|
private _patchModuleResolution;
|
|
8
8
|
private _computeNgModuleResolution;
|
|
9
|
-
private
|
|
9
|
+
private _isAnguar21ExportOnly;
|
|
10
10
|
protected _transpileOutput(fileContent: string, filePath: string): ts.TranspileOutput;
|
|
11
11
|
protected _makeTransformers(customTransformers: TsJestAstTransformer): ts.CustomTransformers;
|
|
12
12
|
}
|
|
@@ -17,7 +17,7 @@ class NgJestCompiler extends ts_jest_1.TsCompiler {
|
|
|
17
17
|
super(configSet, jestCacheFS);
|
|
18
18
|
this.configSet = configSet;
|
|
19
19
|
this.jestCacheFS = jestCacheFS;
|
|
20
|
-
if (!configSet.isolatedModules && this.
|
|
20
|
+
if (!configSet.isolatedModules && this._isAnguar21ExportOnly()) {
|
|
21
21
|
this._patchModuleResolution();
|
|
22
22
|
}
|
|
23
23
|
this._logger.debug('created NgJestCompiler');
|
|
@@ -44,9 +44,9 @@ class NgJestCompiler extends ts_jest_1.TsCompiler {
|
|
|
44
44
|
? this._ts.ModuleResolutionKind.Bundler
|
|
45
45
|
: userModuleResolution;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
_isAnguar21ExportOnly() {
|
|
48
48
|
const { resolvedModule } = this._ts.resolveModuleName('@angular/core', node_path_1.default.join(this.configSet.cwd, 'index.ts'), { moduleResolution: this._ts.ModuleResolutionKind.Node10 }, this._ts.sys);
|
|
49
|
-
return
|
|
49
|
+
return !!resolvedModule;
|
|
50
50
|
}
|
|
51
51
|
_transpileOutput(fileContent, filePath) {
|
|
52
52
|
const diagnostics = [];
|