@angular/cli 15.0.0-rc.0 → 15.0.0-rc.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/bin/ng.js +10 -0
- package/lib/init.js +3 -1
- package/package.json +13 -13
- package/src/commands/add/cli.js +8 -2
- package/src/commands/analytics/cli.d.ts +1 -1
- package/src/commands/analytics/cli.js +3 -1
- package/src/commands/analytics/long-description.md +20 -0
- package/src/commands/config/long-description.md +1 -1
package/bin/ng.js
CHANGED
|
@@ -20,6 +20,16 @@ try {
|
|
|
20
20
|
process.title = 'ng';
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const rawCommandName = process.argv[2];
|
|
24
|
+
|
|
25
|
+
if (rawCommandName === '--get-yargs-completions' || rawCommandName === 'completion') {
|
|
26
|
+
// Skip Node.js supported checks when running ng completion.
|
|
27
|
+
// A warning at this stage could cause a broken source action (`source <(ng completion script)`) when in the shell init script.
|
|
28
|
+
require('./bootstrap');
|
|
29
|
+
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
23
33
|
// This node version check ensures that extremely old versions of node are not used.
|
|
24
34
|
// These may not support ES2015 features such as const/let/async/await/etc.
|
|
25
35
|
// These would then crash with a hard to diagnose error message.
|
package/lib/init.js
CHANGED
|
@@ -101,7 +101,9 @@ let forceExit = false;
|
|
|
101
101
|
console.error('Version mismatch check skipped. Unable to compare local version: ' + error);
|
|
102
102
|
}
|
|
103
103
|
// When using the completion command, don't show the warning as otherwise this will break completion.
|
|
104
|
-
if (isGlobalGreater &&
|
|
104
|
+
if (isGlobalGreater &&
|
|
105
|
+
rawCommandName !== '--get-yargs-completions' &&
|
|
106
|
+
rawCommandName !== 'completion') {
|
|
105
107
|
// If using the update command and the global version is greater, use the newer update command
|
|
106
108
|
// This allows improvements in update to be used in older versions that do not have bootstrapping
|
|
107
109
|
if (rawCommandName === 'update' &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "15.0.0-rc.
|
|
3
|
+
"version": "15.0.0-rc.1",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/architect": "0.1500.0-rc.
|
|
29
|
-
"@angular-devkit/core": "15.0.0-rc.
|
|
30
|
-
"@angular-devkit/schematics": "15.0.0-rc.
|
|
31
|
-
"@schematics/angular": "15.0.0-rc.
|
|
28
|
+
"@angular-devkit/architect": "0.1500.0-rc.1",
|
|
29
|
+
"@angular-devkit/core": "15.0.0-rc.1",
|
|
30
|
+
"@angular-devkit/schematics": "15.0.0-rc.1",
|
|
31
|
+
"@schematics/angular": "15.0.0-rc.1",
|
|
32
32
|
"@yarnpkg/lockfile": "1.1.0",
|
|
33
33
|
"ansi-colors": "4.1.3",
|
|
34
34
|
"ini": "3.0.1",
|
|
35
35
|
"inquirer": "8.2.4",
|
|
36
36
|
"jsonc-parser": "3.2.0",
|
|
37
37
|
"npm-package-arg": "9.1.2",
|
|
38
|
-
"npm-pick-manifest": "8.0.
|
|
38
|
+
"npm-pick-manifest": "8.0.1",
|
|
39
39
|
"open": "8.4.0",
|
|
40
40
|
"ora": "5.4.1",
|
|
41
|
-
"pacote": "15.0.
|
|
41
|
+
"pacote": "15.0.3",
|
|
42
42
|
"resolve": "1.22.1",
|
|
43
43
|
"semver": "7.3.8",
|
|
44
44
|
"symbol-observable": "4.0.0",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"ng-update": {
|
|
48
48
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
49
49
|
"packageGroup": {
|
|
50
|
-
"@angular/cli": "15.0.0-rc.
|
|
51
|
-
"@angular-devkit/architect": "0.1500.0-rc.
|
|
52
|
-
"@angular-devkit/build-angular": "15.0.0-rc.
|
|
53
|
-
"@angular-devkit/build-webpack": "0.1500.0-rc.
|
|
54
|
-
"@angular-devkit/core": "15.0.0-rc.
|
|
55
|
-
"@angular-devkit/schematics": "15.0.0-rc.
|
|
50
|
+
"@angular/cli": "15.0.0-rc.1",
|
|
51
|
+
"@angular-devkit/architect": "0.1500.0-rc.1",
|
|
52
|
+
"@angular-devkit/build-angular": "15.0.0-rc.1",
|
|
53
|
+
"@angular-devkit/build-webpack": "0.1500.0-rc.1",
|
|
54
|
+
"@angular-devkit/core": "15.0.0-rc.1",
|
|
55
|
+
"@angular-devkit/schematics": "15.0.0-rc.1"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
package/src/commands/add/cli.js
CHANGED
|
@@ -25,6 +25,7 @@ const package_metadata_1 = require("../../utilities/package-metadata");
|
|
|
25
25
|
const prompt_1 = require("../../utilities/prompt");
|
|
26
26
|
const spinner_1 = require("../../utilities/spinner");
|
|
27
27
|
const tty_1 = require("../../utilities/tty");
|
|
28
|
+
const version_1 = require("../../utilities/version");
|
|
28
29
|
/**
|
|
29
30
|
* The set of packages that should have certain versions excluded from consideration
|
|
30
31
|
* when attempting to find a compatible version for a package.
|
|
@@ -33,6 +34,8 @@ const tty_1 = require("../../utilities/tty");
|
|
|
33
34
|
const packageVersionExclusions = {
|
|
34
35
|
// @angular/localize@9.x versions do not have peer dependencies setup
|
|
35
36
|
'@angular/localize': '9.x',
|
|
37
|
+
// @angular/material@7.x versions have unbounded peer dependency ranges (>=7.0.0)
|
|
38
|
+
'@angular/material': '7.x',
|
|
36
39
|
};
|
|
37
40
|
class AddCommandModule extends schematics_command_module_1.SchematicsCommandModule {
|
|
38
41
|
constructor() {
|
|
@@ -139,10 +142,12 @@ class AddCommandModule extends schematics_command_module_1.SchematicsCommandModu
|
|
|
139
142
|
}
|
|
140
143
|
else if (!latestManifest || (await this.hasMismatchedPeer(latestManifest))) {
|
|
141
144
|
// 'latest' is invalid so search for most recent matching package
|
|
145
|
+
// Allow prelease versions if the CLI itself is a prerelease
|
|
146
|
+
const allowPrereleases = (0, semver_1.prerelease)(version_1.VERSION.full);
|
|
142
147
|
const versionExclusions = packageVersionExclusions[packageMetadata.name];
|
|
143
148
|
const versionManifests = Object.values(packageMetadata.versions).filter((value) => {
|
|
144
149
|
// Prerelease versions are not stable and should not be considered by default
|
|
145
|
-
if ((0, semver_1.prerelease)(value.version)) {
|
|
150
|
+
if (!allowPrereleases && (0, semver_1.prerelease)(value.version)) {
|
|
146
151
|
return false;
|
|
147
152
|
}
|
|
148
153
|
// Deprecated versions should not be used or considered
|
|
@@ -155,7 +160,8 @@ class AddCommandModule extends schematics_command_module_1.SchematicsCommandModu
|
|
|
155
160
|
}
|
|
156
161
|
return true;
|
|
157
162
|
});
|
|
158
|
-
|
|
163
|
+
// Sort in reverse SemVer order so that the newest compatible version is chosen
|
|
164
|
+
versionManifests.sort((a, b) => (0, semver_1.compare)(b.version, a.version, true));
|
|
159
165
|
let newIdentifier;
|
|
160
166
|
for (const versionManifest of versionManifests) {
|
|
161
167
|
if (!(await this.hasMismatchedPeer(versionManifest))) {
|
|
@@ -10,7 +10,7 @@ import { CommandModule, CommandModuleImplementation, Options } from '../../comma
|
|
|
10
10
|
export declare class AnalyticsCommandModule extends CommandModule implements CommandModuleImplementation {
|
|
11
11
|
command: string;
|
|
12
12
|
describe: string;
|
|
13
|
-
longDescriptionPath
|
|
13
|
+
longDescriptionPath: string;
|
|
14
14
|
builder(localYargs: Argv): Argv;
|
|
15
15
|
run(_options: Options<{}>): void;
|
|
16
16
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.AnalyticsCommandModule = void 0;
|
|
11
|
+
const node_path_1 = require("node:path");
|
|
11
12
|
const command_module_1 = require("../../command-builder/command-module");
|
|
12
13
|
const command_1 = require("../../command-builder/utilities/command");
|
|
13
14
|
const cli_1 = require("./info/cli");
|
|
@@ -16,7 +17,8 @@ class AnalyticsCommandModule extends command_module_1.CommandModule {
|
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
18
19
|
this.command = 'analytics';
|
|
19
|
-
this.describe = 'Configures the gathering of Angular CLI usage metrics.
|
|
20
|
+
this.describe = 'Configures the gathering of Angular CLI usage metrics.';
|
|
21
|
+
this.longDescriptionPath = (0, node_path_1.join)(__dirname, 'long-description.md');
|
|
20
22
|
}
|
|
21
23
|
builder(localYargs) {
|
|
22
24
|
const subcommands = [
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
You can help the Angular Team to prioritize features and improvements by permitting the Angular team to send command-line command usage statistics to Google.
|
|
2
|
+
The Angular Team does not collect usage statistics unless you explicitly opt in. When installing the Angular CLI you are prompted to allow global collection of usage statistics.
|
|
3
|
+
If you say no or skip the prompt, no data is collected.
|
|
4
|
+
|
|
5
|
+
### What is collected?
|
|
6
|
+
|
|
7
|
+
Usage analytics include the commands and selected flags for each execution.
|
|
8
|
+
Usage analytics may include the following information:
|
|
9
|
+
|
|
10
|
+
- Your operating system \(macOS, Linux distribution, Windows\) and its version.
|
|
11
|
+
- Package manager name and version \(local version only\).
|
|
12
|
+
- Node.js version \(local version only\).
|
|
13
|
+
- Angular CLI version \(local version only\).
|
|
14
|
+
- Command name that was run.
|
|
15
|
+
- Workspace information, the number of application and library projects.
|
|
16
|
+
- For schematics commands \(add, generate and new\), the schematic collection and name and a list of selected flags.
|
|
17
|
+
- For build commands \(build, serve\), the builder name, the number and size of bundles \(initial and lazy\), compilation units, the time it took to build and rebuild, and basic Angular-specific API usage.
|
|
18
|
+
|
|
19
|
+
Only Angular owned and developed schematics and builders are reported.
|
|
20
|
+
Third-party schematics and builders do not send data to the Angular Team.
|
|
@@ -10,4 +10,4 @@ while on the command line options can be given dash-case.
|
|
|
10
10
|
|
|
11
11
|
For further details, see [Workspace Configuration](guide/workspace-config).
|
|
12
12
|
|
|
13
|
-
For configuration of CLI usage analytics, see [
|
|
13
|
+
For configuration of CLI usage analytics, see [ng analytics](cli/analytics).
|