@angular/cli 17.2.0-next.1 → 17.2.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/lib/config/schema.json +33 -0
- package/package.json +14 -14
- package/src/commands/update/schematic/index.js +11 -29
- package/src/utilities/version.js +1 -1
package/lib/config/schema.json
CHANGED
|
@@ -1853,6 +1853,11 @@
|
|
|
1853
1853
|
},
|
|
1854
1854
|
"default": []
|
|
1855
1855
|
},
|
|
1856
|
+
"clearScreen": {
|
|
1857
|
+
"type": "boolean",
|
|
1858
|
+
"default": false,
|
|
1859
|
+
"description": "Automatically clear the terminal screen during rebuilds."
|
|
1860
|
+
},
|
|
1856
1861
|
"optimization": {
|
|
1857
1862
|
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.",
|
|
1858
1863
|
"default": true,
|
|
@@ -1937,6 +1942,13 @@
|
|
|
1937
1942
|
}
|
|
1938
1943
|
}
|
|
1939
1944
|
},
|
|
1945
|
+
"define": {
|
|
1946
|
+
"description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced.",
|
|
1947
|
+
"type": "object",
|
|
1948
|
+
"additionalProperties": {
|
|
1949
|
+
"type": "string"
|
|
1950
|
+
}
|
|
1951
|
+
},
|
|
1940
1952
|
"fileReplacements": {
|
|
1941
1953
|
"description": "Replace compilation source files with other compilation source files in the build.",
|
|
1942
1954
|
"type": "array",
|
|
@@ -3630,6 +3642,27 @@
|
|
|
3630
3642
|
"type": "boolean",
|
|
3631
3643
|
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.",
|
|
3632
3644
|
"default": false
|
|
3645
|
+
},
|
|
3646
|
+
"prebundle": {
|
|
3647
|
+
"description": "Enable and control the Vite-based development server's prebundling capabilities. To enable prebundling, the Angular CLI cache must also be enabled. This option has no effect when using the 'browser' or other Webpack-based builders.",
|
|
3648
|
+
"oneOf": [
|
|
3649
|
+
{
|
|
3650
|
+
"type": "boolean"
|
|
3651
|
+
},
|
|
3652
|
+
{
|
|
3653
|
+
"type": "object",
|
|
3654
|
+
"properties": {
|
|
3655
|
+
"exclude": {
|
|
3656
|
+
"description": "List of package imports that should not be prebundled by the development server. The packages will be bundled into the application code itself.",
|
|
3657
|
+
"type": "array",
|
|
3658
|
+
"items": {
|
|
3659
|
+
"type": "string"
|
|
3660
|
+
}
|
|
3661
|
+
}
|
|
3662
|
+
},
|
|
3663
|
+
"additionalProperties": false
|
|
3664
|
+
}
|
|
3665
|
+
]
|
|
3633
3666
|
}
|
|
3634
3667
|
},
|
|
3635
3668
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "17.2.0
|
|
3
|
+
"version": "17.2.0",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/architect": "0.1702.0
|
|
29
|
-
"@angular-devkit/core": "17.2.0
|
|
30
|
-
"@angular-devkit/schematics": "17.2.0
|
|
31
|
-
"@schematics/angular": "17.2.0
|
|
28
|
+
"@angular-devkit/architect": "0.1702.0",
|
|
29
|
+
"@angular-devkit/core": "17.2.0",
|
|
30
|
+
"@angular-devkit/schematics": "17.2.0",
|
|
31
|
+
"@schematics/angular": "17.2.0",
|
|
32
32
|
"@yarnpkg/lockfile": "1.1.0",
|
|
33
33
|
"ansi-colors": "4.1.3",
|
|
34
34
|
"ini": "4.1.1",
|
|
35
|
-
"inquirer": "9.2.
|
|
35
|
+
"inquirer": "9.2.14",
|
|
36
36
|
"jsonc-parser": "3.2.1",
|
|
37
37
|
"npm-package-arg": "11.0.1",
|
|
38
38
|
"npm-pick-manifest": "9.0.0",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
"ora": "5.4.1",
|
|
41
41
|
"pacote": "17.0.6",
|
|
42
42
|
"resolve": "1.22.8",
|
|
43
|
-
"semver": "7.
|
|
43
|
+
"semver": "7.6.0",
|
|
44
44
|
"symbol-observable": "4.0.0",
|
|
45
45
|
"yargs": "17.7.2"
|
|
46
46
|
},
|
|
47
47
|
"ng-update": {
|
|
48
48
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
49
49
|
"packageGroup": {
|
|
50
|
-
"@angular/cli": "17.2.0
|
|
51
|
-
"@angular/ssr": "17.2.0
|
|
52
|
-
"@angular-devkit/architect": "0.1702.0
|
|
53
|
-
"@angular-devkit/build-angular": "17.2.0
|
|
54
|
-
"@angular-devkit/build-webpack": "0.1702.0
|
|
55
|
-
"@angular-devkit/core": "17.2.0
|
|
56
|
-
"@angular-devkit/schematics": "17.2.0
|
|
50
|
+
"@angular/cli": "17.2.0",
|
|
51
|
+
"@angular/ssr": "17.2.0",
|
|
52
|
+
"@angular-devkit/architect": "0.1702.0",
|
|
53
|
+
"@angular-devkit/build-angular": "17.2.0",
|
|
54
|
+
"@angular-devkit/build-webpack": "0.1702.0",
|
|
55
|
+
"@angular-devkit/core": "17.2.0",
|
|
56
|
+
"@angular-devkit/schematics": "17.2.0"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
@@ -35,7 +35,6 @@ const core_1 = require("@angular-devkit/core");
|
|
|
35
35
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
36
36
|
const npa = __importStar(require("npm-package-arg"));
|
|
37
37
|
const semver = __importStar(require("semver"));
|
|
38
|
-
const error_1 = require("../../../utilities/error");
|
|
39
38
|
const package_metadata_1 = require("../../../utilities/package-metadata");
|
|
40
39
|
// Angular guarantees that a major is compatible with its following major (so packages that depend
|
|
41
40
|
// on Angular 5 are also compatible with Angular 6). This is, in code, represented by verifying
|
|
@@ -196,14 +195,7 @@ function _performUpdate(tree, context, infoMap, logger, migrateOnly) {
|
|
|
196
195
|
if (!packageJsonContent) {
|
|
197
196
|
throw new schematics_1.SchematicsException('Could not find a package.json. Are you in a Node project?');
|
|
198
197
|
}
|
|
199
|
-
|
|
200
|
-
try {
|
|
201
|
-
packageJson = JSON.parse(packageJsonContent.toString());
|
|
202
|
-
}
|
|
203
|
-
catch (e) {
|
|
204
|
-
(0, error_1.assertIsError)(e);
|
|
205
|
-
throw new schematics_1.SchematicsException('package.json could not be parsed: ' + e.message);
|
|
206
|
-
}
|
|
198
|
+
const packageJson = tree.readJson('/package.json');
|
|
207
199
|
const updateDependency = (deps, name, newVersion) => {
|
|
208
200
|
const oldVersion = deps[name];
|
|
209
201
|
// We only respect caret and tilde ranges on update.
|
|
@@ -423,11 +415,12 @@ function _buildPackageInfo(tree, packages, allDependencies, npmPackageJson, logg
|
|
|
423
415
|
}
|
|
424
416
|
// Find out the currently installed version. Either from the package.json or the node_modules/
|
|
425
417
|
// TODO: figure out a way to read package-lock.json and/or yarn.lock.
|
|
418
|
+
const pkgJsonPath = `/node_modules/${name}/package.json`;
|
|
419
|
+
const pkgJsonExists = tree.exists(pkgJsonPath);
|
|
426
420
|
let installedVersion;
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
installedVersion = content.version;
|
|
421
|
+
if (pkgJsonExists) {
|
|
422
|
+
const { version } = tree.readJson(pkgJsonPath);
|
|
423
|
+
installedVersion = version;
|
|
431
424
|
}
|
|
432
425
|
const packageVersionsNonDeprecated = [];
|
|
433
426
|
const packageVersionsDeprecated = [];
|
|
@@ -449,7 +442,7 @@ function _buildPackageInfo(tree, packages, allDependencies, npmPackageJson, logg
|
|
|
449
442
|
if (!installedVersion) {
|
|
450
443
|
throw new schematics_1.SchematicsException(`An unexpected error happened; could not determine version for package ${name}.`);
|
|
451
444
|
}
|
|
452
|
-
const installedPackageJson = npmPackageJson.versions[installedVersion] ||
|
|
445
|
+
const installedPackageJson = npmPackageJson.versions[installedVersion] || pkgJsonExists;
|
|
453
446
|
if (!installedPackageJson) {
|
|
454
447
|
throw new schematics_1.SchematicsException(`An unexpected error happened; package ${name} has no version ${installedVersion}.`);
|
|
455
448
|
}
|
|
@@ -593,22 +586,11 @@ function _addPeerDependencies(tree, packages, allDependencies, npmPackageJson, n
|
|
|
593
586
|
}
|
|
594
587
|
}
|
|
595
588
|
function _getAllDependencies(tree) {
|
|
596
|
-
const
|
|
597
|
-
if (!packageJsonContent) {
|
|
598
|
-
throw new schematics_1.SchematicsException('Could not find a package.json. Are you in a Node project?');
|
|
599
|
-
}
|
|
600
|
-
let packageJson;
|
|
601
|
-
try {
|
|
602
|
-
packageJson = JSON.parse(packageJsonContent.toString());
|
|
603
|
-
}
|
|
604
|
-
catch (e) {
|
|
605
|
-
(0, error_1.assertIsError)(e);
|
|
606
|
-
throw new schematics_1.SchematicsException('package.json could not be parsed: ' + e.message);
|
|
607
|
-
}
|
|
589
|
+
const { dependencies, devDependencies, peerDependencies } = tree.readJson('/package.json');
|
|
608
590
|
return [
|
|
609
|
-
...Object.entries(
|
|
610
|
-
...Object.entries(
|
|
611
|
-
...Object.entries(
|
|
591
|
+
...Object.entries(peerDependencies || {}),
|
|
592
|
+
...Object.entries(devDependencies || {}),
|
|
593
|
+
...Object.entries(dependencies || {}),
|
|
612
594
|
];
|
|
613
595
|
}
|
|
614
596
|
function _formatVersion(version) {
|
package/src/utilities/version.js
CHANGED
|
@@ -25,5 +25,5 @@ class Version {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
// TODO(bazel): Convert this to use build-time version stamping after flipping the build script to use bazel
|
|
28
|
-
// export const VERSION = new Version('17.2.0
|
|
28
|
+
// export const VERSION = new Version('17.2.0');
|
|
29
29
|
exports.VERSION = new Version(JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '../../package.json'), 'utf-8')).version);
|