@nx/angular 18.2.0-beta.0 → 18.2.0-beta.2

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2023 Narwhal Technologies Inc.
3
+ Copyright (c) 2017-2024 Narwhal Technologies Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "18.2.0-beta.0",
3
+ "version": "18.2.0-beta.2",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -78,14 +78,14 @@
78
78
  "tslib": "^2.3.0",
79
79
  "webpack": "^5.80.0",
80
80
  "webpack-merge": "^5.8.0",
81
- "@nx/devkit": "18.2.0-beta.0",
82
- "@nx/js": "18.2.0-beta.0",
83
- "@nx/eslint": "18.2.0-beta.0",
84
- "@nx/webpack": "18.2.0-beta.0",
85
- "@nx/web": "18.2.0-beta.0",
86
- "@nx/workspace": "18.2.0-beta.0",
81
+ "@nx/devkit": "18.2.0-beta.2",
82
+ "@nx/js": "18.2.0-beta.2",
83
+ "@nx/eslint": "18.2.0-beta.2",
84
+ "@nx/webpack": "18.2.0-beta.2",
85
+ "@nx/web": "18.2.0-beta.2",
86
+ "@nx/workspace": "18.2.0-beta.2",
87
87
  "piscina": "^4.4.0",
88
- "@nrwl/angular": "18.2.0-beta.0"
88
+ "@nrwl/angular": "18.2.0-beta.2"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "@angular-devkit/build-angular": ">= 15.0.0 < 18.0.0",
@@ -26,10 +26,10 @@ export declare class StylesheetProcessor {
26
26
  private createRenderWorker;
27
27
  }
28
28
  /**
29
- * This class is used when ng-packagr version is greater than or equal to 17.2.0 and less than 17.3.0.
30
- * The async `loadPostcssConfiguration` function introduced in ng-packagr 17.2.x causes a memory leak
31
- * due to multiple workers being created. We must keep this class to support any workspace that might
32
- * be using ng-packagr 17.2.x where that function need to be awaited.
29
+ * This class is used when ng-packagr version is 17.2.0. The async `loadPostcssConfiguration` function
30
+ * introduced in ng-packagr 17.2.0 causes a memory leak due to multiple workers being created. We must
31
+ * keep this class to support any workspace that might be using ng-packagr 17.2.0 where that function
32
+ * need to be awaited.
33
33
  */
34
34
  export declare class AsyncStylesheetProcessor {
35
35
  private readonly projectBasePath;
@@ -2,14 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.STYLESHEET_PROCESSOR = void 0;
4
4
  const stylesheet_processor_di_1 = require("ng-packagr/lib/styles/stylesheet-processor.di");
5
- const semver_1 = require("semver");
6
5
  const angular_version_utils_1 = require("../angular-version-utils");
7
6
  const stylesheet_processor_1 = require("./stylesheet-processor");
8
7
  exports.STYLESHEET_PROCESSOR = {
9
8
  provide: stylesheet_processor_di_1.STYLESHEET_PROCESSOR_TOKEN,
10
9
  useFactory: () => {
11
10
  const { version: ngPackagrVersion } = (0, angular_version_utils_1.getInstalledPackageVersionInfo)('ng-packagr');
12
- return (0, semver_1.lt)(ngPackagrVersion, '17.2.0') || (0, semver_1.gte)(ngPackagrVersion, '17.3.0')
11
+ return ngPackagrVersion !== '17.2.0'
13
12
  ? stylesheet_processor_1.StylesheetProcessor
14
13
  : stylesheet_processor_1.AsyncStylesheetProcessor;
15
14
  },
@@ -100,10 +100,10 @@ class StylesheetProcessor {
100
100
  }
101
101
  exports.StylesheetProcessor = StylesheetProcessor;
102
102
  /**
103
- * This class is used when ng-packagr version is greater than or equal to 17.2.0 and less than 17.3.0.
104
- * The async `loadPostcssConfiguration` function introduced in ng-packagr 17.2.x causes a memory leak
105
- * due to multiple workers being created. We must keep this class to support any workspace that might
106
- * be using ng-packagr 17.2.x where that function need to be awaited.
103
+ * This class is used when ng-packagr version is 17.2.0. The async `loadPostcssConfiguration` function
104
+ * introduced in ng-packagr 17.2.0 causes a memory leak due to multiple workers being created. We must
105
+ * keep this class to support any workspace that might be using ng-packagr 17.2.0 where that function
106
+ * need to be awaited.
107
107
  */
108
108
  class AsyncStylesheetProcessor {
109
109
  constructor(projectBasePath, basePath, cssUrl, includePaths, cacheDirectory) {
@@ -151,7 +151,7 @@ class AsyncStylesheetProcessor {
151
151
  const browserslistData = browserslist(undefined, { path: this.basePath });
152
152
  const { version: ngPackagrVersion } = (0, angular_version_utils_1.getInstalledPackageVersionInfo)('ng-packagr');
153
153
  let postcssConfiguration;
154
- if ((0, semver_1.gte)(ngPackagrVersion, '17.2.0')) {
154
+ if (ngPackagrVersion === '17.2.0') {
155
155
  const { loadPostcssConfiguration } = await Promise.resolve().then(() => require('ng-packagr/lib/styles/postcss-configuration'));
156
156
  postcssConfiguration = await loadPostcssConfiguration(this.projectBasePath);
157
157
  }
@@ -71,6 +71,7 @@ function addFileServerTarget(tree, options, targetName) {
71
71
  staticFilePath: isUsingApplicationBuilder
72
72
  ? (0, devkit_1.joinPathFragments)(options.outputPath, 'browser')
73
73
  : undefined,
74
+ spa: true,
74
75
  },
75
76
  };
76
77
  (0, devkit_1.updateProjectConfiguration)(tree, options.name, projectConfig);