@schematics/angular 17.1.0-next.3 → 17.1.0-rc.0
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/index.js
CHANGED
|
@@ -77,6 +77,7 @@ function default_1(options) {
|
|
|
77
77
|
options.ssr
|
|
78
78
|
? (0, schematics_1.schematic)('ssr', {
|
|
79
79
|
project: options.name,
|
|
80
|
+
skipInstall: true,
|
|
80
81
|
})
|
|
81
82
|
: (0, schematics_1.noop)(),
|
|
82
83
|
options.skipPackageJson ? (0, schematics_1.noop)() : addDependenciesToPackageJson(options),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematics/angular",
|
|
3
|
-
"version": "17.1.0-
|
|
3
|
+
"version": "17.1.0-rc.0",
|
|
4
4
|
"description": "Schematics specific to Angular",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"schematics": "./collection.json",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@angular-devkit/core": "17.1.0-
|
|
27
|
-
"@angular-devkit/schematics": "17.1.0-
|
|
26
|
+
"@angular-devkit/core": "17.1.0-rc.0",
|
|
27
|
+
"@angular-devkit/schematics": "17.1.0-rc.0",
|
|
28
28
|
"jsonc-parser": "3.2.0"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
package/ssr/index.js
CHANGED
|
@@ -221,21 +221,26 @@ function updateWebpackBuilderServerTsConfigRule(options) {
|
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
|
-
function addDependencies(isUsingApplicationBuilder) {
|
|
224
|
+
function addDependencies({ skipInstall }, isUsingApplicationBuilder) {
|
|
225
|
+
const install = skipInstall ? utility_1.InstallBehavior.None : utility_1.InstallBehavior.Auto;
|
|
225
226
|
const rules = [
|
|
226
227
|
(0, utility_1.addDependency)('@angular/ssr', latest_versions_1.latestVersions.AngularSSR, {
|
|
227
228
|
type: utility_1.DependencyType.Default,
|
|
229
|
+
install,
|
|
228
230
|
}),
|
|
229
231
|
(0, utility_1.addDependency)('express', latest_versions_1.latestVersions['express'], {
|
|
230
232
|
type: utility_1.DependencyType.Default,
|
|
233
|
+
install,
|
|
231
234
|
}),
|
|
232
235
|
(0, utility_1.addDependency)('@types/express', latest_versions_1.latestVersions['@types/express'], {
|
|
233
236
|
type: utility_1.DependencyType.Dev,
|
|
237
|
+
install,
|
|
234
238
|
}),
|
|
235
239
|
];
|
|
236
240
|
if (!isUsingApplicationBuilder) {
|
|
237
241
|
rules.push((0, utility_1.addDependency)('browser-sync', latest_versions_1.latestVersions['browser-sync'], {
|
|
238
242
|
type: utility_1.DependencyType.Dev,
|
|
243
|
+
install,
|
|
239
244
|
}));
|
|
240
245
|
}
|
|
241
246
|
return (0, schematics_1.chain)(rules);
|
|
@@ -289,7 +294,7 @@ function default_1(options) {
|
|
|
289
294
|
]),
|
|
290
295
|
addServerFile(options, isStandalone),
|
|
291
296
|
addScriptsRule(options, isUsingApplicationBuilder),
|
|
292
|
-
addDependencies(isUsingApplicationBuilder),
|
|
297
|
+
addDependencies(options, isUsingApplicationBuilder),
|
|
293
298
|
]);
|
|
294
299
|
};
|
|
295
300
|
}
|
package/utility/ast-utils.js
CHANGED
|
@@ -324,7 +324,7 @@ function addSymbolToNgModuleMetadata(source, ngModulePath, metadataField, symbol
|
|
|
324
324
|
!ts.isArrayLiteralExpression(assignment.initializer)) {
|
|
325
325
|
return [];
|
|
326
326
|
}
|
|
327
|
-
let
|
|
327
|
+
let expression;
|
|
328
328
|
const assignmentInit = assignment.initializer;
|
|
329
329
|
const elements = assignmentInit.elements;
|
|
330
330
|
if (elements.length) {
|
|
@@ -332,21 +332,21 @@ function addSymbolToNgModuleMetadata(source, ngModulePath, metadataField, symbol
|
|
|
332
332
|
if (symbolsArray.includes(core_1.tags.oneLine `${symbolName}`)) {
|
|
333
333
|
return [];
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
expression = elements[elements.length - 1];
|
|
336
336
|
}
|
|
337
337
|
else {
|
|
338
|
-
|
|
338
|
+
expression = assignmentInit;
|
|
339
339
|
}
|
|
340
340
|
let toInsert;
|
|
341
|
-
let position =
|
|
342
|
-
if (ts.isArrayLiteralExpression(
|
|
341
|
+
let position = expression.getEnd();
|
|
342
|
+
if (ts.isArrayLiteralExpression(expression)) {
|
|
343
343
|
// We found the field but it's empty. Insert it just before the `]`.
|
|
344
344
|
position--;
|
|
345
345
|
toInsert = `\n${core_1.tags.indentBy(4) `${symbolName}`}\n `;
|
|
346
346
|
}
|
|
347
347
|
else {
|
|
348
348
|
// Get the indentation of the last element, if any.
|
|
349
|
-
const text =
|
|
349
|
+
const text = expression.getFullText(source);
|
|
350
350
|
const matches = text.match(/^(\r?\n)(\s*)/);
|
|
351
351
|
if (matches) {
|
|
352
352
|
toInsert = `,${matches[1]}${core_1.tags.indentBy(matches[2].length) `${symbolName}`}`;
|
|
@@ -14,6 +14,6 @@ exports.latestVersions = {
|
|
|
14
14
|
...require('./latest-versions/package.json')['dependencies'],
|
|
15
15
|
// As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
|
|
16
16
|
Angular: '^17.1.0-next.0',
|
|
17
|
-
DevkitBuildAngular: '^17.1.0-
|
|
18
|
-
AngularSSR: '^17.1.0-
|
|
17
|
+
DevkitBuildAngular: '^17.1.0-rc.0',
|
|
18
|
+
AngularSSR: '^17.1.0-rc.0',
|
|
19
19
|
};
|