16 Commits

Author SHA1 Message Date
Alan Agius
10cce2c86e refactor(@angular/cli): re-organize the Angular CLI package folder structure 2022-03-09 17:18:53 +01:00
Alan Agius
d94a67353d refactor(@angular/cli): remove deprecated --all option from ng update
BREAKING CHANGE:

`--all` option from `ng update` has been removed without replacement. To update packages which don’t provide `ng  update` capabilities in your workspace `package.json` use `npm update`, `yarn upgrade-interactive` or `yarn upgrade` instead.
2022-01-27 11:06:51 -08:00
Alan Agius
b7b1325a67 fix(@angular/cli): favor ng-update packageGroupName in ng update output
With this change we favor the `packageGroupName` name when specified and only fallback to use the first item in in the `packageGroup` array when it is not specified.

Closes #22087
2021-11-09 11:06:08 -05:00
Alan Agius
9b32066e88 fix(@angular/cli): update ng update output for Angular packages
With #21986 we now error when updating `@angular/` and `@nguniversal/` packages across multiple major versions. With this chnage we update `ng update` output to show the correct instructions.

Before
```
$ ng update --next

 We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cli                       12.2.12 -> 13.0.0-rc.2   ng update @angular/cli --next
      @angular/core                      11.2.14 -> 13.0.0-rc.2   ng update @angular/core --next
```

Now
```
$ ng update --next

 We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cli                       12.2.12 -> 13.0.0-rc.2   ng update @angular/cli --next
      @angular/core                      11.2.14 -> 12.2.9        ng update @angular/core@12
```

Closes #19381
2021-10-28 15:31:15 +02:00
Charles Lyding
e1b954d707 fix(@angular/cli): keep relative migration paths during update analysis
The original update analysis would prepend the package name to all migration collection files. This was required at the time to ensure the migration collection files would be found. The existing update logic, however, no longer requires this change but the change previously had no negative effects as both the relative and module specifier methods would successfully resolve the migrations. But with the conversion to ESM-based packages that use the package.json `exports` field, deep imports into a package are no longer possible unless the migration collection files are explicitly exported. Relative migration collection paths are now preferred since they are based off of the location of the package's `package.json` and do not require additional `exports` field entries. The original update analysis logic, unfortunately, prevent the relative paths from working as intended. Since this original logic is no longer required by the update process, it has been removed allowing the relative paths to be kept and used directly.
2021-10-05 04:44:24 -05:00
Alan Agius
77c96f8b2a fix(@angular/cli): handle unscoped authentication details in .npmrc files
Unless auth options are scope with the registry url it appears that npm-registry-fetch ignores them, even though they are documented.
8954f61d8d/README.md
8954f61d8d/auth.js (L45-L91)
2021-06-16 19:28:53 -04:00
Alan Agius
e680aa1f48 refactor(@angular/cli): remove duplicate npmrc logic 2021-06-16 19:28:53 -04:00
Charles Lyding
6926b37c0c fix(@angular/cli): clean node modules directory prior to updating
Prior to performing the initial updated package installation during the `ng update` process, the workspace node modules directory will be removed. This cleaning increases the guarantees that the package manager will hoist packages into the correct locations and avoid peer dependency inconsistencies.
2021-05-17 08:38:04 +02:00
Charles Lyding
c1512e4274 build: update files to be eslint compliant
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
2021-05-03 07:31:02 -04:00
Charles Lyding
37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07:00
Charles Lyding
203f9626df refactor(@angular/cli): correct various uncaught code style issues
This change cleans up some of the code by removing unused variables/imports, unnecessary double negation, and some long line lengths.
2021-04-28 09:58:15 +02:00
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Alan Agius
db1719b8c1 refactor(@angular/cli): clean up left over @schematics/update code. 2021-04-19 20:28:53 +02:00
Alan Agius
266c0ce5e5 fix(@angular/cli): ignore tsickle during updates
`tsickle` doesn't be a dependency in users projects, if it is most certain it will cause updates to fail due to mismatching peer dependency on TypeScript.
2021-04-19 20:28:53 +02:00
Charles Lyding
8a805fe0b9 fix(@angular/cli): exclude deprecated packages with removal migrations from update
Deprecated packages that may have been included in a project by the tooling are now ignored when validating an update. This change removes the need to use the `--force` option in a situation where the later migrations will remove and cleanup the deprecated packages.
2021-04-02 08:09:16 +02:00
Charles Lyding
2dd0cbd2e9 refactor(@angular/cli): inline @schematics/update:update schematic
This change removes the need for the `@schematics/update` package within the Angular tooling and removes the dependency from the `@angular/cli` package.
Only the `update` schematic from the `@schematics/update` package was used and this schematic's logic will eventually be folded into the update command logic directly.
2021-03-29 08:18:11 -06:00