@schematics/angular 18.0.0-next.0 → 18.0.0-next.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/application/files/module-files/src/main.ts.template +2 -5
- package/application/files/standalone-files/src/app/app.config.ts.template +2 -2
- package/application/index.js +2 -2
- package/package.json +3 -3
- package/service-worker/files/ngsw-config.json.template +1 -2
- package/service-worker/index.js +0 -6
- package/utility/latest-versions/package.json +1 -0
- package/utility/latest-versions.js +7 -6
- package/application/files/common-files/src/assets/.gitkeep.template +0 -0
- /package/application/files/common-files/{src → public}/favicon.ico.template +0 -0
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
import { AppModule } from './app/app.module';
|
|
5
5
|
|
|
6
|
-
<% if(!!viewEncapsulation) { %>
|
|
7
6
|
platformBrowserDynamic().bootstrapModule(AppModule, {
|
|
8
|
-
|
|
7
|
+
ngZoneEventCoalescing: true<% if(!!viewEncapsulation) { %>,
|
|
8
|
+
defaultEncapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } %>
|
|
9
9
|
})
|
|
10
|
-
.catch(err => console.error(err));<% } else { %>
|
|
11
|
-
platformBrowserDynamic().bootstrapModule(AppModule)
|
|
12
10
|
.catch(err => console.error(err));
|
|
13
|
-
<% } %>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ApplicationConfig } from '@angular/core';<% if (routing) { %>
|
|
1
|
+
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';<% if (routing) { %>
|
|
2
2
|
import { provideRouter } from '@angular/router';
|
|
3
3
|
|
|
4
4
|
import { routes } from './app.routes';<% } %>
|
|
5
5
|
|
|
6
6
|
export const appConfig: ApplicationConfig = {
|
|
7
|
-
providers: [<% if (routing) {
|
|
7
|
+
providers: [provideZoneChangeDetection({ eventCoalescing: true })<% if (routing) { %>, provideRouter(routes)<% } %>]
|
|
8
8
|
};
|
package/application/index.js
CHANGED
|
@@ -201,7 +201,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
|
|
|
201
201
|
polyfills: ['zone.js'],
|
|
202
202
|
tsConfig: `${projectRoot}tsconfig.app.json`,
|
|
203
203
|
inlineStyleLanguage,
|
|
204
|
-
assets: [
|
|
204
|
+
assets: [{ 'glob': '**/*', 'input': 'public' }],
|
|
205
205
|
styles: [`${sourceRoot}/styles.${options.style}`],
|
|
206
206
|
scripts: [],
|
|
207
207
|
},
|
|
@@ -244,7 +244,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
|
|
|
244
244
|
polyfills: ['zone.js', 'zone.js/testing'],
|
|
245
245
|
tsConfig: `${projectRoot}tsconfig.spec.json`,
|
|
246
246
|
inlineStyleLanguage,
|
|
247
|
-
assets: [
|
|
247
|
+
assets: [{ 'glob': '**/*', 'input': 'public' }],
|
|
248
248
|
styles: [`${sourceRoot}/styles.${options.style}`],
|
|
249
249
|
scripts: [],
|
|
250
250
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematics/angular",
|
|
3
|
-
"version": "18.0.0-next.
|
|
3
|
+
"version": "18.0.0-next.2",
|
|
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": "18.0.0-next.
|
|
26
|
-
"@angular-devkit/schematics": "18.0.0-next.
|
|
25
|
+
"@angular-devkit/core": "18.0.0-next.2",
|
|
26
|
+
"@angular-devkit/schematics": "18.0.0-next.2",
|
|
27
27
|
"jsonc-parser": "3.2.1"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"updateMode": "prefetch",
|
|
22
22
|
"resources": {
|
|
23
23
|
"files": [
|
|
24
|
-
"
|
|
25
|
-
"<%= resourcesOutputPath %>/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
|
|
24
|
+
"/**/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
|
|
26
25
|
]
|
|
27
26
|
}
|
|
28
27
|
}
|
package/service-worker/index.js
CHANGED
|
@@ -110,11 +110,9 @@ function default_1(options) {
|
|
|
110
110
|
}
|
|
111
111
|
const buildOptions = buildTarget.options;
|
|
112
112
|
let browserEntryPoint;
|
|
113
|
-
let resourcesOutputPath = '';
|
|
114
113
|
const ngswConfigPath = (0, core_1.join)((0, core_1.normalize)(project.root), 'ngsw-config.json');
|
|
115
114
|
if (buildTarget.builder === workspace_models_1.Builders.Application) {
|
|
116
115
|
browserEntryPoint = buildOptions.browser;
|
|
117
|
-
resourcesOutputPath = '/media';
|
|
118
116
|
const productionConf = buildTarget.configurations?.production;
|
|
119
117
|
if (productionConf) {
|
|
120
118
|
productionConf.serviceWorker = ngswConfigPath;
|
|
@@ -124,9 +122,6 @@ function default_1(options) {
|
|
|
124
122
|
browserEntryPoint = buildOptions.main;
|
|
125
123
|
buildOptions.serviceWorker = true;
|
|
126
124
|
buildOptions.ngswConfigPath = ngswConfigPath;
|
|
127
|
-
if (buildOptions.resourcesOutputPath) {
|
|
128
|
-
resourcesOutputPath = (0, core_1.normalize)(`/${buildOptions.resourcesOutputPath}`);
|
|
129
|
-
}
|
|
130
125
|
}
|
|
131
126
|
await (0, utility_1.writeWorkspace)(host, workspace);
|
|
132
127
|
return (0, schematics_1.chain)([
|
|
@@ -134,7 +129,6 @@ function default_1(options) {
|
|
|
134
129
|
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
135
130
|
(0, schematics_1.applyTemplates)({
|
|
136
131
|
...options,
|
|
137
|
-
resourcesOutputPath,
|
|
138
132
|
relativePathToWorkspaceRoot: (0, paths_1.relativePathToWorkspaceRoot)(project.root),
|
|
139
133
|
}),
|
|
140
134
|
(0, schematics_1.move)(project.root),
|
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.latestVersions = void 0;
|
|
11
|
+
// We could have used TypeScripts' `resolveJsonModule` to make the `latestVersion` object typesafe,
|
|
12
|
+
// but ts_library doesn't support JSON inputs.
|
|
13
|
+
const dependencies = require('./latest-versions/package.json')['dependencies'];
|
|
11
14
|
exports.latestVersions = {
|
|
12
|
-
|
|
13
|
-
// but ts_library doesn't support JSON inputs.
|
|
14
|
-
...require('./latest-versions/package.json')['dependencies'],
|
|
15
|
+
...dependencies,
|
|
15
16
|
// As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
|
|
16
|
-
Angular: '
|
|
17
|
-
DevkitBuildAngular: '^18.0.0-next.
|
|
18
|
-
AngularSSR: '^18.0.0-next.
|
|
17
|
+
Angular: dependencies['@angular/core'],
|
|
18
|
+
DevkitBuildAngular: '^18.0.0-next.2',
|
|
19
|
+
AngularSSR: '^18.0.0-next.2',
|
|
19
20
|
};
|
|
File without changes
|
|
File without changes
|