@angular/cli 20.1.2 → 20.1.4
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "20.1.
|
|
3
|
+
"version": "20.1.4",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/architect": "0.2001.
|
|
29
|
-
"@angular-devkit/core": "20.1.
|
|
30
|
-
"@angular-devkit/schematics": "20.1.
|
|
28
|
+
"@angular-devkit/architect": "0.2001.4",
|
|
29
|
+
"@angular-devkit/core": "20.1.4",
|
|
30
|
+
"@angular-devkit/schematics": "20.1.4",
|
|
31
31
|
"@inquirer/prompts": "7.6.0",
|
|
32
32
|
"@listr2/prompt-adapter-inquirer": "2.0.22",
|
|
33
33
|
"@modelcontextprotocol/sdk": "1.13.3",
|
|
34
|
-
"@schematics/angular": "20.1.
|
|
34
|
+
"@schematics/angular": "20.1.4",
|
|
35
35
|
"@yarnpkg/lockfile": "1.1.0",
|
|
36
36
|
"algoliasearch": "5.32.0",
|
|
37
37
|
"ini": "5.0.0",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"ng-update": {
|
|
49
49
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
50
50
|
"packageGroup": {
|
|
51
|
-
"@angular/cli": "20.1.
|
|
52
|
-
"@angular/build": "20.1.
|
|
53
|
-
"@angular/ssr": "20.1.
|
|
54
|
-
"@angular-devkit/architect": "0.2001.
|
|
55
|
-
"@angular-devkit/build-angular": "20.1.
|
|
56
|
-
"@angular-devkit/build-webpack": "0.2001.
|
|
57
|
-
"@angular-devkit/core": "20.1.
|
|
58
|
-
"@angular-devkit/schematics": "20.1.
|
|
51
|
+
"@angular/cli": "20.1.4",
|
|
52
|
+
"@angular/build": "20.1.4",
|
|
53
|
+
"@angular/ssr": "20.1.4",
|
|
54
|
+
"@angular-devkit/architect": "0.2001.4",
|
|
55
|
+
"@angular-devkit/build-angular": "20.1.4",
|
|
56
|
+
"@angular-devkit/build-webpack": "0.2001.4",
|
|
57
|
+
"@angular-devkit/core": "20.1.4",
|
|
58
|
+
"@angular-devkit/schematics": "20.1.4"
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"packageManager": "pnpm@9.15.9",
|
|
@@ -9,10 +9,12 @@ You are an expert in TypeScript, Angular, and scalable web application developme
|
|
|
9
9
|
## Angular Best Practices
|
|
10
10
|
|
|
11
11
|
- Always use standalone components over NgModules
|
|
12
|
-
-
|
|
12
|
+
- Must NOT set `standalone: true` inside Angular decorators. It's the default.
|
|
13
13
|
- Use signals for state management
|
|
14
14
|
- Implement lazy loading for feature routes
|
|
15
|
+
- Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead
|
|
15
16
|
- Use `NgOptimizedImage` for all static images.
|
|
17
|
+
- `NgOptimizedImage` does not work for inline base64 images.
|
|
16
18
|
|
|
17
19
|
## Components
|
|
18
20
|
|
|
@@ -30,6 +32,7 @@ You are an expert in TypeScript, Angular, and scalable web application developme
|
|
|
30
32
|
- Use signals for local component state
|
|
31
33
|
- Use `computed()` for derived state
|
|
32
34
|
- Keep state transformations pure and predictable
|
|
35
|
+
- Do NOT use `mutate` on signals, use `update` or `set` instead
|
|
33
36
|
|
|
34
37
|
## Templates
|
|
35
38
|
|
|
@@ -42,3 +45,8 @@ You are an expert in TypeScript, Angular, and scalable web application developme
|
|
|
42
45
|
- Design services around a single responsibility
|
|
43
46
|
- Use the `providedIn: 'root'` option for singleton services
|
|
44
47
|
- Use the `inject()` function instead of constructor injection
|
|
48
|
+
|
|
49
|
+
## Common pitfalls
|
|
50
|
+
|
|
51
|
+
- Control flow (`@if`):
|
|
52
|
+
- You cannot use `as` expressions in `@else if (...)`. E.g. invalid code: `@else if (bla(); as x)`.
|
|
@@ -39,7 +39,11 @@ async function createMcpServer(context) {
|
|
|
39
39
|
return { contents: [{ uri: 'instructions://best-practices', text }] };
|
|
40
40
|
});
|
|
41
41
|
(0, best_practices_1.registerBestPracticesTool)(server);
|
|
42
|
-
(
|
|
42
|
+
// If run outside an Angular workspace (e.g., globally) skip the workspace specific tools.
|
|
43
|
+
// Currently only the `list_projects` tool.
|
|
44
|
+
if (!context.workspace) {
|
|
45
|
+
(0, projects_1.registerListProjectsTool)(server, context);
|
|
46
|
+
}
|
|
43
47
|
await (0, doc_search_1.registerDocSearchTool)(server);
|
|
44
48
|
return server;
|
|
45
49
|
}
|
package/src/utilities/version.js
CHANGED