@nx/angular 20.3.0-canary.20241210-ecba861 → 20.3.0-canary.20241211-a267063
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/migrations.json +29 -0
- package/package.json +8 -8
- package/src/executors/application/utils/normalize-options.js +7 -6
- package/src/migrations/update-20-2-0/remove-angular-eslint-rules.d.ts +1 -0
- package/src/migrations/update-20-2-0/remove-angular-eslint-rules.js +42 -13
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/migrations.json
CHANGED
|
@@ -1368,6 +1368,35 @@
|
|
|
1368
1368
|
"alwaysAddToPackageJson": false
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
|
+
},
|
|
1372
|
+
"20.2.2-angular-eslint": {
|
|
1373
|
+
"version": "20.2.2-beta.0",
|
|
1374
|
+
"requires": {
|
|
1375
|
+
"eslint": "^8.57.0 || ^9.0.0",
|
|
1376
|
+
"@angular/core": ">= 19.0.0 < 20.0.0"
|
|
1377
|
+
},
|
|
1378
|
+
"packages": {
|
|
1379
|
+
"angular-eslint": {
|
|
1380
|
+
"version": "^19.0.2",
|
|
1381
|
+
"alwaysAddToPackageJson": false
|
|
1382
|
+
},
|
|
1383
|
+
"@angular-eslint/eslint-plugin": {
|
|
1384
|
+
"version": "^19.0.2",
|
|
1385
|
+
"alwaysAddToPackageJson": false
|
|
1386
|
+
},
|
|
1387
|
+
"@angular-eslint/eslint-plugin-template": {
|
|
1388
|
+
"version": "^19.0.2",
|
|
1389
|
+
"alwaysAddToPackageJson": false
|
|
1390
|
+
},
|
|
1391
|
+
"@angular-eslint/template-parser": {
|
|
1392
|
+
"version": "^19.0.2",
|
|
1393
|
+
"alwaysAddToPackageJson": false
|
|
1394
|
+
},
|
|
1395
|
+
"@angular-eslint/utils": {
|
|
1396
|
+
"version": "^19.0.2",
|
|
1397
|
+
"alwaysAddToPackageJson": false
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1371
1400
|
}
|
|
1372
1401
|
}
|
|
1373
1402
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "20.3.0-canary.
|
|
3
|
+
"version": "20.3.0-canary.20241211-a267063",
|
|
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.3.0-canary.
|
|
75
|
-
"@nx/js": "20.3.0-canary.
|
|
76
|
-
"@nx/eslint": "20.3.0-canary.
|
|
77
|
-
"@nx/webpack": "20.3.0-canary.
|
|
78
|
-
"@nx/module-federation": "20.3.0-canary.
|
|
79
|
-
"@nx/web": "20.3.0-canary.
|
|
80
|
-
"@nx/workspace": "20.3.0-canary.
|
|
74
|
+
"@nx/devkit": "20.3.0-canary.20241211-a267063",
|
|
75
|
+
"@nx/js": "20.3.0-canary.20241211-a267063",
|
|
76
|
+
"@nx/eslint": "20.3.0-canary.20241211-a267063",
|
|
77
|
+
"@nx/webpack": "20.3.0-canary.20241211-a267063",
|
|
78
|
+
"@nx/module-federation": "20.3.0-canary.20241211-a267063",
|
|
79
|
+
"@nx/web": "20.3.0-canary.20241211-a267063",
|
|
80
|
+
"@nx/workspace": "20.3.0-canary.20241211-a267063",
|
|
81
81
|
"piscina": "^4.4.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
@@ -24,10 +24,11 @@ function normalizeOptions(options) {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
27
|
+
let appShell = options.appShell;
|
|
28
|
+
let prerender = options.prerender;
|
|
29
|
+
if (angularMajorVersion < 19) {
|
|
30
|
+
appShell ??= false;
|
|
31
|
+
prerender ??= false;
|
|
32
|
+
}
|
|
33
|
+
return { ...options, appShell, prerender, security };
|
|
33
34
|
}
|
|
@@ -1,33 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rulesToRemove = void 0;
|
|
3
4
|
exports.default = default_1;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
6
7
|
const projects_1 = require("../utils/projects");
|
|
8
|
+
exports.rulesToRemove = [
|
|
9
|
+
'@angular-eslint/no-host-metadata-property',
|
|
10
|
+
'@angular-eslint/sort-ngmodule-metadata-arrays',
|
|
11
|
+
'@angular-eslint/prefer-standalone-component',
|
|
12
|
+
];
|
|
7
13
|
async function default_1(tree) {
|
|
8
14
|
const projects = await (0, projects_1.getProjectsFilteredByDependencies)(tree, [
|
|
9
15
|
'npm:@angular/core',
|
|
10
16
|
]);
|
|
17
|
+
let hasRootProject = false;
|
|
11
18
|
for (const { project: { root }, } of projects) {
|
|
12
19
|
if (!(0, eslint_file_1.isEslintConfigSupported)(tree, root)) {
|
|
13
20
|
// ESLint config is not supported, skip
|
|
14
21
|
continue;
|
|
15
22
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
if (root === '.') {
|
|
24
|
+
hasRootProject = true;
|
|
25
|
+
}
|
|
26
|
+
removeRules(tree, root);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* We need to handle both a root config file (e.g. eslint.config.js) and a
|
|
30
|
+
* potential base config file (e.g. eslint.base.config.js). We can't use
|
|
31
|
+
* `findEslintFile` because it would return only one or the other depending
|
|
32
|
+
* on whether a root is provided and the existence of the files. So, we
|
|
33
|
+
* handle each of them separately.
|
|
34
|
+
*/
|
|
35
|
+
// check root config, provide a root so it doesn't try to lookup a base config
|
|
36
|
+
if (!hasRootProject) {
|
|
37
|
+
// if there is no root project the root eslint config has not been processed
|
|
38
|
+
if ((0, eslint_file_1.isEslintConfigSupported)(tree, '')) {
|
|
39
|
+
removeRules(tree, '');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// handle root base config, not providing a root will prioritize a base config
|
|
43
|
+
const baseEslintConfig = (0, eslint_file_1.findEslintFile)(tree);
|
|
44
|
+
if (baseEslintConfig && baseEslintConfig.includes('.base.')) {
|
|
45
|
+
removeRules(tree, baseEslintConfig);
|
|
19
46
|
}
|
|
20
47
|
await (0, devkit_1.formatFiles)(tree);
|
|
21
48
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
49
|
+
function removeRules(tree, root) {
|
|
50
|
+
for (const rule of exports.rulesToRemove) {
|
|
51
|
+
const lookup = (o) => !!o.rules?.[rule];
|
|
52
|
+
if (!(0, eslint_file_1.lintConfigHasOverride)(tree, root, lookup)) {
|
|
53
|
+
// it's not using the rule, skip
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
// there is an override containing the rule, remove the rule
|
|
57
|
+
(0, eslint_file_1.updateOverrideInLintConfig)(tree, root, lookup, (o) => {
|
|
58
|
+
delete o.rules[rule];
|
|
59
|
+
return o;
|
|
60
|
+
});
|
|
27
61
|
}
|
|
28
|
-
// there is an override containing the rule, remove the rule
|
|
29
|
-
(0, eslint_file_1.updateOverrideInLintConfig)(tree, root, lookup, (o) => {
|
|
30
|
-
delete o.rules[rule];
|
|
31
|
-
return o;
|
|
32
|
-
});
|
|
33
62
|
}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const typesExpressVersion = "4.17.14";
|
|
|
14
14
|
export declare const browserSyncVersion = "^3.0.0";
|
|
15
15
|
export declare const moduleFederationNodeVersion = "~2.6.11";
|
|
16
16
|
export declare const moduleFederationEnhancedVersion = "0.7.6";
|
|
17
|
-
export declare const angularEslintVersion = "^19.0.
|
|
17
|
+
export declare const angularEslintVersion = "^19.0.2";
|
|
18
18
|
export declare const typescriptEslintVersion = "^7.16.0";
|
|
19
19
|
export declare const tailwindVersion = "^3.0.2";
|
|
20
20
|
export declare const postcssVersion = "^8.4.5";
|
package/src/utils/versions.js
CHANGED
|
@@ -17,7 +17,7 @@ exports.typesExpressVersion = '4.17.14';
|
|
|
17
17
|
exports.browserSyncVersion = '^3.0.0';
|
|
18
18
|
exports.moduleFederationNodeVersion = '~2.6.11';
|
|
19
19
|
exports.moduleFederationEnhancedVersion = '0.7.6';
|
|
20
|
-
exports.angularEslintVersion = '^19.0.
|
|
20
|
+
exports.angularEslintVersion = '^19.0.2';
|
|
21
21
|
exports.typescriptEslintVersion = '^7.16.0';
|
|
22
22
|
exports.tailwindVersion = '^3.0.2';
|
|
23
23
|
exports.postcssVersion = '^8.4.5';
|