@schematics/angular 19.2.2 → 20.0.0-next.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/application/files/module-files/src/app/app.component.ts.template +1 -1
- package/application/files/standalone-files/src/app/app.component.ts.template +1 -1
- package/application/index.js +7 -7
- package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +1 -1
- package/component/index.js +1 -0
- package/component/schema.d.ts +5 -0
- package/component/schema.json +5 -0
- package/config/index.js +8 -7
- package/e2e/index.js +10 -7
- package/environments/index.js +8 -7
- package/library/index.js +4 -4
- package/migrations/migration-collection.json +1 -11
- package/package.json +4 -4
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +0 -9
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +107 -554
- package/utility/latest-versions/package.json +3 -3
- package/utility/latest-versions.js +5 -5
- package/workspace/files/tsconfig.json.template +1 -3
- package/migrations/update-ssr-imports/migration.d.ts +0 -15
- package/migrations/update-ssr-imports/migration.js +0 -107
- package/migrations/update-workspace-config/migration.d.ts +0 -33
- package/migrations/update-workspace-config/migration.js +0 -77
- /package/application/files/common-files/src/app/{app.component.html.template → app.component.ng.html.template} +0 -0
- /package/component/files/__name@dasherize@if-flat__/{__name@dasherize__.__type@dasherize__.html.template → __name@dasherize__.__type@dasherize____ngext__.html.template} +0 -0
|
@@ -9,7 +9,7 @@ import { Component } from '@angular/core';
|
|
|
9
9
|
%><router-outlet /><%
|
|
10
10
|
} %>
|
|
11
11
|
`,<% } else { %>
|
|
12
|
-
templateUrl: './app.component.html',<% } %>
|
|
12
|
+
templateUrl: './app.component.ng.html',<% } %>
|
|
13
13
|
standalone: false,<% if(inlineStyle) { %>
|
|
14
14
|
styles: []<% } else { %>
|
|
15
15
|
styleUrl: './app.component.<%= style %>'<% } %>
|
|
@@ -11,7 +11,7 @@ import { RouterOutlet } from '@angular/router';<% } %>
|
|
|
11
11
|
%><router-outlet /><%
|
|
12
12
|
} %>
|
|
13
13
|
`,<% } else { %>
|
|
14
|
-
templateUrl: './app.component.html',<% } if(inlineStyle) { %>
|
|
14
|
+
templateUrl: './app.component.ng.html',<% } if(inlineStyle) { %>
|
|
15
15
|
styles: [],<% } else { %>
|
|
16
16
|
styleUrl: './app.component.<%= style %>'<% } %>
|
|
17
17
|
})
|
package/application/index.js
CHANGED
|
@@ -63,7 +63,7 @@ function default_1(options) {
|
|
|
63
63
|
? (0, schematics_1.filter)((path) => !path.endsWith('tsconfig.spec.json.template'))
|
|
64
64
|
: (0, schematics_1.noop)(),
|
|
65
65
|
componentOptions.inlineTemplate
|
|
66
|
-
? (0, schematics_1.filter)((path) => !path.endsWith('
|
|
66
|
+
? (0, schematics_1.filter)((path) => !path.endsWith('.ng.html.template'))
|
|
67
67
|
: (0, schematics_1.noop)(),
|
|
68
68
|
(0, schematics_1.applyTemplates)({
|
|
69
69
|
utils: schematics_1.strings,
|
|
@@ -96,8 +96,8 @@ function addDependenciesToPackageJson(options) {
|
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
type: dependencies_1.NodeDependencyType.Dev,
|
|
99
|
-
name: '@angular
|
|
100
|
-
version: latest_versions_1.latestVersions.
|
|
99
|
+
name: '@angular/build',
|
|
100
|
+
version: latest_versions_1.latestVersions.AngularBuild,
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
type: dependencies_1.NodeDependencyType.Dev,
|
|
@@ -193,7 +193,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
|
|
|
193
193
|
schematics,
|
|
194
194
|
targets: {
|
|
195
195
|
build: {
|
|
196
|
-
builder: workspace_models_1.Builders.
|
|
196
|
+
builder: workspace_models_1.Builders.BuildApplication,
|
|
197
197
|
defaultConfiguration: 'production',
|
|
198
198
|
options: {
|
|
199
199
|
outputPath: `dist/${folderName}`,
|
|
@@ -219,7 +219,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
|
|
|
219
219
|
},
|
|
220
220
|
},
|
|
221
221
|
serve: {
|
|
222
|
-
builder: workspace_models_1.Builders.
|
|
222
|
+
builder: workspace_models_1.Builders.BuildDevServer,
|
|
223
223
|
defaultConfiguration: 'development',
|
|
224
224
|
options: {},
|
|
225
225
|
configurations: {
|
|
@@ -232,12 +232,12 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
|
|
|
232
232
|
},
|
|
233
233
|
},
|
|
234
234
|
'extract-i18n': {
|
|
235
|
-
builder: workspace_models_1.Builders.
|
|
235
|
+
builder: workspace_models_1.Builders.BuildExtractI18n,
|
|
236
236
|
},
|
|
237
237
|
test: options.minimal
|
|
238
238
|
? undefined
|
|
239
239
|
: {
|
|
240
|
-
builder: workspace_models_1.Builders.
|
|
240
|
+
builder: workspace_models_1.Builders.BuildKarma,
|
|
241
241
|
options: {
|
|
242
242
|
polyfills: options.experimentalZoneless ? [] : ['zone.js', 'zone.js/testing'],
|
|
243
243
|
tsConfig: `${projectRoot}tsconfig.spec.json`,
|
package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template
CHANGED
|
@@ -9,7 +9,7 @@ import { <% if(changeDetection !== 'Default') { %>ChangeDetectionStrategy, <% }%
|
|
|
9
9
|
<%= dasherize(name) %> works!
|
|
10
10
|
</p>
|
|
11
11
|
`<% } else { %>
|
|
12
|
-
templateUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.html'<% } if(inlineStyle) { %>,
|
|
12
|
+
templateUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %><%= ngext %>.html'<% } if(inlineStyle) { %>,
|
|
13
13
|
styles: `<% if(displayBlock){ %>
|
|
14
14
|
:host {
|
|
15
15
|
display: block;
|
package/component/index.js
CHANGED
package/component/schema.d.ts
CHANGED
|
@@ -49,6 +49,11 @@ export type Schema = {
|
|
|
49
49
|
* `my-component.component.css`.
|
|
50
50
|
*/
|
|
51
51
|
name: string;
|
|
52
|
+
/**
|
|
53
|
+
* Generate component template files with an '.ng.html' file extension instead of '.html'.
|
|
54
|
+
* The '.ng.html' file extension is recommended by the Angular style guide.
|
|
55
|
+
*/
|
|
56
|
+
ngHtml?: boolean;
|
|
52
57
|
/**
|
|
53
58
|
* The path where the component files should be created, relative to the current workspace.
|
|
54
59
|
* If not provided, a folder with the same name as the component will be created in the
|
package/component/schema.json
CHANGED
|
@@ -135,6 +135,11 @@
|
|
|
135
135
|
"type": "boolean",
|
|
136
136
|
"default": false,
|
|
137
137
|
"description": "Use a default export for the component in its TypeScript file instead of a named export."
|
|
138
|
+
},
|
|
139
|
+
"ngHtml": {
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"default": true,
|
|
142
|
+
"description": "Generate component template files with an '.ng.html' file extension instead of '.html'. The '.ng.html' file extension is recommended by the Angular style guide."
|
|
138
143
|
}
|
|
139
144
|
},
|
|
140
145
|
"required": ["name", "project"]
|
package/config/index.js
CHANGED
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.default = default_1;
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
|
-
const utility_1 = require("@schematics/angular/utility");
|
|
13
12
|
const node_path_1 = require("node:path");
|
|
14
13
|
const paths_1 = require("../utility/paths");
|
|
14
|
+
const workspace_1 = require("../utility/workspace");
|
|
15
|
+
const workspace_models_1 = require("../utility/workspace-models");
|
|
15
16
|
const schema_1 = require("./schema");
|
|
16
17
|
function default_1(options) {
|
|
17
18
|
switch (options.type) {
|
|
@@ -25,7 +26,7 @@ function default_1(options) {
|
|
|
25
26
|
}
|
|
26
27
|
function addBrowserslistConfig(options) {
|
|
27
28
|
return async (host) => {
|
|
28
|
-
const workspace = await (0,
|
|
29
|
+
const workspace = await (0, workspace_1.getWorkspace)(host);
|
|
29
30
|
const project = workspace.projects.get(options.project);
|
|
30
31
|
if (!project) {
|
|
31
32
|
throw new schematics_1.SchematicsException(`Project name "${options.project}" doesn't not exist.`);
|
|
@@ -38,7 +39,7 @@ function addBrowserslistConfig(options) {
|
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
function addKarmaConfig(options) {
|
|
41
|
-
return (0,
|
|
42
|
+
return (0, workspace_1.updateWorkspace)((workspace) => {
|
|
42
43
|
const project = workspace.projects.get(options.project);
|
|
43
44
|
if (!project) {
|
|
44
45
|
throw new schematics_1.SchematicsException(`Project name "${options.project}" doesn't not exist.`);
|
|
@@ -48,10 +49,10 @@ function addKarmaConfig(options) {
|
|
|
48
49
|
throw new schematics_1.SchematicsException(`No "test" target found for project "${options.project}".` +
|
|
49
50
|
' A "test" target is required to generate a karma configuration.');
|
|
50
51
|
}
|
|
51
|
-
if (testTarget.builder !==
|
|
52
|
-
testTarget.builder !==
|
|
52
|
+
if (testTarget.builder !== workspace_models_1.Builders.Karma &&
|
|
53
|
+
testTarget.builder !== workspace_models_1.Builders.BuildKarma) {
|
|
53
54
|
throw new schematics_1.SchematicsException(`Cannot add a karma configuration as builder for "test" target in project does not` +
|
|
54
|
-
` use "${
|
|
55
|
+
` use "${workspace_models_1.Builders.Karma}" or "${workspace_models_1.Builders.BuildKarma}".`);
|
|
55
56
|
}
|
|
56
57
|
testTarget.options ??= {};
|
|
57
58
|
testTarget.options.karmaConfig = node_path_1.posix.join(project.root, 'karma.conf.js');
|
|
@@ -65,7 +66,7 @@ function addKarmaConfig(options) {
|
|
|
65
66
|
(0, schematics_1.applyTemplates)({
|
|
66
67
|
relativePathToWorkspaceRoot: (0, paths_1.relativePathToWorkspaceRoot)(project.root),
|
|
67
68
|
folderName,
|
|
68
|
-
needDevkitPlugin: testTarget.builder ===
|
|
69
|
+
needDevkitPlugin: testTarget.builder === workspace_models_1.Builders.Karma,
|
|
69
70
|
}),
|
|
70
71
|
(0, schematics_1.move)(project.root),
|
|
71
72
|
]));
|
package/e2e/index.js
CHANGED
|
@@ -9,10 +9,13 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.default = default_1;
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
|
-
const utility_1 = require("@schematics/angular/utility");
|
|
13
12
|
const node_path_1 = require("node:path");
|
|
13
|
+
const dependency_1 = require("../utility/dependency");
|
|
14
14
|
const json_file_1 = require("../utility/json-file");
|
|
15
15
|
const latest_versions_1 = require("../utility/latest-versions");
|
|
16
|
+
const standalone_1 = require("../utility/standalone");
|
|
17
|
+
const workspace_1 = require("../utility/workspace");
|
|
18
|
+
const workspace_models_1 = require("../utility/workspace-models");
|
|
16
19
|
/**
|
|
17
20
|
* The list of development dependencies used by the E2E protractor-based builder.
|
|
18
21
|
* The versions are sourced from the latest versions `../utility/latest-versions/package.json`
|
|
@@ -35,7 +38,7 @@ function addScriptsToPackageJson() {
|
|
|
35
38
|
}
|
|
36
39
|
function default_1(options) {
|
|
37
40
|
const { relatedAppName } = options;
|
|
38
|
-
return (0,
|
|
41
|
+
return (0, workspace_1.updateWorkspace)((workspace) => {
|
|
39
42
|
const project = workspace.projects.get(relatedAppName);
|
|
40
43
|
if (!project) {
|
|
41
44
|
throw new schematics_1.SchematicsException(`Project name "${relatedAppName}" doesn't not exist.`);
|
|
@@ -43,7 +46,7 @@ function default_1(options) {
|
|
|
43
46
|
const e2eRootPath = node_path_1.posix.join(project.root, 'e2e');
|
|
44
47
|
project.targets.add({
|
|
45
48
|
name: 'e2e',
|
|
46
|
-
builder:
|
|
49
|
+
builder: workspace_models_1.Builders.Protractor,
|
|
47
50
|
defaultConfiguration: 'development',
|
|
48
51
|
options: {
|
|
49
52
|
protractorConfig: node_path_1.posix.join(e2eRootPath, 'protractor.conf.js'),
|
|
@@ -66,10 +69,10 @@ function default_1(options) {
|
|
|
66
69
|
}),
|
|
67
70
|
(0, schematics_1.move)(e2eRootPath),
|
|
68
71
|
])),
|
|
69
|
-
(0,
|
|
70
|
-
...E2E_DEV_DEPENDENCIES.map((name) => (0,
|
|
71
|
-
type:
|
|
72
|
-
existing:
|
|
72
|
+
(0, standalone_1.addRootProvider)(relatedAppName, ({ code, external }) => code `${external('provideProtractorTestingSupport', '@angular/platform-browser')}()`),
|
|
73
|
+
...E2E_DEV_DEPENDENCIES.map((name) => (0, dependency_1.addDependency)(name, latest_versions_1.latestVersions[name], {
|
|
74
|
+
type: dependency_1.DependencyType.Dev,
|
|
75
|
+
existing: dependency_1.ExistingBehavior.Skip,
|
|
73
76
|
})),
|
|
74
77
|
addScriptsToPackageJson(),
|
|
75
78
|
]);
|
package/environments/index.js
CHANGED
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.default = default_1;
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
|
-
const utility_1 = require("@schematics/angular/utility");
|
|
13
12
|
const node_path_1 = require("node:path");
|
|
13
|
+
const workspace_1 = require("../utility/workspace");
|
|
14
|
+
const workspace_models_1 = require("../utility/workspace-models");
|
|
14
15
|
const ENVIRONMENTS_DIRECTORY = 'environments';
|
|
15
16
|
const ENVIRONMENT_FILE_CONTENT = 'export const environment = {};\n';
|
|
16
17
|
function default_1(options) {
|
|
17
|
-
return (0,
|
|
18
|
+
return (0, workspace_1.updateWorkspace)((workspace) => {
|
|
18
19
|
const project = workspace.projects.get(options.project);
|
|
19
20
|
if (!project) {
|
|
20
21
|
throw new schematics_1.SchematicsException(`Project name "${options.project}" doesn't not exist.`);
|
|
@@ -53,14 +54,14 @@ function log(type, text) {
|
|
|
53
54
|
return (_, context) => context.logger[type](text);
|
|
54
55
|
}
|
|
55
56
|
function* generateConfigurationEnvironments(buildTarget, serverTarget, sourceRoot, projectName) {
|
|
56
|
-
if (buildTarget.builder !==
|
|
57
|
-
buildTarget.builder !==
|
|
58
|
-
buildTarget.builder !==
|
|
59
|
-
buildTarget.builder !==
|
|
57
|
+
if (buildTarget.builder !== workspace_models_1.Builders.Browser &&
|
|
58
|
+
buildTarget.builder !== workspace_models_1.Builders.BrowserEsbuild &&
|
|
59
|
+
buildTarget.builder !== workspace_models_1.Builders.Application &&
|
|
60
|
+
buildTarget.builder !== workspace_models_1.Builders.BuildApplication) {
|
|
60
61
|
yield log('warn', `"build" target found for project "${projectName}" has a third-party builder "${buildTarget.builder}".` +
|
|
61
62
|
' The generated project options may not be compatible with this builder.');
|
|
62
63
|
}
|
|
63
|
-
if (serverTarget && serverTarget.builder !==
|
|
64
|
+
if (serverTarget && serverTarget.builder !== workspace_models_1.Builders.Server) {
|
|
64
65
|
yield log('warn', `"server" target found for project "${projectName}" has a third-party builder "${buildTarget.builder}".` +
|
|
65
66
|
' The generated project options may not be compatible with this builder.');
|
|
66
67
|
}
|
package/library/index.js
CHANGED
|
@@ -38,8 +38,8 @@ function addDependenciesToPackageJson() {
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
type: dependencies_1.NodeDependencyType.Dev,
|
|
41
|
-
name: '@angular
|
|
42
|
-
version: latest_versions_1.latestVersions.
|
|
41
|
+
name: '@angular/build',
|
|
42
|
+
version: latest_versions_1.latestVersions.AngularBuild,
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
type: dependencies_1.NodeDependencyType.Dev,
|
|
@@ -70,7 +70,7 @@ function addLibToWorkspaceFile(options, projectRoot, projectName) {
|
|
|
70
70
|
prefix: options.prefix,
|
|
71
71
|
targets: {
|
|
72
72
|
build: {
|
|
73
|
-
builder: workspace_models_1.Builders.
|
|
73
|
+
builder: workspace_models_1.Builders.BuildNgPackagr,
|
|
74
74
|
defaultConfiguration: 'production',
|
|
75
75
|
options: {
|
|
76
76
|
project: `${projectRoot}/ng-package.json`,
|
|
@@ -85,7 +85,7 @@ function addLibToWorkspaceFile(options, projectRoot, projectName) {
|
|
|
85
85
|
},
|
|
86
86
|
},
|
|
87
87
|
test: {
|
|
88
|
-
builder: workspace_models_1.Builders.
|
|
88
|
+
builder: workspace_models_1.Builders.BuildKarma,
|
|
89
89
|
options: {
|
|
90
90
|
tsConfig: `${projectRoot}/tsconfig.spec.json`,
|
|
91
91
|
polyfills: ['zone.js', 'zone.js/testing'],
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schematics": {
|
|
3
3
|
"use-application-builder": {
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "20.0.0",
|
|
5
5
|
"factory": "./use-application-builder/migration",
|
|
6
6
|
"description": "Migrate application projects to the new build system. Application projects that are using the '@angular-devkit/build-angular' package's 'browser' and/or 'browser-esbuild' builders will be migrated to use the new 'application' builder. You can read more about this, including known issues and limitations, here: https://angular.dev/tools/cli/build-system-migration",
|
|
7
7
|
"optional": true,
|
|
8
8
|
"recommended": true,
|
|
9
9
|
"documentation": "tools/cli/build-system-migration"
|
|
10
|
-
},
|
|
11
|
-
"update-workspace-config": {
|
|
12
|
-
"version": "19.0.0",
|
|
13
|
-
"factory": "./update-workspace-config/migration",
|
|
14
|
-
"description": "Update the workspace configuration by replacing deprecated options in 'angular.json' for compatibility with the latest Angular CLI changes."
|
|
15
|
-
},
|
|
16
|
-
"update-ssr-imports": {
|
|
17
|
-
"version": "19.0.0",
|
|
18
|
-
"factory": "./update-ssr-imports/migration",
|
|
19
|
-
"description": "Update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected."
|
|
20
10
|
}
|
|
21
11
|
}
|
|
22
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematics/angular",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0-next.1",
|
|
4
4
|
"description": "Schematics specific to Angular",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"schematics": "./collection.json",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@angular-devkit/core": "
|
|
26
|
-
"@angular-devkit/schematics": "
|
|
25
|
+
"@angular-devkit/core": "20.0.0-next.1",
|
|
26
|
+
"@angular-devkit/schematics": "20.0.0-next.1",
|
|
27
27
|
"jsonc-parser": "3.3.1"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"packageManager": "pnpm@9.15.6",
|
|
34
34
|
"engines": {
|
|
35
|
-
"node": "^
|
|
35
|
+
"node": "^20.11.1 || >=22.0.0",
|
|
36
36
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
37
37
|
"yarn": ">= 1.13.0"
|
|
38
38
|
},
|
|
@@ -1486,10 +1486,6 @@ declare namespace ts {
|
|
|
1486
1486
|
command: CommandTypes.Quickinfo;
|
|
1487
1487
|
arguments: FileLocationRequestArgs;
|
|
1488
1488
|
}
|
|
1489
|
-
export interface QuickInfoRequestArgs extends FileLocationRequestArgs {
|
|
1490
|
-
/** TODO */
|
|
1491
|
-
verbosityLevel?: number;
|
|
1492
|
-
}
|
|
1493
1489
|
/**
|
|
1494
1490
|
* Body of QuickInfoResponse.
|
|
1495
1491
|
*/
|
|
@@ -1523,10 +1519,6 @@ declare namespace ts {
|
|
|
1523
1519
|
* JSDoc tags associated with symbol.
|
|
1524
1520
|
*/
|
|
1525
1521
|
tags: JSDocTagInfo[];
|
|
1526
|
-
/**
|
|
1527
|
-
* TODO
|
|
1528
|
-
*/
|
|
1529
|
-
canIncreaseVerbosityLevel?: boolean;
|
|
1530
1522
|
}
|
|
1531
1523
|
/**
|
|
1532
1524
|
* Quickinfo response message.
|
|
@@ -10765,7 +10757,6 @@ declare namespace ts {
|
|
|
10765
10757
|
displayParts?: SymbolDisplayPart[];
|
|
10766
10758
|
documentation?: SymbolDisplayPart[];
|
|
10767
10759
|
tags?: JSDocTagInfo[];
|
|
10768
|
-
canIncreaseVerbosityLevel?: boolean;
|
|
10769
10760
|
}
|
|
10770
10761
|
type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
|
|
10771
10762
|
interface RenameInfoSuccess {
|