@nx/angular 23.1.0 → 23.2.0-beta.1
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/dist/src/builders/dev-server/dev-server.impl.js +15 -8
- package/dist/src/builders/webpack-browser/webpack-browser.impl.js +11 -7
- package/dist/src/builders/webpack-server/webpack-server.impl.js +8 -4
- package/dist/src/executors/application/application.impl.js +1 -1
- package/dist/src/executors/extract-i18n/extract-i18n.impl.js +1 -1
- package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +7 -5
- package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +6 -5
- package/dist/src/executors/unit-test/unit-test.impl.js +1 -1
- package/dist/src/executors/utilities/builder-package.d.ts +1 -1
- package/dist/src/executors/utilities/builder-package.js +10 -4
- package/dist/src/generators/setup-mf/lib/setup-tspath-for-remote.js +3 -2
- package/dist/src/generators/setup-mf/setup-mf.js +2 -0
- package/dist/src/generators/setup-ssr/lib/add-dependencies.d.ts +1 -1
- package/dist/src/generators/setup-ssr/lib/add-dependencies.js +6 -1
- package/dist/src/generators/setup-ssr/lib/normalize-options.js +15 -3
- package/dist/src/generators/setup-ssr/lib/update-project-config.js +1 -1
- package/dist/src/generators/setup-ssr/schema.d.ts +2 -0
- package/dist/src/generators/setup-ssr/setup-ssr.js +1 -1
- package/dist/src/migrations/update-23-1-0/add-angular-build.md +1 -1
- package/dist/src/migrations/update-23-1-0/add-optional-webpack-packages.d.ts +2 -0
- package/dist/src/migrations/update-23-1-0/add-optional-webpack-packages.js +101 -0
- package/dist/src/migrations/update-23-1-0/add-optional-webpack-packages.md +39 -0
- package/dist/tailwind.d.ts +1 -1
- package/dist/tailwind.js +2 -2
- package/migrations.json +6 -0
- package/package.json +25 -13
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.executeDevServerBuilder = executeDevServerBuilder;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const js_1 = require("@nx/js");
|
|
6
|
-
const internal_1 = require("@nx/webpack/internal");
|
|
7
6
|
const fs_1 = require("fs");
|
|
8
7
|
const configuration_1 = require("nx/src/config/configuration");
|
|
9
8
|
const operators_1 = require("nx/src/project-graph/operators");
|
|
@@ -15,7 +14,6 @@ const builder_package_1 = require("../../executors/utilities/builder-package");
|
|
|
15
14
|
const esbuild_extensions_1 = require("../../executors/utilities/esbuild-extensions");
|
|
16
15
|
const patch_builder_context_1 = require("../../executors/utilities/patch-builder-context");
|
|
17
16
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
18
|
-
const webpack_1 = require("../utilities/webpack");
|
|
19
17
|
const lib_1 = require("./lib");
|
|
20
18
|
function executeDevServerBuilder(rawOptions, context) {
|
|
21
19
|
(0, lib_1.validateOptions)(rawOptions);
|
|
@@ -102,7 +100,7 @@ function executeDevServerBuilder(rawOptions, context) {
|
|
|
102
100
|
* handle `@nx/angular:*` executors.
|
|
103
101
|
*/
|
|
104
102
|
(0, patch_builder_context_1.patchBuilderContext)(context, !isUsingWebpackBuilder, parsedBuildTarget);
|
|
105
|
-
(0, builder_package_1.
|
|
103
|
+
(0, builder_package_1.assertPackageIsInstalled)('@angular-devkit/build-angular', '@nx/angular:dev-server');
|
|
106
104
|
return (0, rxjs_1.combineLatest)([
|
|
107
105
|
(0, rxjs_1.from)(import('@angular-devkit/build-angular')),
|
|
108
106
|
(0, rxjs_1.from)((0, esbuild_extensions_1.loadPlugins)(buildTargetOptions.plugins, buildTargetOptions.tsConfig)),
|
|
@@ -120,14 +118,19 @@ function executeDevServerBuilder(rawOptions, context) {
|
|
|
120
118
|
// run the target for all projects.
|
|
121
119
|
// This will occur when workspaceDependencies = []
|
|
122
120
|
if (workspaceDependencies.length > 0) {
|
|
123
|
-
|
|
121
|
+
(0, builder_package_1.assertPackageIsInstalled)('@nx/webpack', '@nx/angular:dev-server');
|
|
122
|
+
const { WebpackNxBuildCoordinationPlugin } = await import('@nx/webpack/internal');
|
|
123
|
+
baseWebpackConfig.plugins.push(new WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }) // TODO(Colum): this can be removed when angular 20.2 is merged
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
if (!pathToWebpackConfig) {
|
|
128
128
|
return baseWebpackConfig;
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
(0, builder_package_1.assertPackageIsInstalled)('@nx/webpack', '@nx/angular:dev-server');
|
|
131
|
+
(0, builder_package_1.assertPackageIsInstalled)('webpack-merge', '@nx/angular:dev-server');
|
|
132
|
+
const { mergeCustomWebpackConfig } = await import('../utilities/webpack.js');
|
|
133
|
+
return mergeCustomWebpackConfig(baseWebpackConfig, pathToWebpackConfig, buildTargetOptions, context.target);
|
|
131
134
|
}
|
|
132
135
|
: undefined,
|
|
133
136
|
...(indexHtmlTransformer
|
|
@@ -154,7 +157,11 @@ async function loadIndexHtmlFileTransformer(pathToIndexFileTransformer, tsConfig
|
|
|
154
157
|
if (!pathToIndexFileTransformer) {
|
|
155
158
|
return undefined;
|
|
156
159
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
if (isUsingWebpackBuilder) {
|
|
161
|
+
(0, builder_package_1.assertPackageIsInstalled)('@nx/webpack', '@nx/angular:dev-server');
|
|
162
|
+
(0, builder_package_1.assertPackageIsInstalled)('webpack-merge', '@nx/angular:dev-server');
|
|
163
|
+
const { resolveIndexHtmlTransformer } = await import('../utilities/webpack.js');
|
|
164
|
+
return resolveIndexHtmlTransformer(pathToIndexFileTransformer, tsConfig, context.target);
|
|
165
|
+
}
|
|
166
|
+
return (0, esbuild_extensions_1.loadIndexHtmlTransformer)(pathToIndexFileTransformer, tsConfig);
|
|
160
167
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.executeWebpackBrowserBuilder = executeWebpackBrowserBuilder;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const internal_1 = require("@nx/webpack/internal");
|
|
6
5
|
const fs_1 = require("fs");
|
|
7
6
|
const operators_1 = require("nx/src/project-graph/operators");
|
|
8
7
|
const utils_1 = require("nx/src/tasks-runner/utils");
|
|
@@ -11,7 +10,6 @@ const rxjs_1 = require("rxjs");
|
|
|
11
10
|
const operators_2 = require("rxjs/operators");
|
|
12
11
|
const builder_package_1 = require("../../executors/utilities/builder-package");
|
|
13
12
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
14
|
-
const webpack_1 = require("../utilities/webpack");
|
|
15
13
|
// This is required to ensure that the webpack version used by the Module Federation is the same as the one used by the builders.
|
|
16
14
|
const Module = require('module');
|
|
17
15
|
const originalResolveFilename = Module._resolveFilename;
|
|
@@ -41,6 +39,7 @@ function shouldSkipInitialTargetRun(projectGraph, project, target) {
|
|
|
41
39
|
return projectDependencyConfigs.some((d) => d.target === target && d.projects === 'dependencies');
|
|
42
40
|
}
|
|
43
41
|
function executeWebpackBrowserBuilder(options, context) {
|
|
42
|
+
(0, builder_package_1.assertPackageIsInstalled)('@nx/webpack', '@nx/angular:webpack-browser');
|
|
44
43
|
options.buildLibsFromSource ??= true;
|
|
45
44
|
options.watchDependencies ??= true;
|
|
46
45
|
const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer, watchDependencies, ...delegateBuilderOptions } = options;
|
|
@@ -64,8 +63,13 @@ function executeWebpackBrowserBuilder(options, context) {
|
|
|
64
63
|
dependencies = foundDependencies;
|
|
65
64
|
delegateBuilderOptions.tsConfig = (0, devkit_1.normalizePath)((0, path_1.relative)(context.workspaceRoot, tsConfigPath));
|
|
66
65
|
}
|
|
67
|
-
(0, builder_package_1.
|
|
68
|
-
|
|
66
|
+
(0, builder_package_1.assertPackageIsInstalled)('@angular-devkit/build-angular', '@nx/angular:webpack-browser');
|
|
67
|
+
(0, builder_package_1.assertPackageIsInstalled)('webpack-merge', '@nx/angular:webpack-browser');
|
|
68
|
+
return (0, rxjs_1.from)(Promise.all([
|
|
69
|
+
import('@angular-devkit/build-angular'),
|
|
70
|
+
import('@nx/webpack/internal'),
|
|
71
|
+
import('../utilities/webpack.js'),
|
|
72
|
+
])).pipe((0, operators_2.switchMap)(([{ executeBrowserBuilder }, { WebpackNxBuildCoordinationPlugin }, { mergeCustomWebpackConfig, resolveIndexHtmlTransformer },]) => executeBrowserBuilder(delegateBuilderOptions, context, {
|
|
69
73
|
webpackConfiguration: (baseWebpackConfig) => {
|
|
70
74
|
if (!buildLibsFromSource && delegateBuilderOptions.watch) {
|
|
71
75
|
const workspaceDependencies = dependencies
|
|
@@ -79,17 +83,17 @@ function executeWebpackBrowserBuilder(options, context) {
|
|
|
79
83
|
const skipInitialRun = shouldSkipInitialTargetRun(projectGraph, context.target.project, context.target.target);
|
|
80
84
|
baseWebpackConfig.plugins.push(
|
|
81
85
|
// Cast away the angular/webpack plugin type difference (webpack versions).
|
|
82
|
-
new
|
|
86
|
+
new WebpackNxBuildCoordinationPlugin(`nx run-many --target=${context.target.target} --projects=${workspaceDependencies.join(',')}`, { skipInitialRun, skipWatchingDeps: !watchDependencies }));
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
89
|
if (!pathToWebpackConfig) {
|
|
86
90
|
return baseWebpackConfig;
|
|
87
91
|
}
|
|
88
|
-
return
|
|
92
|
+
return mergeCustomWebpackConfig(baseWebpackConfig, pathToWebpackConfig, delegateBuilderOptions, context.target);
|
|
89
93
|
},
|
|
90
94
|
...(pathToIndexFileTransformer
|
|
91
95
|
? {
|
|
92
|
-
indexHtml:
|
|
96
|
+
indexHtml: resolveIndexHtmlTransformer(pathToIndexFileTransformer, delegateBuilderOptions.tsConfig, context.target),
|
|
93
97
|
}
|
|
94
98
|
: {}),
|
|
95
99
|
})));
|
|
@@ -8,7 +8,6 @@ const rxjs_1 = require("rxjs");
|
|
|
8
8
|
const operators_1 = require("rxjs/operators");
|
|
9
9
|
const builder_package_1 = require("../../executors/utilities/builder-package");
|
|
10
10
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
11
|
-
const webpack_1 = require("../utilities/webpack");
|
|
12
11
|
// This is required to ensure that the webpack version used by the Module Federation is the same as the one used by the builders.
|
|
13
12
|
const Module = require('module');
|
|
14
13
|
const originalResolveFilename = Module._resolveFilename;
|
|
@@ -26,7 +25,7 @@ Module._resolveFilename = function (request, parent, isMain, options) {
|
|
|
26
25
|
return originalResolveFilename.call(this, request, parent, isMain, options);
|
|
27
26
|
};
|
|
28
27
|
function buildServerApp(options, context) {
|
|
29
|
-
(0, builder_package_1.
|
|
28
|
+
(0, builder_package_1.assertPackageIsInstalled)('@angular-devkit/build-angular', '@nx/angular:webpack-server');
|
|
30
29
|
const { buildLibsFromSource, customWebpackConfig, ...delegateOptions } = options;
|
|
31
30
|
// If there is a path to custom webpack config
|
|
32
31
|
// Invoke our own support for custom webpack config
|
|
@@ -42,7 +41,11 @@ function buildServerApp(options, context) {
|
|
|
42
41
|
return (0, rxjs_1.from)(import('@angular-devkit/build-angular')).pipe((0, operators_1.switchMap)(({ executeServerBuilder }) => executeServerBuilder(delegateOptions, context)));
|
|
43
42
|
}
|
|
44
43
|
function buildServerAppWithCustomWebpackConfiguration(options, context, pathToWebpackConfig) {
|
|
45
|
-
|
|
44
|
+
(0, builder_package_1.assertPackageIsInstalled)('webpack-merge', '@nx/angular:webpack-server');
|
|
45
|
+
return (0, rxjs_1.from)(Promise.all([
|
|
46
|
+
import('@angular-devkit/build-angular'),
|
|
47
|
+
import('../utilities/webpack.js'),
|
|
48
|
+
])).pipe((0, operators_1.switchMap)(([{ executeServerBuilder }, { mergeCustomWebpackConfig }]) => executeServerBuilder(options, context, {
|
|
46
49
|
webpackConfiguration: async (baseWebpackConfig) => {
|
|
47
50
|
// Angular auto includes code from @angular/platform-server
|
|
48
51
|
// This includes the code outside the shared scope created by ModuleFederation
|
|
@@ -50,7 +53,7 @@ function buildServerAppWithCustomWebpackConfiguration(options, context, pathToWe
|
|
|
50
53
|
// maintaining it within the shared scope.
|
|
51
54
|
// Therefore, if the build is an MF Server build, remove the auto-includes from
|
|
52
55
|
// the base webpack config from Angular
|
|
53
|
-
let mergedConfig = await
|
|
56
|
+
let mergedConfig = await mergeCustomWebpackConfig(baseWebpackConfig, pathToWebpackConfig, options, context.target);
|
|
54
57
|
if (mergedConfig.target === 'async-node') {
|
|
55
58
|
mergedConfig.entry.main = mergedConfig.entry.main.filter((m) => !m.startsWith('@angular/platform-server/init'));
|
|
56
59
|
mergedConfig.module.rules = mergedConfig.module.rules.filter((m) => !m.loader
|
|
@@ -62,6 +65,7 @@ function buildServerAppWithCustomWebpackConfiguration(options, context, pathToWe
|
|
|
62
65
|
})));
|
|
63
66
|
}
|
|
64
67
|
function executeWebpackServerBuilder(options, context) {
|
|
68
|
+
(0, builder_package_1.assertPackageIsInstalled)('@nx/webpack', '@nx/angular:webpack-server');
|
|
65
69
|
options.buildLibsFromSource ??= true;
|
|
66
70
|
process.env.NX_BUILD_LIBS_FROM_SOURCE = `${options.buildLibsFromSource}`;
|
|
67
71
|
process.env.NX_BUILD_TARGET = (0, devkit_1.targetToTargetString)({ ...context.target });
|
|
@@ -25,7 +25,7 @@ async function* applicationExecutor(options, context) {
|
|
|
25
25
|
description: 'Build an application.',
|
|
26
26
|
optionSchema: require('./schema.json'),
|
|
27
27
|
}, context);
|
|
28
|
-
(0, builder_package_1.
|
|
28
|
+
(0, builder_package_1.assertPackageIsInstalled)('@angular/build', '@nx/angular:application');
|
|
29
29
|
const { buildApplication } = await import('@angular/build');
|
|
30
30
|
return yield* buildApplication(delegateExecutorOptions, builderContext, {
|
|
31
31
|
codePlugins: plugins,
|
|
@@ -29,7 +29,7 @@ async function* extractI18nExecutor(options, context) {
|
|
|
29
29
|
* handle `@nx/angular:*` executors.
|
|
30
30
|
*/
|
|
31
31
|
(0, patch_builder_context_1.patchBuilderContext)(builderContext, isUsingEsbuildBuilder, parsedBuildTarget);
|
|
32
|
-
(0, builder_package_1.
|
|
32
|
+
(0, builder_package_1.assertPackageIsInstalled)('@angular-devkit/build-angular', '@nx/angular:extract-i18n');
|
|
33
33
|
const { executeExtractI18nBuilder } = await import('@angular-devkit/build-angular');
|
|
34
34
|
return await executeExtractI18nBuilder(options, builderContext);
|
|
35
35
|
}
|
package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js
CHANGED
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.moduleFederationDevServerExecutor = moduleFederationDevServerExecutor;
|
|
4
4
|
const internal_1 = require("@nx/devkit/internal");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const builder_package_1 = require("../utilities/builder-package");
|
|
6
7
|
const lib_1 = require("./lib");
|
|
7
|
-
const internal_2 = require("@nx/
|
|
8
|
-
const internal_3 = require("@nx/web/internal");
|
|
8
|
+
const internal_2 = require("@nx/web/internal");
|
|
9
9
|
const ngcli_adapter_1 = require("nx/src/adapter/ngcli-adapter");
|
|
10
10
|
const dev_server_impl_1 = require("../../builders/dev-server/dev-server.impl");
|
|
11
11
|
const module_federation_1 = require("../../builders/utilities/module-federation");
|
|
@@ -29,12 +29,14 @@ Module._resolveFilename = function (request, parent, isMain, options) {
|
|
|
29
29
|
return originalResolveFilename.call(this, request, parent, isMain, options);
|
|
30
30
|
};
|
|
31
31
|
async function* moduleFederationDevServerExecutor(schema, context) {
|
|
32
|
+
(0, builder_package_1.assertPackageIsInstalled)('@nx/module-federation', '@nx/angular:module-federation-dev-server');
|
|
33
|
+
const { startRemoteIterators } = await import('@nx/module-federation/internal');
|
|
32
34
|
(0, module_federation_deprecation_1.warnAngularMfDevServerExecutorDeprecation)();
|
|
33
35
|
const options = (0, lib_1.normalizeOptions)(schema);
|
|
34
36
|
const { projects: workspaceProjects } = (0, devkit_1.readProjectsConfigurationFromProjectGraph)(context.projectGraph);
|
|
35
37
|
const project = workspaceProjects[context.projectName];
|
|
36
38
|
const currIter = options.static
|
|
37
|
-
? (0,
|
|
39
|
+
? (0, internal_2.fileServerExecutor)({
|
|
38
40
|
port: options.port,
|
|
39
41
|
host: options.host,
|
|
40
42
|
ssl: options.ssl,
|
|
@@ -68,7 +70,7 @@ async function* moduleFederationDevServerExecutor(schema, context) {
|
|
|
68
70
|
pathToManifestFile = userPathToManifestFile;
|
|
69
71
|
}
|
|
70
72
|
(0, module_federation_1.validateDevRemotes)(options, workspaceProjects);
|
|
71
|
-
const { remotes, staticRemotesIter, devRemoteIters } = await
|
|
73
|
+
const { remotes, staticRemotesIter, devRemoteIters } = await startRemoteIterators(options, context, lib_1.startRemotes, pathToManifestFile, 'angular');
|
|
72
74
|
const removeBaseUrlEmission = (iter) => (0, internal_1.mapAsyncIterable)(iter, (v) => ({
|
|
73
75
|
...v,
|
|
74
76
|
baseUrl: undefined,
|
|
@@ -88,7 +90,7 @@ async function* moduleFederationDevServerExecutor(schema, context) {
|
|
|
88
90
|
const portsToWaitFor = staticRemotesIter
|
|
89
91
|
? [options.staticRemotesPort, ...remotes.remotePorts]
|
|
90
92
|
: [...remotes.remotePorts];
|
|
91
|
-
await Promise.all(portsToWaitFor.map((port) => (0,
|
|
93
|
+
await Promise.all(portsToWaitFor.map((port) => (0, internal_2.waitForPortOpen)(port, {
|
|
92
94
|
retries: 480,
|
|
93
95
|
retryDelay: 2500,
|
|
94
96
|
host: 'localhost',
|
package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js
CHANGED
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.moduleFederationSsrDevServerExecutor = moduleFederationSsrDevServerExecutor;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const internal_1 = require("@nx/devkit/internal");
|
|
6
|
-
const internal_2 = require("@nx/
|
|
7
|
-
const internal_3 = require("@nx/web/internal");
|
|
6
|
+
const internal_2 = require("@nx/web/internal");
|
|
8
7
|
const fs_1 = require("fs");
|
|
9
8
|
const ngcli_adapter_1 = require("nx/src/adapter/ngcli-adapter");
|
|
10
9
|
const project_graph_1 = require("nx/src/project-graph/project-graph");
|
|
@@ -31,9 +30,11 @@ Module._resolveFilename = function (request, parent, isMain, options) {
|
|
|
31
30
|
return originalResolveFilename.call(this, request, parent, isMain, options);
|
|
32
31
|
};
|
|
33
32
|
async function* moduleFederationSsrDevServerExecutor(schema, context) {
|
|
33
|
+
(0, builder_package_1.assertPackageIsInstalled)('@nx/module-federation', '@nx/angular:module-federation-dev-ssr');
|
|
34
|
+
const { startRemoteIterators } = await import('@nx/module-federation/internal');
|
|
34
35
|
(0, module_federation_deprecation_1.warnAngularMfDevSsrExecutorDeprecation)();
|
|
35
36
|
const options = (0, normalize_options_1.normalizeOptions)(schema);
|
|
36
|
-
(0, builder_package_1.
|
|
37
|
+
(0, builder_package_1.assertPackageIsInstalled)('@angular-devkit/build-angular', '@nx/angular:module-federation-dev-ssr');
|
|
37
38
|
const { executeSSRDevServerBuilder } = await import('@angular-devkit/build-angular');
|
|
38
39
|
const currIter = (0, internal_1.eachValueFrom)(executeSSRDevServerBuilder(options, await (0, ngcli_adapter_1.createBuilderContext)({
|
|
39
40
|
builderName: '@nx/angular:webpack-server',
|
|
@@ -60,7 +61,7 @@ async function* moduleFederationSsrDevServerExecutor(schema, context) {
|
|
|
60
61
|
pathToManifestFile = (0, module_federation_1.getDynamicMfManifestFile)(project, context.root);
|
|
61
62
|
}
|
|
62
63
|
(0, module_federation_1.validateDevRemotes)({ devRemotes: options.devRemotes }, workspaceProjects);
|
|
63
|
-
const { remotes, staticRemotesIter, devRemoteIters } = await
|
|
64
|
+
const { remotes, staticRemotesIter, devRemoteIters } = await startRemoteIterators(options, context, start_dev_remotes_1.startRemotes, pathToManifestFile, 'angular', true);
|
|
64
65
|
const removeBaseUrlEmission = (iter) => (0, internal_1.mapAsyncIterable)(iter, (v) => ({
|
|
65
66
|
...v,
|
|
66
67
|
baseUrl: undefined,
|
|
@@ -80,7 +81,7 @@ async function* moduleFederationSsrDevServerExecutor(schema, context) {
|
|
|
80
81
|
const portsToWaitFor = staticRemotesIter && options.staticRemotesPort
|
|
81
82
|
? [options.staticRemotesPort, ...remotes.remotePorts]
|
|
82
83
|
: [...remotes.remotePorts];
|
|
83
|
-
await Promise.all(portsToWaitFor.map((port) => (0,
|
|
84
|
+
await Promise.all(portsToWaitFor.map((port) => (0, internal_2.waitForPortOpen)(port, {
|
|
84
85
|
retries: 480,
|
|
85
86
|
retryDelay: 2500,
|
|
86
87
|
host: 'localhost',
|
|
@@ -22,7 +22,7 @@ async function* unitTestExecutor(options, context) {
|
|
|
22
22
|
const buildTargetSpecifier = options.buildTarget ?? `::development`;
|
|
23
23
|
const buildTarget = (0, targets_1.targetFromTargetString)(buildTargetSpecifier, context.projectName, 'build');
|
|
24
24
|
patchBuilderContext(builderContext, buildTarget);
|
|
25
|
-
(0, builder_package_1.
|
|
25
|
+
(0, builder_package_1.assertPackageIsInstalled)('@angular/build', '@nx/angular:unit-test');
|
|
26
26
|
const { executeUnitTestBuilder } = await import('@angular/build');
|
|
27
27
|
return yield* executeUnitTestBuilder(delegateExecutorOptions, builderContext, {
|
|
28
28
|
codePlugins: plugins,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function assertPackageIsInstalled(packageName: string, requiredBy: string): void;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.assertPackageIsInstalled = assertPackageIsInstalled;
|
|
4
|
+
function assertPackageIsInstalled(packageName, requiredBy) {
|
|
5
5
|
try {
|
|
6
6
|
require.resolve(packageName);
|
|
7
7
|
}
|
|
8
|
-
catch {
|
|
9
|
-
|
|
8
|
+
catch (e) {
|
|
9
|
+
// Only a missing module means "not installed"; surface other resolution
|
|
10
|
+
// errors (e.g. a malformed package's exports) as-is instead of mislabeling.
|
|
11
|
+
const code = e.code;
|
|
12
|
+
if (code !== 'MODULE_NOT_FOUND' && code !== 'ERR_MODULE_NOT_FOUND') {
|
|
13
|
+
throw e;
|
|
14
|
+
}
|
|
15
|
+
throw new Error(`The "${packageName}" package is required by "${requiredBy}" but is not installed. Please install it and try again.`);
|
|
10
16
|
}
|
|
11
17
|
}
|
|
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.setupTspathForRemote = setupTspathForRemote;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const js_1 = require("@nx/js");
|
|
6
|
-
const
|
|
6
|
+
const versions_1 = require("../../../utils/versions");
|
|
7
7
|
function setupTspathForRemote(tree, options) {
|
|
8
|
+
const { normalizeProjectName } = (0, devkit_1.ensurePackage)('@nx/module-federation', versions_1.nxVersion);
|
|
8
9
|
const project = (0, devkit_1.readProjectConfiguration)(tree, options.appName);
|
|
9
10
|
const exportPath = options.standalone
|
|
10
11
|
? `./src/app/remote-entry/entry.routes.ts`
|
|
11
12
|
: `./src/app/remote-entry/${options.entryModuleFileName}.ts`;
|
|
12
13
|
const exportName = options.standalone ? 'Routes' : 'Module';
|
|
13
|
-
(0, js_1.addTsConfigPath)(tree, `${
|
|
14
|
+
(0, js_1.addTsConfigPath)(tree, `${normalizeProjectName(options.appName)}/${exportName}`, [(0, devkit_1.joinPathFragments)(project.root, exportPath)]);
|
|
14
15
|
}
|
|
@@ -27,6 +27,7 @@ async function setupMf(tree, rawOptions) {
|
|
|
27
27
|
}, {
|
|
28
28
|
'@nx/web': versions_1.nxVersion,
|
|
29
29
|
'@nx/webpack': versions_1.nxVersion,
|
|
30
|
+
'webpack-merge': versions_1.webpackMergeVersion,
|
|
30
31
|
'@nx/module-federation': versions_1.nxVersion,
|
|
31
32
|
}));
|
|
32
33
|
}
|
|
@@ -50,6 +51,7 @@ async function setupMf(tree, rawOptions) {
|
|
|
50
51
|
if (!options.skipPackageJson) {
|
|
51
52
|
tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
52
53
|
'@nx/webpack': versions_1.nxVersion,
|
|
54
|
+
'webpack-merge': versions_1.webpackMergeVersion,
|
|
53
55
|
'@module-federation/enhanced': versions_1.moduleFederationEnhancedVersion,
|
|
54
56
|
'@nx/module-federation': versions_1.nxVersion,
|
|
55
57
|
}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type Tree } from '@nx/devkit';
|
|
2
|
-
export declare function addDependencies(tree: Tree, isUsingApplicationBuilder: boolean): void;
|
|
2
|
+
export declare function addDependencies(tree: Tree, isUsingApplicationBuilder: boolean, isUsingWebpackBuilder: boolean): void;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addDependencies = addDependencies;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const versions_1 = require("../../../utils/versions");
|
|
5
6
|
const version_utils_1 = require("../../utils/version-utils");
|
|
6
|
-
function addDependencies(tree, isUsingApplicationBuilder) {
|
|
7
|
+
function addDependencies(tree, isUsingApplicationBuilder, isUsingWebpackBuilder) {
|
|
7
8
|
const pkgVersions = (0, version_utils_1.versions)(tree);
|
|
8
9
|
const dependencies = {
|
|
9
10
|
'@angular/platform-server': (0, devkit_1.getDependencyVersionFromPackageJson)(tree, '@angular/platform-server') ??
|
|
@@ -18,6 +19,10 @@ function addDependencies(tree, isUsingApplicationBuilder) {
|
|
|
18
19
|
dependencies['@angular/ssr'] = angularDevkitVersion;
|
|
19
20
|
if (!isUsingApplicationBuilder) {
|
|
20
21
|
devDependencies['browser-sync'] = pkgVersions.browserSyncVersion;
|
|
22
|
+
if (isUsingWebpackBuilder) {
|
|
23
|
+
devDependencies['@nx/webpack'] = versions_1.nxVersion;
|
|
24
|
+
devDependencies['webpack-merge'] = pkgVersions.webpackMergeVersion;
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
else {
|
|
23
28
|
dependencies['@angular-devkit/build-angular'] = angularDevkitVersion;
|
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
6
|
const ast_utils_1 = require("../../../utils/nx-devkit/ast-utils");
|
|
6
7
|
async function normalizeOptions(tree, options) {
|
|
7
8
|
const { targets, root } = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
// Resolve the executor via targetDefaults: readProjectConfiguration returns
|
|
10
|
+
// the raw config, so an inherited executor would otherwise read as undefined.
|
|
11
|
+
const buildTargetExecutor = targets.build.executor ??
|
|
12
|
+
(0, internal_1.readTargetDefaultsForTarget)('build', (0, devkit_1.readNxJson)(tree)?.targetDefaults)
|
|
13
|
+
?.executor;
|
|
14
|
+
if (!buildTargetExecutor) {
|
|
15
|
+
throw new Error(`The "build" target of the "${options.project}" project does not specify an executor. Please add an executor to the "build" target.`);
|
|
16
|
+
}
|
|
17
|
+
const isUsingApplicationBuilder = buildTargetExecutor === '@angular-devkit/build-angular:application' ||
|
|
18
|
+
buildTargetExecutor === '@angular/build:application' ||
|
|
19
|
+
buildTargetExecutor === '@nx/angular:application';
|
|
20
|
+
const isUsingWebpackBuilder = buildTargetExecutor === '@nx/angular:webpack-browser';
|
|
11
21
|
const isStandaloneApp = (0, ast_utils_1.isNgStandaloneApp)(tree, options.project);
|
|
12
22
|
return {
|
|
13
23
|
project: options.project,
|
|
@@ -21,6 +31,8 @@ async function normalizeOptions(tree, options) {
|
|
|
21
31
|
standalone: options.standalone ?? isStandaloneApp,
|
|
22
32
|
hydration: options.hydration ?? true,
|
|
23
33
|
isUsingApplicationBuilder,
|
|
34
|
+
isUsingWebpackBuilder,
|
|
35
|
+
buildTargetExecutor,
|
|
24
36
|
buildTargetTsConfigPath: targets.build.options?.tsConfig ??
|
|
25
37
|
(0, devkit_1.joinPathFragments)(root, 'tsconfig.app.json'),
|
|
26
38
|
};
|
|
@@ -54,7 +54,7 @@ function updateProjectConfigForBrowserBuilder(tree, options) {
|
|
|
54
54
|
const sourceRoot = (0, internal_2.getProjectSourceRoot)(projectConfig, tree);
|
|
55
55
|
projectConfig.targets.server = {
|
|
56
56
|
dependsOn: ['build'],
|
|
57
|
-
executor:
|
|
57
|
+
executor: options.buildTargetExecutor.startsWith('@angular-devkit/build-angular:')
|
|
58
58
|
? '@angular-devkit/build-angular:server'
|
|
59
59
|
: '@nx/angular:webpack-server',
|
|
60
60
|
options: {
|
|
@@ -9,7 +9,7 @@ async function setupSsr(tree, schema) {
|
|
|
9
9
|
(0, lib_1.validateOptions)(tree, schema);
|
|
10
10
|
const options = await (0, lib_1.normalizeOptions)(tree, schema);
|
|
11
11
|
if (!schema.skipPackageJson) {
|
|
12
|
-
(0, lib_1.addDependencies)(tree, options.isUsingApplicationBuilder);
|
|
12
|
+
(0, lib_1.addDependencies)(tree, options.isUsingApplicationBuilder, options.isUsingWebpackBuilder);
|
|
13
13
|
}
|
|
14
14
|
(0, lib_1.generateSSRFiles)(tree, options);
|
|
15
15
|
if (options.hydration) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#### Add `@angular/build` When Used by an Executor
|
|
2
2
|
|
|
3
|
-
The `@nx/angular:application` and `@nx/angular:unit-test` executors load the Angular builders by importing `@angular/build` directly, and any `@angular/build:*` executor is provided by that package, so `@angular/build` is a required runtime dependency for workspaces using those targets. Nothing declares it as a direct dependency, though: it has only ever been available transitively as a dependency of `@angular-devkit/build-angular`. That is not reliable (for example, under Yarn Berry it can be missing from `node_modules` even when `@angular-devkit/build-angular` is installed), and when `@angular/build` cannot be resolved the build fails with
|
|
3
|
+
The `@nx/angular:application` and `@nx/angular:unit-test` executors load the Angular builders by importing `@angular/build` directly, and any `@angular/build:*` executor is provided by that package, so `@angular/build` is a required runtime dependency for workspaces using those targets. Nothing declares it as a direct dependency, though: it has only ever been available transitively as a dependency of `@angular-devkit/build-angular`. That is not reliable (for example, under Yarn Berry it can be missing from `node_modules` even when `@angular-devkit/build-angular` is installed), and when `@angular/build` cannot be resolved the build fails with an error like `The "@angular/build" package is required by "@nx/angular:application" but is not installed`. This migration adds `@angular/build` to `devDependencies` when a project uses one of those executors and it is not already installed, at the version the application generator installs. An existing version is preserved.
|
|
4
4
|
|
|
5
5
|
Executor usage is detected on any target using `@nx/angular:application`, `@nx/angular:unit-test`, or an `@angular/build:*` executor. Targets that inherit their executor from an `nx.json` `targetDefaults` entry are detected too.
|
|
6
6
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = addOptionalWebpackPackages;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
|
+
const versions_1 = require("../../utils/versions");
|
|
7
|
+
const webpackExecutors = new Set([
|
|
8
|
+
'@nx/angular:webpack-browser',
|
|
9
|
+
'@nx/angular:webpack-server',
|
|
10
|
+
]);
|
|
11
|
+
const webpackBuildTargetExecutors = new Set([
|
|
12
|
+
'@nx/angular:webpack-browser',
|
|
13
|
+
'@angular-devkit/build-angular:browser',
|
|
14
|
+
]);
|
|
15
|
+
const moduleFederationExecutors = new Set([
|
|
16
|
+
'@nx/angular:module-federation-dev-server',
|
|
17
|
+
'@nx/angular:module-federation-dev-ssr',
|
|
18
|
+
]);
|
|
19
|
+
function resolveBuildTargetExecutor(targetString, projects, targetDefaults) {
|
|
20
|
+
const [projectName, targetName] = targetString.split(':');
|
|
21
|
+
const target = targetName
|
|
22
|
+
? projects.get(projectName)?.targets?.[targetName]
|
|
23
|
+
: undefined;
|
|
24
|
+
if (target === undefined) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
// The referenced build target can inherit its executor from targetDefaults,
|
|
28
|
+
// which the raw project config does not merge, so resolve it before matching.
|
|
29
|
+
return (target.executor ??
|
|
30
|
+
(0, internal_1.readTargetDefaultsForTarget)(targetName, targetDefaults)?.executor);
|
|
31
|
+
}
|
|
32
|
+
function usesWebpackDevServer(target, projects, targetDefaults) {
|
|
33
|
+
if (target.executor !== '@nx/angular:dev-server') {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return [target.options, ...Object.values(target.configurations ?? {})].some((options) => {
|
|
37
|
+
const buildTarget = options?.buildTarget ?? options?.browserTarget;
|
|
38
|
+
if (typeof buildTarget !== 'string') {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
const executor = resolveBuildTargetExecutor(buildTarget, projects, targetDefaults);
|
|
42
|
+
return (executor !== undefined && webpackBuildTargetExecutors.has(executor));
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async function addOptionalWebpackPackages(tree) {
|
|
46
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
47
|
+
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
48
|
+
const targetDefaults = nxJson?.targetDefaults;
|
|
49
|
+
let needsWebpack = false;
|
|
50
|
+
let needsModuleFederation = false;
|
|
51
|
+
let needsRspack = false;
|
|
52
|
+
for (const [, project] of projects) {
|
|
53
|
+
for (const target of Object.values(project.targets ?? {})) {
|
|
54
|
+
needsWebpack ||=
|
|
55
|
+
webpackExecutors.has(target.executor) ||
|
|
56
|
+
usesWebpackDevServer(target, projects, targetDefaults);
|
|
57
|
+
needsModuleFederation ||= moduleFederationExecutors.has(target.executor);
|
|
58
|
+
needsRspack ||= target.executor?.startsWith('@nx/rspack:') ?? false;
|
|
59
|
+
}
|
|
60
|
+
// Remotes get a plain dev-server (no Module Federation executor) but still
|
|
61
|
+
// generate a module-federation.config that requires @nx/module-federation
|
|
62
|
+
// at build time, so detect them by that config file too. This covers
|
|
63
|
+
// remotes whose host lives in a different workspace.
|
|
64
|
+
needsModuleFederation ||=
|
|
65
|
+
tree.exists((0, devkit_1.joinPathFragments)(project.root, 'module-federation.config.ts')) ||
|
|
66
|
+
tree.exists((0, devkit_1.joinPathFragments)(project.root, 'module-federation.config.js'));
|
|
67
|
+
}
|
|
68
|
+
// targetDefaults are keyed by target name or executor, and a default can set
|
|
69
|
+
// an executor that an empty project target inherits, so scan the keys and any
|
|
70
|
+
// executor on the default (both the object and array forms).
|
|
71
|
+
for (const [targetOrExecutor, config] of Object.entries(targetDefaults ?? {})) {
|
|
72
|
+
const executors = [targetOrExecutor];
|
|
73
|
+
for (const entry of Array.isArray(config) ? config : [config]) {
|
|
74
|
+
if (entry.executor != null) {
|
|
75
|
+
executors.push(entry.executor);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
for (const executor of executors) {
|
|
79
|
+
needsWebpack ||= webpackExecutors.has(executor);
|
|
80
|
+
needsModuleFederation ||= moduleFederationExecutors.has(executor);
|
|
81
|
+
needsRspack ||= executor.startsWith('@nx/rspack:');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
needsRspack ||=
|
|
85
|
+
nxJson?.plugins?.some((plugin) => typeof plugin === 'string'
|
|
86
|
+
? plugin === '@nx/rspack/plugin'
|
|
87
|
+
: plugin.plugin === '@nx/rspack/plugin') ?? false;
|
|
88
|
+
if (!needsWebpack && !needsModuleFederation && !needsRspack) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
92
|
+
...(needsWebpack
|
|
93
|
+
? {
|
|
94
|
+
'@nx/webpack': versions_1.nxVersion,
|
|
95
|
+
'webpack-merge': versions_1.webpackMergeVersion,
|
|
96
|
+
}
|
|
97
|
+
: {}),
|
|
98
|
+
...(needsModuleFederation ? { '@nx/module-federation': versions_1.nxVersion } : {}),
|
|
99
|
+
...(needsRspack ? { '@nx/rspack': versions_1.nxVersion } : {}),
|
|
100
|
+
}, undefined, true);
|
|
101
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#### Add Optional Webpack Packages
|
|
2
|
+
|
|
3
|
+
Adds `@nx/webpack`, `@nx/module-federation`, `@nx/rspack`, and `webpack-merge` to the workspace when existing targets require them.
|
|
4
|
+
|
|
5
|
+
These packages are no longer direct dependencies of `@nx/angular`; they are now optional peer dependencies, so installing `@nx/angular` no longer pulls webpack tooling into workspaces that only use the esbuild or Vite build stack. This migration backfills them for workspaces that already use webpack, Module Federation, or Rspack so those builds keep working after upgrading. Packages that are already present are left untouched.
|
|
6
|
+
|
|
7
|
+
A package is added only when a matching target exists:
|
|
8
|
+
|
|
9
|
+
- `@nx/webpack` and `webpack-merge`: an `@nx/angular:webpack-browser` or `@nx/angular:webpack-server` target, or an `@nx/angular:dev-server` whose build target uses `@nx/angular:webpack-browser` or `@angular-devkit/build-angular:browser`.
|
|
10
|
+
- `@nx/module-federation`: an `@nx/angular:module-federation-dev-server` or `@nx/angular:module-federation-dev-ssr` target, or a project with a `module-federation.config.{js,ts}` file (covers remotes whose host lives in another workspace).
|
|
11
|
+
- `@nx/rspack`: an `@nx/rspack:*` target or the `@nx/rspack/plugin` plugin in `nx.json`.
|
|
12
|
+
|
|
13
|
+
Targets that inherit their executor from an `nx.json` `targetDefaults` entry are detected too.
|
|
14
|
+
|
|
15
|
+
#### Examples
|
|
16
|
+
|
|
17
|
+
For a workspace with an `@nx/angular:webpack-browser` build target, the migration adds the webpack packages to `devDependencies`.
|
|
18
|
+
|
|
19
|
+
##### Before
|
|
20
|
+
|
|
21
|
+
```jsonc title="package.json"
|
|
22
|
+
{
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@nx/angular": "23.1.0",
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
##### After
|
|
30
|
+
|
|
31
|
+
```jsonc title="package.json"
|
|
32
|
+
{
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@nx/angular": "23.1.0",
|
|
35
|
+
"@nx/webpack": "23.1.0",
|
|
36
|
+
"webpack-merge": "^5.8.0",
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
```
|
package/dist/tailwind.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @deprecated `@nx/angular/tailwind` will be removed in Nx 24. Migrate to Tailwind CSS v4 which no longer needs glob patterns.
|
|
3
|
-
* See: https://nx.dev/docs/technologies/angular/guides/using-tailwind-css-with-angular
|
|
3
|
+
* See: https://nx.dev/docs/technologies/angular/guides/using-tailwind-css-with-angular-projects
|
|
4
4
|
*/
|
|
5
5
|
export declare function createGlobPatternsForDependencies(dirPath: string, fileGlobPattern?: string): string[];
|
package/dist/tailwind.js
CHANGED
|
@@ -5,14 +5,14 @@ const internal_1 = require("@nx/js/internal");
|
|
|
5
5
|
let hasWarned = false;
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated `@nx/angular/tailwind` will be removed in Nx 24. Migrate to Tailwind CSS v4 which no longer needs glob patterns.
|
|
8
|
-
* See: https://nx.dev/docs/technologies/angular/guides/using-tailwind-css-with-angular
|
|
8
|
+
* See: https://nx.dev/docs/technologies/angular/guides/using-tailwind-css-with-angular-projects
|
|
9
9
|
*/
|
|
10
10
|
function createGlobPatternsForDependencies(dirPath, fileGlobPattern = '/**/!(*.stories|*.spec).{ts,html}') {
|
|
11
11
|
if (!hasWarned) {
|
|
12
12
|
hasWarned = true;
|
|
13
13
|
console.warn(`\nWARNING: "@nx/angular/tailwind" is deprecated and will be removed in Nx 24.\n` +
|
|
14
14
|
`Migrate to Tailwind CSS v4 which no longer needs glob patterns for content detection.\n` +
|
|
15
|
-
`See: https://nx.dev/docs/technologies/angular/guides/using-tailwind-css-with-angular\n`);
|
|
15
|
+
`See: https://nx.dev/docs/technologies/angular/guides/using-tailwind-css-with-angular-projects\n`);
|
|
16
16
|
}
|
|
17
17
|
try {
|
|
18
18
|
return (0, internal_1.createGlobPatternsForDependencies)(dirPath, fileGlobPattern);
|
package/migrations.json
CHANGED
|
@@ -366,6 +366,12 @@
|
|
|
366
366
|
"description": "Remove the `extendedDiagnostics` Angular compiler option from tsconfig files where `strictTemplates` resolves to `false`. Angular v22's `strict-templates-default` and `strict-safe-navigation-narrow` migrations can together produce this combination, which the Angular compiler rejects (`extendedDiagnostics` requires `strictTemplates` to be enabled).",
|
|
367
367
|
"factory": "./dist/src/migrations/update-23-1-0/remove-conflicting-extended-diagnostics",
|
|
368
368
|
"documentation": "./dist/src/migrations/update-23-1-0/remove-conflicting-extended-diagnostics.md"
|
|
369
|
+
},
|
|
370
|
+
"update-23-1-0-add-optional-webpack-packages": {
|
|
371
|
+
"version": "23.1.0-rc.3",
|
|
372
|
+
"description": "Add optional webpack, Module Federation, and Rspack packages when existing targets require them.",
|
|
373
|
+
"factory": "./dist/src/migrations/update-23-1-0/add-optional-webpack-packages",
|
|
374
|
+
"documentation": "./dist/src/migrations/update-23-1-0/add-optional-webpack-packages.md"
|
|
369
375
|
}
|
|
370
376
|
},
|
|
371
377
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.2.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"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, 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.",
|
|
@@ -80,19 +80,15 @@
|
|
|
80
80
|
"picomatch": "4.0.4",
|
|
81
81
|
"semver": "^7.6.3",
|
|
82
82
|
"tslib": "^2.3.0",
|
|
83
|
-
"
|
|
84
|
-
"@nx/
|
|
85
|
-
"@nx/
|
|
86
|
-
"@nx/
|
|
87
|
-
"@nx/web": "23.1.0",
|
|
88
|
-
"@nx/js": "23.1.0",
|
|
89
|
-
"@nx/eslint": "23.1.0",
|
|
90
|
-
"@nx/webpack": "23.1.0"
|
|
83
|
+
"@nx/devkit": "23.2.0-beta.1",
|
|
84
|
+
"@nx/eslint": "23.2.0-beta.1",
|
|
85
|
+
"@nx/js": "23.2.0-beta.1",
|
|
86
|
+
"@nx/web": "23.2.0-beta.1"
|
|
91
87
|
},
|
|
92
88
|
"devDependencies": {
|
|
93
|
-
"@nx/cypress": "23.
|
|
94
|
-
"
|
|
95
|
-
"nx": "23.
|
|
89
|
+
"@nx/cypress": "23.2.0-beta.1",
|
|
90
|
+
"nx": "23.2.0-beta.1",
|
|
91
|
+
"@nx/vitest": "23.2.0-beta.1"
|
|
96
92
|
},
|
|
97
93
|
"peerDependencies": {
|
|
98
94
|
"@angular/build": ">= 20.0.0 < 23.0.0",
|
|
@@ -101,7 +97,11 @@
|
|
|
101
97
|
"@angular-devkit/schematics": ">= 20.0.0 < 23.0.0",
|
|
102
98
|
"@schematics/angular": ">= 20.0.0 < 23.0.0",
|
|
103
99
|
"ng-packagr": ">= 20.0.0 < 23.0.0",
|
|
104
|
-
"rxjs": "^6.5.3 || ^7.5.0"
|
|
100
|
+
"rxjs": "^6.5.3 || ^7.5.0",
|
|
101
|
+
"webpack-merge": "^5.8.0",
|
|
102
|
+
"@nx/module-federation": "23.2.0-beta.1",
|
|
103
|
+
"@nx/rspack": "23.2.0-beta.1",
|
|
104
|
+
"@nx/webpack": "23.2.0-beta.1"
|
|
105
105
|
},
|
|
106
106
|
"peerDependenciesMeta": {
|
|
107
107
|
"@angular/build": {
|
|
@@ -110,8 +110,20 @@
|
|
|
110
110
|
"@angular-devkit/build-angular": {
|
|
111
111
|
"optional": true
|
|
112
112
|
},
|
|
113
|
+
"@nx/module-federation": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"@nx/rspack": {
|
|
117
|
+
"optional": true
|
|
118
|
+
},
|
|
119
|
+
"@nx/webpack": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
113
122
|
"ng-packagr": {
|
|
114
123
|
"optional": true
|
|
124
|
+
},
|
|
125
|
+
"webpack-merge": {
|
|
126
|
+
"optional": true
|
|
115
127
|
}
|
|
116
128
|
},
|
|
117
129
|
"publishConfig": {
|