@nx/angular 20.5.0-canary.20250214-ef08108 → 21.0.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/package.json +8 -8
- package/src/builders/dev-server/dev-server.impl.js +1 -2
- package/src/builders/dev-server/lib/normalize-options.js +0 -1
- package/src/builders/dev-server/schema.d.ts +0 -1
- package/src/builders/dev-server/schema.json +0 -5
- package/src/builders/webpack-browser/schema.d.ts +1 -3
- package/src/builders/webpack-browser/schema.json +0 -5
- package/src/builders/webpack-browser/webpack-browser.impl.js +2 -3
- package/src/generators/add-linting/add-linting.js +15 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/angular",
|
3
|
-
"version": "
|
3
|
+
"version": "21.0.0-beta.1",
|
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": "
|
75
|
-
"@nx/js": "
|
76
|
-
"@nx/eslint": "
|
77
|
-
"@nx/webpack": "
|
78
|
-
"@nx/module-federation": "
|
79
|
-
"@nx/web": "
|
80
|
-
"@nx/workspace": "
|
74
|
+
"@nx/devkit": "21.0.0-beta.1",
|
75
|
+
"@nx/js": "21.0.0-beta.1",
|
76
|
+
"@nx/eslint": "21.0.0-beta.1",
|
77
|
+
"@nx/webpack": "21.0.0-beta.1",
|
78
|
+
"@nx/module-federation": "21.0.0-beta.1",
|
79
|
+
"@nx/web": "21.0.0-beta.1",
|
80
|
+
"@nx/workspace": "21.0.0-beta.1",
|
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(',')}`));
|
124
124
|
}
|
125
125
|
}
|
126
126
|
if (!pathToWebpackConfig) {
|
@@ -151,7 +151,6 @@ 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;
|
155
154
|
return delegateBuilderOptions;
|
156
155
|
}
|
157
156
|
async function loadIndexHtmlFileTransformer(pathToIndexFileTransformer, tsConfig, context, isUsingWebpackBuilder) {
|
@@ -156,11 +156,6 @@
|
|
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
|
164
159
|
}
|
165
160
|
},
|
166
161
|
"additionalProperties": false,
|
@@ -6,10 +6,8 @@ export type BrowserBuilderSchema = Schema & {
|
|
6
6
|
};
|
7
7
|
indexHtmlTransformer?: string;
|
8
8
|
buildLibsFromSource?: boolean;
|
9
|
-
watchDependencies?: boolean;
|
10
|
-
|
11
9
|
/**
|
12
|
-
* @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx
|
10
|
+
* @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx 20.
|
13
11
|
*/
|
14
12
|
indexFileTransformer?: string;
|
15
13
|
};
|
@@ -464,11 +464,6 @@
|
|
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
|
472
467
|
}
|
473
468
|
},
|
474
469
|
"additionalProperties": false,
|
@@ -25,8 +25,7 @@ function shouldSkipInitialTargetRun(projectGraph, project, target) {
|
|
25
25
|
}
|
26
26
|
function executeWebpackBrowserBuilder(options, context) {
|
27
27
|
options.buildLibsFromSource ??= true;
|
28
|
-
|
29
|
-
const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer, indexFileTransformer, watchDependencies, ...delegateBuilderOptions } = options;
|
28
|
+
const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer, indexFileTransformer, ...delegateBuilderOptions } = options;
|
30
29
|
process.env.NX_BUILD_LIBS_FROM_SOURCE = `${buildLibsFromSource}`;
|
31
30
|
process.env.NX_BUILD_TARGET = (0, devkit_1.targetToTargetString)({ ...context.target });
|
32
31
|
const pathToWebpackConfig = customWebpackConfig?.path &&
|
@@ -62,7 +61,7 @@ function executeWebpackBrowserBuilder(options, context) {
|
|
62
61
|
const skipInitialRun = shouldSkipInitialTargetRun(projectGraph, context.target.project, context.target.target);
|
63
62
|
baseWebpackConfig.plugins.push(
|
64
63
|
// @ts-expect-error - difference between angular and webpack plugin definitions bc of webpack versions
|
65
|
-
new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${context.target.target} --projects=${workspaceDependencies.join(',')}`,
|
64
|
+
new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${context.target.target} --projects=${workspaceDependencies.join(',')}`, skipInitialRun));
|
66
65
|
}
|
67
66
|
}
|
68
67
|
if (!pathToWebpackConfig) {
|
@@ -61,6 +61,21 @@ 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
|
+
}
|
64
79
|
}
|
65
80
|
else {
|
66
81
|
(0, eslint_file_1.replaceOverridesInLintConfig)(tree, options.projectRoot, [
|