@angular/cli 14.1.0-next.4 → 14.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.
@@ -1240,7 +1240,6 @@
1240
1240
  "title": "Library Options Schema",
1241
1241
  "type": "object",
1242
1242
  "description": "Creates a new, generic library project in the current workspace.",
1243
- "long-description": "./library-long.md",
1244
1243
  "additionalProperties": false,
1245
1244
  "properties": {
1246
1245
  "name": {
package/lib/init.js CHANGED
@@ -63,6 +63,7 @@ let forceExit = false;
63
63
  return (await Promise.resolve().then(() => __importStar(require('./cli')))).default;
64
64
  }
65
65
  let cli;
66
+ const rawCommandName = process.argv[2];
66
67
  try {
67
68
  // No error implies a projectLocalCli, which will load whatever
68
69
  // version of ng-cli you have installed in a local package.json
@@ -84,6 +85,10 @@ let forceExit = false;
84
85
  // Ensure older versions of the CLI fully exit
85
86
  if ((0, semver_1.major)(localVersion) < 14) {
86
87
  forceExit = true;
88
+ // Versions prior to 14 didn't implement completion command.
89
+ if (rawCommandName === 'completion') {
90
+ return null;
91
+ }
87
92
  }
88
93
  let isGlobalGreater = false;
89
94
  try {
@@ -93,7 +98,6 @@ let forceExit = false;
93
98
  // eslint-disable-next-line no-console
94
99
  console.error('Version mismatch check skipped. Unable to compare local version: ' + error);
95
100
  }
96
- const rawCommandName = process.argv[2];
97
101
  // When using the completion command, don't show the warning as otherwise this will break completion.
98
102
  if (isGlobalGreater && rawCommandName !== 'completion') {
99
103
  // If using the update command and the global version is greater, use the newer update command
@@ -125,14 +129,10 @@ let forceExit = false;
125
129
  }
126
130
  return cli;
127
131
  })()
128
- .then((cli) => {
129
- return cli({
130
- cliArgs: process.argv.slice(2),
131
- inputStream: process.stdin,
132
- outputStream: process.stdout,
133
- });
134
- })
135
- .then((exitCode) => {
132
+ .then((cli) => cli === null || cli === void 0 ? void 0 : cli({
133
+ cliArgs: process.argv.slice(2),
134
+ }))
135
+ .then((exitCode = 0) => {
136
136
  if (forceExit) {
137
137
  process.exit(exitCode);
138
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "14.1.0-next.4",
3
+ "version": "14.1.0-rc.0",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.1401.0-next.4",
29
- "@angular-devkit/core": "14.1.0-next.4",
30
- "@angular-devkit/schematics": "14.1.0-next.4",
31
- "@schematics/angular": "14.1.0-next.4",
28
+ "@angular-devkit/architect": "0.1401.0-rc.0",
29
+ "@angular-devkit/core": "14.1.0-rc.0",
30
+ "@angular-devkit/schematics": "14.1.0-rc.0",
31
+ "@schematics/angular": "14.1.0-rc.0",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.3",
34
34
  "debug": "4.3.4",
@@ -49,12 +49,12 @@
49
49
  "ng-update": {
50
50
  "migrations": "@schematics/angular/migrations/migration-collection.json",
51
51
  "packageGroup": {
52
- "@angular/cli": "14.1.0-next.4",
53
- "@angular-devkit/architect": "0.1401.0-next.4",
54
- "@angular-devkit/build-angular": "14.1.0-next.4",
55
- "@angular-devkit/build-webpack": "0.1401.0-next.4",
56
- "@angular-devkit/core": "14.1.0-next.4",
57
- "@angular-devkit/schematics": "14.1.0-next.4"
52
+ "@angular/cli": "14.1.0-rc.0",
53
+ "@angular-devkit/architect": "0.1401.0-rc.0",
54
+ "@angular-devkit/build-angular": "14.1.0-rc.0",
55
+ "@angular-devkit/build-webpack": "0.1401.0-rc.0",
56
+ "@angular-devkit/core": "14.1.0-rc.0",
57
+ "@angular-devkit/schematics": "14.1.0-rc.0"
58
58
  }
59
59
  },
60
60
  "engines": {
@@ -161,15 +161,11 @@ class CommandModule {
161
161
  // This should only be done when `--help` is used otherwise default will override options set in angular.json.
162
162
  ...(this.context.args.options.help ? { default: defaultVal } : {}),
163
163
  };
164
- // TODO(alanagius4): remove in a major version.
165
- // the below is an interim workaround to handle options which have been defined in the schema with `no` prefix.
166
164
  let dashedName = core_1.strings.dasherize(name);
165
+ // Handle options which have been defined in the schema with `no` prefix.
167
166
  if (type === 'boolean' && dashedName.startsWith('no-')) {
168
167
  dashedName = dashedName.slice(3);
169
168
  booleanOptionsWithNoPrefix.add(dashedName);
170
- // eslint-disable-next-line no-console
171
- console.warn(`Warning: '${name}' option has been declared with a 'no' prefix in the schema.` +
172
- 'Please file an issue with the author of this package.');
173
169
  }
174
170
  if (positional === undefined) {
175
171
  localYargs = localYargs.option(dashedName, {
@@ -188,8 +184,7 @@ class CommandModule {
188
184
  this.optionsWithAnalytics.set(name, userAnalytics);
189
185
  }
190
186
  }
191
- // TODO(alanagius4): remove in a major version.
192
- // the below is an interim workaround to handle options which have been defined in the schema with `no` prefix.
187
+ // Handle options which have been defined in the schema with `no` prefix.
193
188
  if (booleanOptionsWithNoPrefix.size) {
194
189
  localYargs.middleware((options) => {
195
190
  for (const key of booleanOptionsWithNoPrefix) {