jest-preset-angular 16.1.2 → 16.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/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [16.1.4](https://github.com/thymikee/jest-preset-angular/compare/v16.1.3...v16.1.4) (2026-04-09)
2
+
3
+
4
+ ### Chore & Maintenance
5
+
6
+ * Test OIDC publish workflow
7
+
8
+
9
+
10
+ ## [16.1.3](https://github.com/thymikee/jest-preset-angular/compare/v16.1.2...v16.1.3) (2026-04-09)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * 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))
16
+
17
+
18
+
1
19
  ## [16.1.2](https://github.com/thymikee/jest-preset-angular/compare/v16.1.1...v16.1.2) (2026-03-30)
2
20
 
3
21
 
@@ -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 _isAngularExportsOnly;
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._isAngularExportsOnly()) {
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
- _isAngularExportsOnly() {
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 !resolvedModule;
49
+ return !!resolvedModule;
50
50
  }
51
51
  _transpileOutput(fileContent, filePath) {
52
52
  const diagnostics = [];