179 Commits

Author SHA1 Message Date
Alan Agius
64cc005f0b refactor: change UPDATE action color to cyan 2020-09-14 16:36:30 -04:00
Alan Agius
a21eb1588e fix(@angular/cli): improve logs in ng update
These addresses;
- When a large number of migration are executed, it's hard to differentiate between the title and description.
- Fix alignments of logs
2020-09-14 16:36:30 -04:00
Charles Lyding
b6ea1ab15e fix(@angular/cli): remove version command node module assumptions
This change removes all direct usage of the `node_modules` directory from the version command.  This provides improved support for yarn PnP as well as prevents a crash when a workspace does not have a `node_modules` directory.

Fixes #10474
2020-09-14 07:23:55 -04:00
Keen Yee Liau
297fc923ab build: remove experimental build event protocol 2020-09-11 13:24:38 -04:00
Andrei Alecu
d01d647431 refactor(@angular/cli): improve update package discovery 2020-09-03 18:21:06 +02:00
Charles Lyding
5275892f63 refactor(@angular/cli): remove any type usage 2020-08-24 07:50:01 -04:00
Charles Lyding
97637abab4 refactor(@angular/cli): replace experimental workspace API with stable API
This change removes one of the last usages of the experimental workspace API.
2020-08-17 18:05:27 +02:00
Alan Agius
c824bbb4f7 refactor(@angular/cli): update CLI package to be strict compliant 2020-08-12 19:29:13 +01:00
Alan Agius
fc5d2b3ff2 test: remove tsconfig.base.json from test cases 2020-08-12 19:26:12 +01:00
Keen Yee Liau
fa9136a971 build: minor fixes for google3 sync
This commit makes a few minor changes to enable syncing the CLI repository
into google3.

1. mark pkg_tar and pkg_npm as external
2. remove dependencies (marked as comment) which are stale in google3
3. remove TS files generated from JSON schema in BUILD files since these
   files are compiled and added to the g3 codebase at sync time
4. Some minor typing changes
5. Remove duplicate licenses
6. mark dependencies which are not available in g3 as external
7. Immediately type the result of JSON.parse() as required by g3 linter.
   Otherwise, the type defaults to `any`.
2020-07-24 22:52:22 +02:00
Alan Agius
05588fcee1 refactor: clean up unused code and imports 2020-07-24 08:01:52 +02:00
Vlad Tansky
9fb21644c7 docs: fix typo in ng update --next description
according to https://github.com/angular/angular-cli/pull/18306#issuecomment-660988904
2020-07-21 10:25:53 +01:00
Vlad Tansky
c8e5f7d167 docs: fix typo in ng update --next description 2020-07-21 10:25:53 +01:00
Alan Agius
ef465487fd fix(@angular/cli): resolve external schematics from workspace root
Resolve schematics collections from the workspace root, as otherwise it will be resolved from the temporary installed CLI version

Closes #18083
2020-07-01 11:29:25 -07:00
Alan Agius
93e253bc93 refactor: rename tsconfig.json to tsconfig.base.json 2020-05-20 12:12:33 -07:00
Alan Agius
b66b9b8161 refactor(@angular/cli): remove deprecated get/set commands
BREAKING CHANGE:
Deprecated `ng set` and `ng get` have been removed, use `ng config` instead.
2020-05-07 10:38:12 -07:00
Alan Agius
28f87cb312 refactor(@angular/cli): remove deprecated typescriptMismatch
BREAKING CHANGE:
Removed deprecated `typescriptMismatch` warning option. Users will be migrated off this option automatically. Users wishing to disable TypeScript version checks should use the Angular compiler option `disableTypeScriptVersionCheck`, see https://angular.io/guide/angular-compiler-options#disabletypescriptversioncheck for more information.
2020-05-07 10:37:48 -07:00
Alan Agius
57bc38e9fa fix(@angular/cli): allow configuration option in ng deploy
Fixes #17613
2020-05-04 10:54:19 -07:00
Alan Agius
493aa74019 docs: update analytics command aio link 2020-04-23 10:33:05 -07:00
Alan Agius
4d2d6cdc22 fix(@angular/cli): allow configuration option in ng deploy
Previously we only allowed `--project` and `--help` as a valid options. With this change we also allow `--configuration`

Fixes #17332
2020-03-30 16:13:05 -07:00
Alan Agius
4f50aa0e40 fix(@angular/cli): display post migration message when updating from previous major version
Fixes #17256
2020-03-23 14:18:06 -07:00
Tarik Alani
b518cb8d69 docs: update latest angular version referenced in docs
Update upgrade guide to reference version 9 as the latest angular version
2020-03-19 09:47:25 -07:00
Alan Agius
66b218c5f6 fix(@angular/cli): print ng update errors stack to log file
When an error occurs during ng update we currently discard the stack trace which in some cases made it hard to identify the cause of the error.

Now, we print the stack trace to a log file similarly to unhandled exceptions.

Example of CMD output;
```cmd
** Executing migrations of package '@angular/core' **

> Static flag migration.
  Removes the `static` flag from dynamic queries.
  As of Angular 9, the "static" flag defaults to false and is no longer required for your view and content queries.
  Read more about this here: https://v9.angular.io/guide/migration-dynamic-flag
× Migration failed: x
  See "C:\Users\alag\AppData\Local\Temp\ng-NgmC1G\angular-errors.log" for further details.
```

Example of log file contents:
```txt
[error] Error: x
    at UpdateCommand.executeSchematic (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:98:19)
    at UpdateCommand.executePackageMigrations (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:167:39)
    at UpdateCommand.executeMigrations (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:161:21)
    at UpdateCommand.run (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:394:38)
    at async UpdateCommand.validateAndRun (C:\git\angular-cli\test\node_modules\@angular\cli\models\command.js:134:28)
    at async Object.runCommand (C:\git\angular-cli\test\node_modules\@angular\cli\models\command-runner.js:201:24)
    at async default_1 (C:\git\angular-cli\test\node_modules\@angular\cli\lib\cli\index.js:62:31)
```
2020-02-18 12:43:35 -08:00
Charles Lyding
f4127b5b43 fix(@angular/cli): fully use add command registry option when installing packages
Fixes: #16766
2020-02-10 16:02:05 -08:00
John Papa
5f3ff00dd8 fix(@angular/cli): added clarity on angular cli version issues
fixes #16888
2020-02-10 16:01:49 -08:00
George Kalpakas
1beb582050 fix(@angular/cli): fix the URL for doc search
In #16846, the URL for docs search was updated to point to the
corresponding vX.angular.io website (with an appropriate query for the
search). However, on the archive versions of the website (i.e. versions
older than the current stable), non-docs pages (including the home page)
are redirected to `/docs` (losing the query params).

This commit fixes the URL to include `/docs`, so that it is not
redirected (and preserve the query params that will trigger the search).
2020-02-07 08:28:56 -08:00
Santosh Yadav
688db35589 fix(@angular/cli): change the url for doc search
Fixes #16840
2020-02-06 09:09:11 -08:00
Charles
835100c908 refactor(@angular/cli): allow update version check to be disabled (#16543)
This allows the CLI version check during update bootstrapping to be disabled via the `NG_DISABLE_VERSION_CHECK` environment variable.  This is not considered an officially supported option and is intended mainly for testing/troubleshooting scenarios.
2020-01-04 11:13:53 -08:00
Alan Agius
23589ed00e fix(@angular/cli): inform user and error if schematics package is in unreachable location (#16466)
This is a workaround for the schematics runtime to support the requirement of packages containing migrations (or other schematics) to not have a direct/runtime dependency on the schematics package.

Closes: #16392
2020-01-02 11:27:04 -08:00
Charles
d9d233e39a fix(@angular/cli): inform user and error if schematics package is in unreachable location (#16466)
This is a workaround for the schematics runtime to support the requirement of packages containing migrations (or other schematics) to not have a direct/runtime dependency on the schematics package.

Closes: #16392
2019-12-20 16:34:05 -08:00
Wataru.Kasahara
b6863b6a30 fix(@angular/cli): remove alias for deploy command 2019-12-05 18:57:02 -08:00
Alan Agius
35ca3901ac refactor: strip leading slash to prevent confusion 2019-12-02 10:10:34 -08:00
Alan Agius
4bc0ec39b1 fix(@angular/cli): ng version should report if ivy is enabled
Closes: #14491
2019-11-27 13:41:57 -08:00
Alan Agius
0ee5f2fdb9 fix(@angular/cli): support running a single migration from a package 2019-11-15 10:43:07 -08:00
Doug Parker
823c6589ae fix(@angular/cli): Renames final message to "Migration completed". (#16016)
We don't actually know for certain that the migration was successful, only that it finished. This updates the messaging to be more clear about this distinction. I also removed the check mark and green coloring which implied success.
2019-11-13 11:11:14 -08:00
Alan Agius
a6f3d14c08 fix(@angular/cli): clarify ng update outdated message 2019-11-12 11:46:07 -08:00
Doug Parker
208a7008b0 fix(@angular/cli): Prints out when a commit is made in ng update.
Fixes #16060.

Any time a `git commit` is made, the CLI now prints out the hash and short message. For migrations, the message is simply the first line of the commit. For schematics, the commit message isn't all that helpful, so I used the list of packages instead.
2019-11-11 16:51:44 -08:00
Alan Agius
524bff6f43 fix(@angular/cli): add link to update guide post running Angular migrations 2019-11-09 11:52:42 -08:00
Alan Agius
bd840b2ea5 fix(@schematics/angular): improve cli migration name and description (#16093) 2019-11-07 16:41:56 -08:00
Charles Lyding
7735516949 fix(@angular/cli): disable update commit creation by default
Closes #16013
2019-11-07 11:32:52 -08:00
Charles Lyding
6f3d162e41 fix(@angular/cli): remove unneeded git HEAD update message
Closes #16031
2019-11-05 16:29:19 -08:00
Alan Agius
2d66fecee8 fix(@angular/cli): add migration name to commit header
Closes: #16030
2019-11-04 13:27:48 -08:00
Charles Lyding
98bc458480 fix(@angular/cli): pass next option to all update logic
Fixes #16015
2019-11-04 13:27:17 -08:00
Charles Lyding
3f57956c32 fix(@angular/cli): verify package specifier when adding a package
Fixes #16029
2019-11-04 13:26:07 -08:00
Alan Agius
1c855b2365 style(@angular/cli): fix alignment of messages
Before
```
>  NGCC postinstall migration.
   Adds an ngcc invocation to npm/yarn's postinstall script.
   Read more about this here: https://v9.angular.io/guide/migration-ngcc
UPDATE package.json (1490 bytes)
√ Packages installed successfully.
√  Migration succeeded.
```

After
```

> NGCC postinstall migration.
  Adds an ngcc invocation to npm/yarn's postinstall script.
  Read more about this here: https://v9.angular.io/guide/migration-ngcc
UPDATE package.json (1490 bytes)
√ Packages installed successfully.
√ Migration succeeded.

```
2019-11-04 13:23:24 -08:00
Alan Agius
94b48d734f fix(@angular/cli): improve statues and description logs during update
With this change we improve the log messages of migration;

> the migration description
> the outcome of the migration
> we also remove the version of the migration which was misleading (Ex: 9.0.0-beta)
2019-10-30 13:38:53 -07:00
Charles Lyding
5df776780d fix(@angular-devkit/schematics): use NodeWorkflow root to resolve collections 2019-10-28 17:48:08 -07:00
Charles Lyding
dfc3b74665 fix(@angular/cli): return success in update execute migrations function 2019-10-27 12:08:53 -07:00
Charles Lyding
d4dc16fa28 fix(@angular/cli): support prerelease CLI versions when bootstrapping update 2019-10-27 12:08:53 -07:00
Alan Agius
70e460d656 refactor: use require.resolve instead of custom resolve (#15906) 2019-10-23 09:59:36 -07:00