@angular/cli 14.0.2 → 14.0.3
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/init.js +4 -2
- package/package.json +11 -11
- package/src/command-builder/command-module.js +25 -2
- package/src/commands/run/cli.js +10 -0
package/lib/init.js
CHANGED
|
@@ -93,10 +93,12 @@ let forceExit = false;
|
|
|
93
93
|
// eslint-disable-next-line no-console
|
|
94
94
|
console.error('Version mismatch check skipped. Unable to compare local version: ' + error);
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
const rawCommandName = process.argv[2];
|
|
97
|
+
// When using the completion command, don't show the warning as otherwise this will break completion.
|
|
98
|
+
if (isGlobalGreater && rawCommandName !== 'completion') {
|
|
97
99
|
// If using the update command and the global version is greater, use the newer update command
|
|
98
100
|
// This allows improvements in update to be used in older versions that do not have bootstrapping
|
|
99
|
-
if (
|
|
101
|
+
if (rawCommandName === 'update' &&
|
|
100
102
|
cli.VERSION &&
|
|
101
103
|
cli.VERSION.major - globalVersion.major <= 1) {
|
|
102
104
|
cli = await Promise.resolve().then(() => __importStar(require('./cli')));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.3",
|
|
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.1400.
|
|
29
|
-
"@angular-devkit/core": "14.0.
|
|
30
|
-
"@angular-devkit/schematics": "14.0.
|
|
31
|
-
"@schematics/angular": "14.0.
|
|
28
|
+
"@angular-devkit/architect": "0.1400.3",
|
|
29
|
+
"@angular-devkit/core": "14.0.3",
|
|
30
|
+
"@angular-devkit/schematics": "14.0.3",
|
|
31
|
+
"@schematics/angular": "14.0.3",
|
|
32
32
|
"@yarnpkg/lockfile": "1.1.0",
|
|
33
33
|
"ansi-colors": "4.1.1",
|
|
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.0.
|
|
53
|
-
"@angular-devkit/architect": "0.1400.
|
|
54
|
-
"@angular-devkit/build-angular": "14.0.
|
|
55
|
-
"@angular-devkit/build-webpack": "0.1400.
|
|
56
|
-
"@angular-devkit/core": "14.0.
|
|
57
|
-
"@angular-devkit/schematics": "14.0.
|
|
52
|
+
"@angular/cli": "14.0.3",
|
|
53
|
+
"@angular-devkit/architect": "0.1400.3",
|
|
54
|
+
"@angular-devkit/build-angular": "14.0.3",
|
|
55
|
+
"@angular-devkit/build-webpack": "0.1400.3",
|
|
56
|
+
"@angular-devkit/core": "14.0.3",
|
|
57
|
+
"@angular-devkit/schematics": "14.0.3"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
@@ -149,6 +149,7 @@ class CommandModule {
|
|
|
149
149
|
* **Note:** This method should be called from the command bundler method.
|
|
150
150
|
*/
|
|
151
151
|
addSchemaOptionsToCommand(localYargs, options) {
|
|
152
|
+
const booleanOptionsWithNoPrefix = new Set();
|
|
152
153
|
for (const option of options) {
|
|
153
154
|
const { default: defaultVal, positional, deprecated, description, alias, userAnalytics, type, hidden, name, choices, } = option;
|
|
154
155
|
const sharedOptions = {
|
|
@@ -160,14 +161,24 @@ class CommandModule {
|
|
|
160
161
|
// This should only be done when `--help` is used otherwise default will override options set in angular.json.
|
|
161
162
|
...(this.context.args.options.help ? { default: defaultVal } : {}),
|
|
162
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
|
+
let dashedName = core_1.strings.dasherize(name);
|
|
167
|
+
if (type === 'boolean' && dashedName.startsWith('no-')) {
|
|
168
|
+
dashedName = dashedName.slice(3);
|
|
169
|
+
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
|
+
}
|
|
163
174
|
if (positional === undefined) {
|
|
164
|
-
localYargs = localYargs.option(
|
|
175
|
+
localYargs = localYargs.option(dashedName, {
|
|
165
176
|
type,
|
|
166
177
|
...sharedOptions,
|
|
167
178
|
});
|
|
168
179
|
}
|
|
169
180
|
else {
|
|
170
|
-
localYargs = localYargs.positional(
|
|
181
|
+
localYargs = localYargs.positional(dashedName, {
|
|
171
182
|
type: type === 'array' || type === 'count' ? 'string' : type,
|
|
172
183
|
...sharedOptions,
|
|
173
184
|
});
|
|
@@ -177,6 +188,18 @@ class CommandModule {
|
|
|
177
188
|
this.optionsWithAnalytics.set(name, userAnalytics);
|
|
178
189
|
}
|
|
179
190
|
}
|
|
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.
|
|
193
|
+
if (booleanOptionsWithNoPrefix.size) {
|
|
194
|
+
localYargs.middleware((options) => {
|
|
195
|
+
for (const key of booleanOptionsWithNoPrefix) {
|
|
196
|
+
if (key in options) {
|
|
197
|
+
options[`no-${key}`] = !options[key];
|
|
198
|
+
delete options[key];
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}, false);
|
|
202
|
+
}
|
|
180
203
|
return localYargs;
|
|
181
204
|
}
|
|
182
205
|
getWorkspaceOrThrow() {
|
package/src/commands/run/cli.js
CHANGED
|
@@ -30,6 +30,16 @@ class RunCommandModule extends architect_base_command_module_1.ArchitectBaseComm
|
|
|
30
30
|
// Also, hide choices from JSON help so that we don't display them in AIO.
|
|
31
31
|
choices: (getYargsCompletions || help) && !jsonHelp ? this.getTargetChoices() : undefined,
|
|
32
32
|
})
|
|
33
|
+
.middleware((args) => {
|
|
34
|
+
// TODO: remove in version 15.
|
|
35
|
+
const { configuration, target } = args;
|
|
36
|
+
if (typeof configuration === 'string' && target) {
|
|
37
|
+
const targetWithConfig = target.split(':', 2);
|
|
38
|
+
targetWithConfig.push(configuration);
|
|
39
|
+
throw new command_module_1.CommandModuleError('Unknown argument: configuration.\n' +
|
|
40
|
+
`Provide the configuration as part of the target 'ng run ${targetWithConfig.join(':')}'.`);
|
|
41
|
+
}
|
|
42
|
+
}, true)
|
|
33
43
|
.strict();
|
|
34
44
|
const target = this.makeTargetSpecifier();
|
|
35
45
|
if (!target) {
|