@nx/angular 20.5.0-beta.1 → 20.5.0-beta.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.
- package/package.json +8 -8
- package/src/builders/dev-server/dev-server.impl.js +2 -1
- package/src/builders/dev-server/lib/normalize-options.js +1 -0
- package/src/builders/dev-server/schema.d.ts +1 -0
- package/src/builders/dev-server/schema.json +5 -0
- package/src/builders/webpack-browser/schema.d.ts +3 -1
- package/src/builders/webpack-browser/schema.json +5 -0
- package/src/builders/webpack-browser/webpack-browser.impl.js +3 -2
- package/src/generators/add-linting/add-linting.js +0 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "20.5.0-beta.
|
|
3
|
+
"version": "20.5.0-beta.3",
|
|
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": {
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"semver": "^7.5.3",
|
|
72
72
|
"tslib": "^2.3.0",
|
|
73
73
|
"webpack-merge": "^5.8.0",
|
|
74
|
-
"@nx/devkit": "20.5.0-beta.
|
|
75
|
-
"@nx/js": "20.5.0-beta.
|
|
76
|
-
"@nx/eslint": "20.5.0-beta.
|
|
77
|
-
"@nx/webpack": "20.5.0-beta.
|
|
78
|
-
"@nx/module-federation": "20.5.0-beta.
|
|
79
|
-
"@nx/web": "20.5.0-beta.
|
|
80
|
-
"@nx/workspace": "20.5.0-beta.
|
|
74
|
+
"@nx/devkit": "20.5.0-beta.3",
|
|
75
|
+
"@nx/js": "20.5.0-beta.3",
|
|
76
|
+
"@nx/eslint": "20.5.0-beta.3",
|
|
77
|
+
"@nx/webpack": "20.5.0-beta.3",
|
|
78
|
+
"@nx/module-federation": "20.5.0-beta.3",
|
|
79
|
+
"@nx/web": "20.5.0-beta.3",
|
|
80
|
+
"@nx/workspace": "20.5.0-beta.3",
|
|
81
81
|
"piscina": "^4.4.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
@@ -120,7 +120,7 @@ function executeDevServerBuilder(rawOptions, context) {
|
|
|
120
120
|
if (workspaceDependencies.length > 0) {
|
|
121
121
|
baseWebpackConfig.plugins.push(
|
|
122
122
|
// @ts-expect-error - difference between angular and webpack plugin definitions bc of webpack versions
|
|
123
|
-
new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}
|
|
123
|
+
new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }));
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
if (!pathToWebpackConfig) {
|
|
@@ -151,6 +151,7 @@ function getDelegateBuilderOptions(options) {
|
|
|
151
151
|
}
|
|
152
152
|
// delete extra option not supported by the delegate builder
|
|
153
153
|
delete delegateBuilderOptions.buildLibsFromSource;
|
|
154
|
+
delete delegateBuilderOptions.watchDependencies;
|
|
154
155
|
return delegateBuilderOptions;
|
|
155
156
|
}
|
|
156
157
|
async function loadIndexHtmlFileTransformer(pathToIndexFileTransformer, tsConfig, context, isUsingWebpackBuilder) {
|
|
@@ -156,6 +156,11 @@
|
|
|
156
156
|
"type": "string",
|
|
157
157
|
"description": "The path to the middleware function. Relative to the workspace root."
|
|
158
158
|
}
|
|
159
|
+
},
|
|
160
|
+
"watchDependencies": {
|
|
161
|
+
"type": "boolean",
|
|
162
|
+
"description": "Watch buildable dependencies and rebuild when they change.",
|
|
163
|
+
"default": true
|
|
159
164
|
}
|
|
160
165
|
},
|
|
161
166
|
"additionalProperties": false,
|
|
@@ -6,8 +6,10 @@ export type BrowserBuilderSchema = Schema & {
|
|
|
6
6
|
};
|
|
7
7
|
indexHtmlTransformer?: string;
|
|
8
8
|
buildLibsFromSource?: boolean;
|
|
9
|
+
watchDependencies?: boolean;
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
|
-
* @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx
|
|
12
|
+
* @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx 21.
|
|
11
13
|
*/
|
|
12
14
|
indexFileTransformer?: string;
|
|
13
15
|
};
|
|
@@ -464,6 +464,11 @@
|
|
|
464
464
|
"type": "boolean",
|
|
465
465
|
"description": "Read buildable libraries from source instead of building them separately.",
|
|
466
466
|
"default": true
|
|
467
|
+
},
|
|
468
|
+
"watchDependencies": {
|
|
469
|
+
"type": "boolean",
|
|
470
|
+
"description": "Watch buildable dependencies and rebuild when they change.",
|
|
471
|
+
"default": true
|
|
467
472
|
}
|
|
468
473
|
},
|
|
469
474
|
"additionalProperties": false,
|
|
@@ -25,7 +25,8 @@ function shouldSkipInitialTargetRun(projectGraph, project, target) {
|
|
|
25
25
|
}
|
|
26
26
|
function executeWebpackBrowserBuilder(options, context) {
|
|
27
27
|
options.buildLibsFromSource ??= true;
|
|
28
|
-
|
|
28
|
+
options.watchDependencies ??= true;
|
|
29
|
+
const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer, indexFileTransformer, watchDependencies, ...delegateBuilderOptions } = options;
|
|
29
30
|
process.env.NX_BUILD_LIBS_FROM_SOURCE = `${buildLibsFromSource}`;
|
|
30
31
|
process.env.NX_BUILD_TARGET = (0, devkit_1.targetToTargetString)({ ...context.target });
|
|
31
32
|
const pathToWebpackConfig = customWebpackConfig?.path &&
|
|
@@ -61,7 +62,7 @@ function executeWebpackBrowserBuilder(options, context) {
|
|
|
61
62
|
const skipInitialRun = shouldSkipInitialTargetRun(projectGraph, context.target.project, context.target.target);
|
|
62
63
|
baseWebpackConfig.plugins.push(
|
|
63
64
|
// @ts-expect-error - difference between angular and webpack plugin definitions bc of webpack versions
|
|
64
|
-
new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${context.target.target} --projects=${workspaceDependencies.join(',')}`, skipInitialRun));
|
|
65
|
+
new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${context.target.target} --projects=${workspaceDependencies.join(',')}`, { skipInitialRun, skipWatchingDeps: !watchDependencies }));
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
if (!pathToWebpackConfig) {
|
|
@@ -61,21 +61,6 @@ async function addLintingGenerator(tree, options) {
|
|
|
61
61
|
files: ['*.html'],
|
|
62
62
|
rules: {},
|
|
63
63
|
});
|
|
64
|
-
if ((0, buildable_project_1.isBuildableLibraryProject)(tree, options.projectName)) {
|
|
65
|
-
(0, eslint_file_1.addOverrideToLintConfig)(tree, '', {
|
|
66
|
-
files: ['*.json'],
|
|
67
|
-
parser: 'jsonc-eslint-parser',
|
|
68
|
-
rules: {
|
|
69
|
-
'@nx/dependency-checks': [
|
|
70
|
-
'error',
|
|
71
|
-
{
|
|
72
|
-
// With flat configs, we don't want to include imports in the eslint js/cjs/mjs files to be checked
|
|
73
|
-
ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs}'],
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
64
|
}
|
|
80
65
|
else {
|
|
81
66
|
(0, eslint_file_1.replaceOverridesInLintConfig)(tree, options.projectRoot, [
|