@nx/angular 19.1.0 → 19.1.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/README.md +1 -1
- package/migrations.json +25 -0
- package/package.json +8 -8
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.js +5 -5
- package/src/builders/utilities/module-federation.d.ts +5 -4
- package/src/builders/utilities/module-federation.js +1 -1
- package/src/builders/webpack-browser/webpack-browser.impl.js +1 -7
- package/src/executors/module-federation-dev-server/lib/normalize-options.js +1 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +1 -1
- package/src/executors/module-federation-dev-server/schema.d.ts +4 -7
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.js +2 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.js +2 -2
- package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.js +2 -2
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +2 -2
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/README.md
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
|
26
26
|
|
27
|
-
This package is an [Angular plugin for Nx](https://nx.dev/
|
27
|
+
This package is an [Angular plugin for Nx](https://nx.dev/nx-api/angular).
|
28
28
|
|
29
29
|
## Getting Started
|
30
30
|
|
package/migrations.json
CHANGED
@@ -1887,6 +1887,31 @@
|
|
1887
1887
|
"alwaysAddToPackageJson": false
|
1888
1888
|
}
|
1889
1889
|
}
|
1890
|
+
},
|
1891
|
+
"19.1.2": {
|
1892
|
+
"version": "19.1.2-beta.1",
|
1893
|
+
"requires": {
|
1894
|
+
"eslint": "^8.57.0 || ^9.0.0",
|
1895
|
+
"@angular/core": ">= 18.0.0 < 19.0.0"
|
1896
|
+
},
|
1897
|
+
"packages": {
|
1898
|
+
"@angular-eslint/eslint-plugin": {
|
1899
|
+
"version": "^18.0.1",
|
1900
|
+
"alwaysAddToPackageJson": false
|
1901
|
+
},
|
1902
|
+
"@angular-eslint/eslint-plugin-template": {
|
1903
|
+
"version": "^18.0.1",
|
1904
|
+
"alwaysAddToPackageJson": false
|
1905
|
+
},
|
1906
|
+
"@angular-eslint/template-parser": {
|
1907
|
+
"version": "^18.0.1",
|
1908
|
+
"alwaysAddToPackageJson": false
|
1909
|
+
},
|
1910
|
+
"@angular-eslint/utils": {
|
1911
|
+
"version": "^18.0.1",
|
1912
|
+
"alwaysAddToPackageJson": false
|
1913
|
+
}
|
1914
|
+
}
|
1890
1915
|
}
|
1891
1916
|
}
|
1892
1917
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/angular",
|
3
|
-
"version": "19.1.
|
3
|
+
"version": "19.1.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, Playwright 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": {
|
@@ -79,14 +79,14 @@
|
|
79
79
|
"tslib": "^2.3.0",
|
80
80
|
"webpack": "^5.80.0",
|
81
81
|
"webpack-merge": "^5.8.0",
|
82
|
-
"@nx/devkit": "19.1.
|
83
|
-
"@nx/js": "19.1.
|
84
|
-
"@nx/eslint": "19.1.
|
85
|
-
"@nx/webpack": "19.1.
|
86
|
-
"@nx/web": "19.1.
|
87
|
-
"@nx/workspace": "19.1.
|
82
|
+
"@nx/devkit": "19.1.2",
|
83
|
+
"@nx/js": "19.1.2",
|
84
|
+
"@nx/eslint": "19.1.2",
|
85
|
+
"@nx/webpack": "19.1.2",
|
86
|
+
"@nx/web": "19.1.2",
|
87
|
+
"@nx/workspace": "19.1.2",
|
88
88
|
"piscina": "^4.4.0",
|
89
|
-
"@nrwl/angular": "19.1.
|
89
|
+
"@nrwl/angular": "19.1.2"
|
90
90
|
},
|
91
91
|
"peerDependencies": {
|
92
92
|
"@angular-devkit/build-angular": ">= 16.0.0 < 19.0.0",
|
@@ -31,16 +31,16 @@ function executeModuleFederationDevSSRBuilder(schema, context) {
|
|
31
31
|
else {
|
32
32
|
pathToManifestFile = (0, module_federation_1.getDynamicMfManifestFile)(project, context.workspaceRoot);
|
33
33
|
}
|
34
|
-
(0, module_federation_1.validateDevRemotes)(options, workspaceProjects);
|
35
|
-
const remotesToSkip = new Set(options.skipRemotes ?? []);
|
36
|
-
const staticRemotes = (0, module_federation_1.getStaticRemotes)(project, context, workspaceProjects, remotesToSkip);
|
37
|
-
const dynamicRemotes = (0, module_federation_1.getDynamicRemotes)(project, context, workspaceProjects, remotesToSkip, pathToManifestFile);
|
38
|
-
const remotes = [...staticRemotes, ...dynamicRemotes];
|
39
34
|
const devServeRemotes = !options.devRemotes
|
40
35
|
? []
|
41
36
|
: Array.isArray(options.devRemotes)
|
42
37
|
? options.devRemotes
|
43
38
|
: [options.devRemotes];
|
39
|
+
(0, module_federation_1.validateDevRemotes)({ devRemotes: devServeRemotes }, workspaceProjects);
|
40
|
+
const remotesToSkip = new Set(options.skipRemotes ?? []);
|
41
|
+
const staticRemotes = (0, module_federation_1.getStaticRemotes)(project, context, workspaceProjects, remotesToSkip);
|
42
|
+
const dynamicRemotes = (0, module_federation_1.getDynamicRemotes)(project, context, workspaceProjects, remotesToSkip, pathToManifestFile);
|
43
|
+
const remotes = [...staticRemotes, ...dynamicRemotes];
|
44
44
|
const remoteProcessPromises = [];
|
45
45
|
for (const remote of remotes) {
|
46
46
|
const isDev = devServeRemotes.includes(remote);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { ProjectConfiguration } from '@nx/devkit';
|
2
|
+
export type DevRemoteDefinition = string | {
|
3
|
+
remoteName: string;
|
4
|
+
configuration: string;
|
5
|
+
};
|
2
6
|
export declare function getDynamicRemotes(project: ProjectConfiguration, context: import('@angular-devkit/architect').BuilderContext, workspaceProjects: Record<string, ProjectConfiguration>, remotesToSkip: Set<string>, pathToManifestFile: string | undefined): string[];
|
3
7
|
export declare function getStaticRemotes(project: ProjectConfiguration, context: import('@angular-devkit/architect').BuilderContext, workspaceProjects: Record<string, ProjectConfiguration>, remotesToSkip: Set<string>): string[];
|
4
8
|
export declare function validateDevRemotes(options: {
|
5
|
-
devRemotes
|
6
|
-
remoteName: string;
|
7
|
-
configuration: string;
|
8
|
-
})[];
|
9
|
+
devRemotes: DevRemoteDefinition[];
|
9
10
|
}, workspaceProjects: Record<string, ProjectConfiguration>): void;
|
10
11
|
export declare function getDynamicMfManifestFile(project: ProjectConfiguration, workspaceRoot: string): string | undefined;
|
@@ -86,7 +86,7 @@ function getStaticRemotes(project, context, workspaceProjects, remotesToSkip) {
|
|
86
86
|
}
|
87
87
|
exports.getStaticRemotes = getStaticRemotes;
|
88
88
|
function validateDevRemotes(options, workspaceProjects) {
|
89
|
-
const invalidDevRemotes = options.devRemotes
|
89
|
+
const invalidDevRemotes = options.devRemotes.filter((remote) => !(typeof remote === 'string'
|
90
90
|
? workspaceProjects[remote]
|
91
91
|
: workspaceProjects[remote.remoteName])) ?? [];
|
92
92
|
if (invalidDevRemotes.length) {
|
@@ -4,7 +4,6 @@ exports.executeWebpackBrowserBuilder = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const webpack_nx_build_coordination_plugin_1 = require("@nx/webpack/src/plugins/webpack-nx-build-coordination-plugin");
|
6
6
|
const fs_1 = require("fs");
|
7
|
-
const configuration_1 = require("nx/src/config/configuration");
|
8
7
|
const operators_1 = require("nx/src/project-graph/operators");
|
9
8
|
const utils_1 = require("nx/src/tasks-runner/utils");
|
10
9
|
const path_1 = require("path");
|
@@ -13,12 +12,7 @@ const operators_2 = require("rxjs/operators");
|
|
13
12
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
14
13
|
const webpack_1 = require("../utilities/webpack");
|
15
14
|
function shouldSkipInitialTargetRun(projectGraph, project, target) {
|
16
|
-
const
|
17
|
-
const defaultDependencyConfigs = Object.entries(nxJson.targetDefaults ?? {}).reduce((acc, [targetName, dependencyConfig]) => {
|
18
|
-
acc[targetName] = dependencyConfig.dependsOn;
|
19
|
-
return acc;
|
20
|
-
}, {});
|
21
|
-
const projectDependencyConfigs = (0, utils_1.getDependencyConfigs)({ project, target }, defaultDependencyConfigs, projectGraph);
|
15
|
+
const projectDependencyConfigs = (0, utils_1.getDependencyConfigs)({ project, target }, {}, projectGraph);
|
22
16
|
// if the task runner already ran the target, skip the initial run
|
23
17
|
return projectDependencyConfigs.some((d) => d.target === target && d.projects === 'dependencies');
|
24
18
|
}
|
@@ -56,7 +56,7 @@ async function* moduleFederationDevServerExecutor(schema, context) {
|
|
56
56
|
}
|
57
57
|
(0, module_federation_2.validateDevRemotes)(options, workspaceProjects);
|
58
58
|
const moduleFederationConfig = (0, module_federation_1.getModuleFederationConfig)(project.targets.build.options.tsConfig, context.root, project.root, 'angular');
|
59
|
-
const remoteNames = options.devRemotes
|
59
|
+
const remoteNames = options.devRemotes.map((r) => typeof r === 'string' ? r : r.remoteName);
|
60
60
|
const remotes = (0, module_federation_1.getRemotes)(remoteNames, options.skipRemotes, moduleFederationConfig, {
|
61
61
|
projectName: project.name,
|
62
62
|
projectGraph: context.projectGraph,
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import type { DevRemoteDefinition } from '../../builders/utilities/module-federation';
|
2
|
+
|
1
3
|
interface BaseSchema {
|
2
4
|
port?: number;
|
3
5
|
host?: string;
|
@@ -16,13 +18,7 @@ interface BaseSchema {
|
|
16
18
|
hmr?: boolean;
|
17
19
|
watch?: boolean;
|
18
20
|
poll?: number;
|
19
|
-
devRemotes?:
|
20
|
-
| string
|
21
|
-
| {
|
22
|
-
remoteName: string;
|
23
|
-
configuration: string;
|
24
|
-
}
|
25
|
-
)[];
|
21
|
+
devRemotes?: DevRemoteDefinition[];
|
26
22
|
skipRemotes?: string[];
|
27
23
|
pathToManifestFile?: string;
|
28
24
|
static?: boolean;
|
@@ -43,6 +39,7 @@ export type SchemaWithBuildTarget = BaseSchema & {
|
|
43
39
|
export type Schema = SchemaWithBrowserTarget | SchemaWithBuildTarget;
|
44
40
|
|
45
41
|
export type NormalizedSchema = SchemaWithBuildTarget & {
|
42
|
+
devRemotes: DevRemoteDefinition[];
|
46
43
|
liveReload: boolean;
|
47
44
|
open: boolean;
|
48
45
|
ssl: boolean;
|
package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.js
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
9
|
exports.NX_DEFAULT_OPTIONS_PROVIDER = exports.nxProvideOptions = exports.NX_OPTIONS_TOKEN = void 0;
|
10
10
|
const tslib_1 = require("tslib");
|
11
|
-
const
|
11
|
+
const find_cache_dir_1 = tslib_1.__importDefault(require("find-cache-dir"));
|
12
12
|
const injection_js_1 = require("injection-js");
|
13
13
|
const os_1 = require("os");
|
14
14
|
const path_1 = require("path");
|
@@ -31,5 +31,5 @@ function normalizeOptions(options = {}) {
|
|
31
31
|
}
|
32
32
|
function findCachePath() {
|
33
33
|
const name = 'ng-packagr';
|
34
|
-
return
|
34
|
+
return (0, find_cache_dir_1.default)({ name }) || (0, path_1.resolve)((0, os_1.tmpdir)(), name);
|
35
35
|
}
|
package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.js
CHANGED
@@ -15,7 +15,7 @@ const cache_1 = require("ng-packagr/lib/utils/cache");
|
|
15
15
|
const log = tslib_1.__importStar(require("ng-packagr/lib/utils/log"));
|
16
16
|
const path_1 = require("path");
|
17
17
|
const autoprefixer_1 = tslib_1.__importDefault(require("autoprefixer"));
|
18
|
-
const
|
18
|
+
const postcss_url_1 = tslib_1.__importDefault(require("postcss-url"));
|
19
19
|
const node_url_1 = require("node:url");
|
20
20
|
const tailwindcss_1 = require("../../../../utilities/ng-packagr/tailwindcss");
|
21
21
|
const postcss = require('postcss');
|
@@ -135,7 +135,7 @@ class StylesheetProcessor {
|
|
135
135
|
postCssPlugins.push((0, tailwindcss_1.getTailwindPostCssPlugin)(tailwindSetup));
|
136
136
|
}
|
137
137
|
if (this.cssUrl !== CssUrl.none) {
|
138
|
-
postCssPlugins.push(
|
138
|
+
postCssPlugins.push((0, postcss_url_1.default)({ url: this.cssUrl }));
|
139
139
|
}
|
140
140
|
postCssPlugins.push((0, autoprefixer_1.default)({
|
141
141
|
ignoreUnknownVersions: true,
|
@@ -8,7 +8,7 @@
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
9
|
exports.NX_DEFAULT_OPTIONS_PROVIDER = exports.nxProvideOptions = exports.NX_OPTIONS_TOKEN = void 0;
|
10
10
|
const tslib_1 = require("tslib");
|
11
|
-
const
|
11
|
+
const find_cache_dir_1 = tslib_1.__importDefault(require("find-cache-dir"));
|
12
12
|
const injection_js_1 = require("injection-js");
|
13
13
|
const os_1 = require("os");
|
14
14
|
const path_1 = require("path");
|
@@ -31,5 +31,5 @@ function normalizeOptions(options = {}) {
|
|
31
31
|
}
|
32
32
|
function findCachePath() {
|
33
33
|
const name = 'ng-packagr';
|
34
|
-
return
|
34
|
+
return (0, find_cache_dir_1.default)({ name }) || (0, path_1.resolve)((0, os_1.tmpdir)(), name);
|
35
35
|
}
|
@@ -15,7 +15,7 @@ const cache_1 = require("ng-packagr/lib/utils/cache");
|
|
15
15
|
const log = tslib_1.__importStar(require("ng-packagr/lib/utils/log"));
|
16
16
|
const path_1 = require("path");
|
17
17
|
const autoprefixer_1 = tslib_1.__importDefault(require("autoprefixer"));
|
18
|
-
const
|
18
|
+
const postcss_url_1 = tslib_1.__importDefault(require("postcss-url"));
|
19
19
|
const node_url_1 = require("node:url");
|
20
20
|
const tailwindcss_1 = require("../../../utilities/ng-packagr/tailwindcss");
|
21
21
|
const postcss = require('postcss');
|
@@ -128,7 +128,7 @@ class StylesheetProcessor {
|
|
128
128
|
postCssPlugins.push((0, tailwindcss_1.getTailwindPostCssPlugin)(tailwindSetup));
|
129
129
|
}
|
130
130
|
if (this.cssUrl !== CssUrl.none) {
|
131
|
-
postCssPlugins.push(
|
131
|
+
postCssPlugins.push((0, postcss_url_1.default)({ url: this.cssUrl }));
|
132
132
|
}
|
133
133
|
postCssPlugins.push((0, autoprefixer_1.default)({
|
134
134
|
ignoreUnknownVersions: true,
|
package/src/utils/versions.d.ts
CHANGED
@@ -13,7 +13,7 @@ export declare const expressVersion = "~4.18.2";
|
|
13
13
|
export declare const typesExpressVersion = "4.17.14";
|
14
14
|
export declare const browserSyncVersion = "^3.0.0";
|
15
15
|
export declare const moduleFederationNodeVersion = "~1.0.5";
|
16
|
-
export declare const angularEslintVersion = "
|
16
|
+
export declare const angularEslintVersion = "^18.0.1";
|
17
17
|
export declare const tailwindVersion = "^3.0.2";
|
18
18
|
export declare const postcssVersion = "^8.4.5";
|
19
19
|
export declare const postcssUrlVersion = "~10.1.3";
|
package/src/utils/versions.js
CHANGED
@@ -16,7 +16,7 @@ exports.expressVersion = '~4.18.2';
|
|
16
16
|
exports.typesExpressVersion = '4.17.14';
|
17
17
|
exports.browserSyncVersion = '^3.0.0';
|
18
18
|
exports.moduleFederationNodeVersion = '~1.0.5';
|
19
|
-
exports.angularEslintVersion = '
|
19
|
+
exports.angularEslintVersion = '^18.0.1';
|
20
20
|
exports.tailwindVersion = '^3.0.2';
|
21
21
|
exports.postcssVersion = '^8.4.5';
|
22
22
|
exports.postcssUrlVersion = '~10.1.3';
|