542 Commits

Author SHA1 Message Date
Renovate Bot
8886c82552 build: update read-package-tree to version 5.3.0 2019-06-27 09:19:01 -07:00
cexbrayat
3e95474d1f feat(@angular/cli): ng doc uses angular core version by default
Follow-up to #14788 that allowed `ng doc --version 6`.
This commit enhances the doc command to use the current Angular version of the project by default, if no version is provided explicitely.

Fixes #12365
2019-06-27 09:18:32 -07:00
Hans Larsen
46ade49a2f feat(@angular/cli): report RAM in gigabytes instead of megabytes
Otherwise its too much noise. Some people have weird MB count probably due to
containers and VMs.
2019-06-27 09:17:26 -07:00
Hans Larsen
2e6d2e18b9 feat(@angular/cli): ping back when user opts out of analytics
On prompt only, does not contain any user info. Since prompt should be only
shown at install or first run, this is not going to ping more than once and
the users privacy is also protected.
2019-06-26 11:22:19 -07:00
Hans Larsen
cf86f0663e feat(@angular/cli): move non-stable version analytics to own property
And refactor it to be put magic strings in a single place.
2019-06-26 11:22:19 -07:00
Hans Larsen
51c30e5def refactor(@angular/cli): refactor isTTY() function
It was really hard to read with double negatives and such.
2019-06-26 11:22:19 -07:00
Alan
d7460517cf fix(@angular/cli): log file path normalization
In windows the logfile path in the console will be printed with both back and forward slashes if not normalized.
2019-06-25 13:28:47 -07:00
Renovate Bot
ce578ae9b3 build: update semver to version 6.1.2 2019-06-24 17:31:20 -07:00
cexbrayat
371bd6194a fix(@angular/cli): validate version in doc command
As the JSON Schema validation is minimum in the CLI, we have to also validate in code.
This PR:
- updates the JSON Schema to use `number` and `enum` instead of `integer` and `const` that are not supported.
- adds validation in the doc command implementation
- adds error reporting if the version is not valid
- fixes a typo in an error message in the parser
2019-06-24 17:30:44 -07:00
Renovate Bot
bbb12e3b86 build: update inquirer to version 6.4.1 2019-06-24 17:30:28 -07:00
Charles Lyding
c4313f55e4 refactor(@angular/cli): unify color handling and support 2019-06-24 17:27:59 -07:00
Renovate Bot
a88dce5b89 build: update inquirer to version 6.4.0 2019-06-20 10:56:58 -07:00
Renovate Bot
92b35fba23 build: update ansi-colors to version 4.0.1 2019-06-20 10:56:27 -07:00
Alan
c7135fae35 fix(@angular-devkit/build-angular): browser builder should not swollow error messages
Closes #14813
2019-06-19 17:07:27 -07:00
cexbrayat
3cd0931eb7 fix(@angular/cli): correct git branch in ng version
When testing a local CLI build with `npm link @angular/cli`, if you run `ng version`,
you currently see:

    Angular CLI: local (v8.1.0-beta.2+24.3bb67d8.with-local-changes, branch: version)

if the Git branch is `fix/version`.

Whit this PR, `ng version` now displays the proper Git branch name:

    Angular CLI: local (v8.1.0-beta.2+24.3bb67d8.with-local-changes, branch: fix/version)
2019-06-19 17:06:52 -07:00
Renovate Bot
6fcedc19bc build: update pacote to version 9.5.1 2019-06-18 18:25:08 -07:00
Charles Lyding
3dced5491b feat(@angular/cli): log unhandled exceptions
Whenever an unhandled exception during command processing occurs, the message and stack trace will be saved to a debug log located in a temporary directory.  The user will be informed of the log location as well as the exception message and instructions to file a bug report at the GitHub repository.
2019-06-17 12:14:20 -07:00
Charles Lyding
a70932b1ac refactor(@angular/cli): standardize color handling and support checking
Node.js 10+ provides built-in functionality to test for color support based on chalk's `supports-color` package as well as several others. This alleviates the need for custom code or third-party packages to determine color support.  In addition for this PR, the `ansi-colors` package is added to the CLI which provides color, cross-platform symbol, and style/color removal support.  The package is light-weight, contains typings, and has no dependencies. The removal support is leveraged to remove all styling from logger messages when color is not supported.  This removes a current defect in which color/styling is still displayed if generated manually or via methods that do not perform supportability checks.  Finally, the typically used console functions are overriden to leverage the logger to ensure that the color processing is applied to third-party code (e.g., webpack internally as well as some of its loaders and plugins) which output to the console directly.
2019-06-17 11:03:21 -07:00
Lakhyari
58599e125e feat(@angular/cli): ng doc accepts a version flag
With this commit, we can now specify a `version`
for the `ng doc` command

    ng doc --version 6
    ng doc -v 6

and this will open `v6.angular.io` instead of `angular.io`.
The default domain is still used
if no version is specified.

Refs #12365
2019-06-17 11:02:56 -07:00
Charles Lyding
e6feb0d0db fix(@angular/cli): ensure analytics prompt exceptions are caught
Fixes #14684
2019-06-14 12:58:01 -07:00
Charles Lyding
dea6bb317b fix(@angular/cli): only enable CLI 1.x update handling when no new config
Fixes #14703
2019-06-11 14:23:04 -07:00
Judy Bogart
dc117324ac docs: differentiate lib build from app build 2019-06-11 10:23:43 -07:00
Charles Lyding
09149fe5e4 fix(@angular/cli): allow update when git is unclean outside the workspace 2019-06-11 09:53:56 -07:00
Charles Lyding
2334a7c030 fix(@angular/cli): use recommended TTY check logic
`stdin` can be redirected/piped by various shells but still be interactive.  Node.js recommends only testing `stdout`: https://nodejs.org/api/tty.html#tty_tty

Fixes #14640
2019-06-06 14:28:36 -07:00
Charles Lyding
ed4baa4884 fix(@angular/cli): avoid updating when package is already up to date
Fixes #14647
2019-06-06 14:24:36 -07:00
Charles Lyding
2d27cb4671 fix(@angular/cli): resolve update migrations from referenced package root
This ensures that migration fields that reference other packages use the package version specified in the migrating package's dependencies and not the version that a package manager happens to hoist to the root of the workspace.
2019-06-06 14:22:02 -07:00
Matt Lewis
ef981d63b7 fix(@angular/cli): add analytics option to options schema 2019-06-06 14:16:23 -07:00
Renovate Bot
e7419d5d24 build: update semver to version 6.1.1 2019-05-30 14:05:06 -07:00
Charles Lyding
aceaacde50 fix(@angular/cli): provide an option to update dirty repositories 2019-05-30 13:55:14 -07:00
Charles Lyding
410b56e107 fix(@angular/cli): check for CI environment variable in tty helper
Fixes #14563
2019-05-30 12:32:01 +02:00
Alan Agius
757d8df3e6 fix(@angular/cli): ng config doesn't parse positional array
Fixes #14516
2019-05-28 21:01:13 +02:00
Alan Agius
db344641f4 fix(@angular/cli): ng generate --help shows the wrong collection
At the moment, collectionName and schematicCollections are not set in various schematics command which result in fallbacking to the hardcoded default collectionName https://github.com/angular/angular-cli/blob/master/packages/angular/cli/models/schematic-command.ts#L79

Hence, this will result in incorrect information being present when using the `--help`, `--list`.

Fixes #14519
2019-05-28 20:57:21 +02:00
Renovate Bot
db819cbd2c build: update semver to version 6.1.0 2019-05-23 19:16:31 +02:00
Charles Lyding
b336cc7798 fix(@angular/cli): ensure git repository is clean before updates
If not asking for update status then this change checks for a clean git repository before proceeding.  This allows the user to easily reset any changes from the update and avoid any developer code changes from being mixed with update changes.
2019-05-23 19:13:41 +02:00
Charles Lyding
57189f6eca fix(@angular/cli): standardize TTY checks 2019-05-22 10:02:58 +02:00
Charles Lyding
4130191877 fix(@angular/cli): show analytics prompt when no global configuration file
Fixes #14486
2019-05-22 10:02:58 +02:00
Charles Lyding
8f0b3eb09a fix(@angular/cli): show error when using x18n command on Node.js 12.0
Node.js 12.0 contains a defect which will cause the command to crash.  This is due to the locale support in Node.js 12.0 (ICU).  ref: https://github.com/nodejs/node/issues/27379
2019-05-22 10:02:13 +02:00
Alan
8e3efaf70b docs: update project description to full application instead of app 2019-05-21 09:09:42 -04:00
Alex Eagle
ec731f0454 docs: don't reference next.angular.io
When we cut a release, this moves to angular.io.
Use v8.angular.io in places where angular.io is currently a 404.

Fixes https://github.com/angular/angular/issues/30407
2019-05-21 09:08:40 -04:00
Charles Lyding
b7fc6125e5 fix(@angular/cli): improve error handling of update command
This adds extensive option checking and error handling with the goal to catch user errors as early in the process as possible.  Bad option combinations and/or values will result in actionable information and stop the process before network access and processing occurs.
2019-05-15 14:34:03 -07:00
Charles Lyding
b12118eae9 refactor(@angular/cli): remove unused npm install task type 2019-05-15 14:34:03 -07:00
Keen Yee Liau
ff2600b417 fix(@angular/cli): @bazel/* are not shown in ng version
Update `ng version` to show versions for @bazel/* packages to help users
report meaningful errors when they opt in to Bazel.
2019-05-15 14:15:03 -07:00
Charles Lyding
290898536b fix(@angular/cli): prevent nested schematic execution from generating analytics
Fixes #14190
2019-05-15 14:11:48 -07:00
Renovate Bot
e5cf843aeb build: update open to version 6.3.0 2019-05-13 15:55:29 -07:00
Charles Lyding
3912fdee5d fix(@angular/cli): enable analytics for safe builders
Fixes #14355
2019-05-13 15:55:15 -07:00
Captain Caius
c652ec7456 docs: describe prod flag more explicitly 2019-05-10 15:06:50 -07:00
Charles Lyding
7a72f2fb17 refactor(@angular/cli): avoid aggressive eager command loading
Currently, upon execution `ng` will load all description files AND code for all available commands.  This requires a large amount of unnecessary file access and processing since only at most one command will be executed.  This change limits the loading to only command being executed in the common case and a subset of commands in the event an alias is used.  The help command now loads all commands during its execution which is needed to gather command description information.  Further improvements are possible by only loading the necessary metadata instead of the execution code (and its dependencies) as well.
This change allows for savings of ~250ms per execution.

Examples:
Before -- `./node_modules/.bin/ng version  0.99s user 0.17s system 113% cpu 1.020 total`
After -- `./node_modules/.bin/ng version  0.70s user 0.13s system 110% cpu 0.749 total`

Before -- `./node_modules/.bin/ng g c a  1.91s user 0.30s system 111% cpu 1.996 total`
After -- `./node_modules/.bin/ng g c a  1.62s user 0.27s system 110% cpu 1.715 total`
2019-05-10 15:04:32 -07:00
Alan Agius
2521a39559 fix(@angular/cli): print full error when package is not found 2019-05-09 10:12:21 -07:00
Charles Lyding
8254cfe87f fix(@angular/cli): honor builder schema additional properties option
Fixes #14354
2019-05-09 10:07:42 -07:00
Judy Bogart
5b3ee079d7 docs: edit reference doc for update command 2019-05-07 16:23:54 -06:00