@nx/angular 21.5.1 → 21.5.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.
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAMtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQ5D,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,EACxB,QAAQ,CAAC,EAAE,OAAO,GACjB,OAAO,CAAC,gBAAgB,CAAC,CAqD3B"}
1
+ {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAMtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAiB5D,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,EACxB,QAAQ,CAAC,EAAE,OAAO,GACjB,OAAO,CAAC,gBAAgB,CAAC,CAqD3B"}
@@ -9,6 +9,12 @@ function arePluginsExplicitlyDisabled(host) {
9
9
  const addPluginEnvVar = process.env.NX_ADD_PLUGINS;
10
10
  return useInferencePlugins === false || addPluginEnvVar === 'false';
11
11
  }
12
+ function validateBundler(bundler) {
13
+ if (['esbuild', 'webpack', 'rspack'].includes(bundler)) {
14
+ return bundler;
15
+ }
16
+ throw new Error(`Invalid bundler: ${bundler}. Please use one of the following: 'esbuild', 'webpack', 'rspack'.`);
17
+ }
12
18
  async function normalizeOptions(host, options, isRspack) {
13
19
  await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
14
20
  const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
@@ -23,7 +29,7 @@ async function normalizeOptions(host, options, isRspack) {
23
29
  const parsedTags = options.tags
24
30
  ? options.tags.split(',').map((s) => s.trim())
25
31
  : [];
26
- const bundler = options.bundler ?? 'esbuild';
32
+ const bundler = validateBundler(options.bundler ?? 'esbuild');
27
33
  const addPlugin = options.addPlugin ?? (!arePluginsExplicitlyDisabled(host) && isRspack);
28
34
  // Set defaults and then overwrite with user options
29
35
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"add-jest.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/utils/add-jest.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAIpB,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAsB,OAAO,CAC3B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,IAAI,CAAC,CAkDf"}
1
+ {"version":3,"file":"add-jest.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/utils/add-jest.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAIpB,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAsB,OAAO,CAC3B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,IAAI,CAAC,CAsDf"}
@@ -11,7 +11,11 @@ async function addJest(tree, options) {
11
11
  (0, devkit_1.addDependenciesToPackageJson)(tree, {
12
12
  // TODO(leo): jest-preset-angular still needs this until https://github.com/thymikee/jest-preset-angular/pull/3079 is merged
13
13
  '@angular/platform-browser-dynamic': pkgVersions.angularVersion,
14
- }, { 'jest-preset-angular': pkgVersions.jestPresetAngularVersion }, undefined, true);
14
+ }, {
15
+ // force jest v29.7.0, Angular doesn't support Jest v30 yet: https://github.com/angular/angular-cli/pull/30761
16
+ jest: '^29.7.0',
17
+ 'jest-preset-angular': pkgVersions.jestPresetAngularVersion,
18
+ }, undefined, true);
15
19
  }
16
20
  const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/jest', versions_1.nxVersion);
17
21
  await configurationGenerator(tree, {
@@ -23,7 +23,7 @@ export declare const postcssUrlVersion = "~10.1.3";
23
23
  export declare const autoprefixerVersion = "^10.4.0";
24
24
  export declare const tsNodeVersion = "10.9.1";
25
25
  export declare const lessVersion = "^4.3.0";
26
- export declare const jestPresetAngularVersion = "~15.0.0";
26
+ export declare const jestPresetAngularVersion = "~14.6.1";
27
27
  export declare const typesNodeVersion = "20.19.9";
28
28
  export declare const jasmineMarblesVersion = "^0.9.2";
29
29
  export declare const jsoncEslintParserVersion = "^2.1.0";
@@ -26,7 +26,7 @@ exports.postcssUrlVersion = '~10.1.3';
26
26
  exports.autoprefixerVersion = '^10.4.0';
27
27
  exports.tsNodeVersion = '10.9.1';
28
28
  exports.lessVersion = '^4.3.0';
29
- exports.jestPresetAngularVersion = '~15.0.0';
29
+ exports.jestPresetAngularVersion = '~14.6.1';
30
30
  exports.typesNodeVersion = '20.19.9';
31
31
  exports.jasmineMarblesVersion = '^0.9.2';
32
32
  exports.jsoncEslintParserVersion = '^2.1.0';