When running a command with args against multiple targets, all targets
should be given the args. As parseArguments was mutating the passed args
array this wasn't the case. Fix by not mutating the array.
This was especially noticeable when using the `ng lint --fix` command
on a newly generated project, as files in the app target would be fixed,
but e2e target would be only be linted (with no fix)
Possibly closes#10657, #10656, #11005
The feature comes from the "x-deprecated" field in schemas (any schema that is used
to parse arguments), and can be a boolean or a string.
The parser now takes a logger and will warn users when encountering a deprecated
option. These options will also appear in JSON help.
And numerical positional flags will be ignored.
If the value is an empty string, a number conversion would give 0. It is unexpected
from the user standpoint ("--num=" has the user expect a string value).
If a flag is followed by an equal sign, just treat it as a long name. So
the example above would translate to --a=value, while -abc=123 would be
"-a -b -c=123".
Fixes#12308
--help now accepts a value which can be a boolean or a string. If the value
is not understood we simply show a message to the user that it was invalid.