@schematics/angular 20.0.0-rc.0 → 20.0.0-rc.2
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": "@schematics/angular",
|
|
3
|
-
"version": "20.0.0-rc.
|
|
3
|
+
"version": "20.0.0-rc.2",
|
|
4
4
|
"description": "Schematics specific to Angular",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
},
|
|
23
23
|
"schematics": "./collection.json",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@angular-devkit/core": "20.0.0-rc.
|
|
26
|
-
"@angular-devkit/schematics": "20.0.0-rc.
|
|
25
|
+
"@angular-devkit/core": "20.0.0-rc.2",
|
|
26
|
+
"@angular-devkit/schematics": "20.0.0-rc.2",
|
|
27
27
|
"jsonc-parser": "3.3.1"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
31
31
|
"url": "https://github.com/angular/angular-cli.git"
|
|
32
32
|
},
|
|
33
|
-
"packageManager": "pnpm@9.15.
|
|
33
|
+
"packageManager": "pnpm@9.15.9",
|
|
34
34
|
"engines": {
|
|
35
35
|
"node": "^20.11.1 || ^22.11.0 || >=24.0.0",
|
|
36
36
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
package/service-worker/index.js
CHANGED
|
@@ -120,18 +120,16 @@ function default_1(options) {
|
|
|
120
120
|
throw (0, project_targets_1.targetBuildNotFoundError)();
|
|
121
121
|
}
|
|
122
122
|
const buildOptions = buildTarget.options;
|
|
123
|
-
|
|
123
|
+
const browserEntryPoint = await (0, util_1.getMainFilePath)(host, options.project);
|
|
124
124
|
const ngswConfigPath = (0, core_1.join)((0, core_1.normalize)(project.root), 'ngsw-config.json');
|
|
125
125
|
if (buildTarget.builder === workspace_models_1.Builders.Application ||
|
|
126
126
|
buildTarget.builder === workspace_models_1.Builders.BuildApplication) {
|
|
127
|
-
browserEntryPoint = buildOptions.browser;
|
|
128
127
|
const productionConf = buildTarget.configurations?.production;
|
|
129
128
|
if (productionConf) {
|
|
130
129
|
productionConf.serviceWorker = ngswConfigPath;
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
else {
|
|
134
|
-
browserEntryPoint = buildOptions.main;
|
|
135
133
|
buildOptions.serviceWorker = true;
|
|
136
134
|
buildOptions.ngswConfigPath = ngswConfigPath;
|
|
137
135
|
}
|
|
@@ -16,7 +16,7 @@ exports.latestVersions = {
|
|
|
16
16
|
// As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
|
|
17
17
|
Angular: '^20.0.0-next.0',
|
|
18
18
|
NgPackagr: '^20.0.0-next.0',
|
|
19
|
-
DevkitBuildAngular: '^20.0.0-rc.
|
|
20
|
-
AngularBuild: '^20.0.0-rc.
|
|
21
|
-
AngularSSR: '^20.0.0-rc.
|
|
19
|
+
DevkitBuildAngular: '^20.0.0-rc.2',
|
|
20
|
+
AngularBuild: '^20.0.0-rc.2',
|
|
21
|
+
AngularSSR: '^20.0.0-rc.2',
|
|
22
22
|
};
|
|
@@ -17,6 +17,7 @@ exports.applyChangesToFile = applyChangesToFile;
|
|
|
17
17
|
exports.isMergeAppConfigCall = isMergeAppConfigCall;
|
|
18
18
|
exports.findProvidersLiteral = findProvidersLiteral;
|
|
19
19
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
20
|
+
const posix_1 = require("node:path/posix");
|
|
20
21
|
const typescript_1 = __importDefault(require("../../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
21
22
|
const change_1 = require("../change");
|
|
22
23
|
const project_targets_1 = require("../project-targets");
|
|
@@ -31,14 +32,17 @@ async function getMainFilePath(tree, projectName) {
|
|
|
31
32
|
const workspace = await (0, workspace_1.getWorkspace)(tree);
|
|
32
33
|
const project = workspace.projects.get(projectName);
|
|
33
34
|
const buildTarget = project?.targets.get('build');
|
|
34
|
-
if (!buildTarget) {
|
|
35
|
+
if (!project || !buildTarget) {
|
|
35
36
|
throw (0, project_targets_1.targetBuildNotFoundError)();
|
|
36
37
|
}
|
|
37
38
|
const options = buildTarget.options;
|
|
38
|
-
|
|
39
|
-
buildTarget.builder === workspace_models_1.Builders.BuildApplication
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
if (buildTarget.builder === workspace_models_1.Builders.Application ||
|
|
40
|
+
buildTarget.builder === workspace_models_1.Builders.BuildApplication) {
|
|
41
|
+
// These builders support a default of `<project_source_root>/main.ts`
|
|
42
|
+
const projectSourceRoot = project.sourceRoot ?? (0, posix_1.join)(project.root, 'src');
|
|
43
|
+
return options.browser ?? (0, posix_1.join)(projectSourceRoot, 'main.ts');
|
|
44
|
+
}
|
|
45
|
+
return options.main;
|
|
42
46
|
}
|
|
43
47
|
/**
|
|
44
48
|
* Gets a TypeScript source file at a specific path.
|