1074 Commits

Author SHA1 Message Date
Angular Robot
bbf871c817 build: update all non-major dependencies 2023-04-11 21:33:57 +00:00
Alan Agius
4eaf107305 build: update minimum supported Node version from 16.13.0 -> 16.14.0
This commit updates the minimum supported Node version across packages from 16.13.0 -> 16.14.0 to ensure compatibility with dependencies.
2023-04-11 16:46:10 +00:00
Alan Agius
fb19f5f3d3 fix(@angular/cli): collect tech information
Currently tech information such as OS and OS version was not being collected property due to missing required fields.
2023-04-03 11:49:52 +00:00
Angular Robot
bb37458934 build: update dependency ini to v4 2023-03-22 18:24:41 +00:00
Alan Agius
7cb5689e02 feat(@angular/cli): show optional migrations during update process
When running `ng update` we now display optional migrations from packages.

When the terminal is interactive, we prompt the users and ask them to choose which migrations they would like to run.
```
$ ng update @angular/core --from=14 --migrate-only --allow-dirty
Using package manager: yarn
Collecting installed dependencies...
Found 22 dependencies.
** Executing migrations of package '@angular/core' **

▸ Since Angular v15, the `RouterLink` contains the logic of the `RouterLinkWithHref` directive.
  This migration replaces all `RouterLinkWithHref` references with `RouterLink`.
  Migration completed (No changes made).

** Optional migrations of package '@angular/core' **

This package have 2 optional migrations that can be executed.
Select the migrations that you'd like to run (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
❯◯ Update server builds to use generate ESM output.
 ◯ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
```

In case the terminal is non interactive, we will print the commands that need to be executed to run the optional migrations.
```
$ ng update @angular/core --from=14 --migrate-only --allow-dirty
Using package manager: yarn
Collecting installed dependencies...
Found 22 dependencies.
** Executing migrations of package '@angular/core' **

▸ Since Angular v15, the `RouterLink` contains the logic of the `RouterLinkWithHref` directive.
  This migration replaces all `RouterLinkWithHref` references with `RouterLink`.
  Migration completed (No changes made).

** Optional migrations of package '@angular/core' **

This package have 2 optional migrations that can be executed.

▸ Update server builds to use generate ESM output.
  ng update @angular/core --migration-only --name esm-server-builds

▸ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
  ng update @angular/core --migration-only --name migration-v15-router-link-with-href
```

**Note:** Optional migrations are defined by setting the `optional` property to `true`. Example:
```json
{
  "schematics": {
    "esm-server-builds": {
      "version": "15.0.0",
      "description": "Update server builds to use generate ESM output",
      "factory": "./migrations/relative-link-resolution/bundle",
      "optional": true
    }
}
```

Closes #23205
2023-03-08 17:49:07 +00:00
Alan Agius
8df900f24a build: update FW and ng-packagr dependencies to version 16
This commit update Angular and ng-packagr dependencies to version 16.
2023-02-23 10:26:07 +00:00
Angular Robot
b564b9afb8 build: update all non-major dependencies 2023-02-22 13:06:18 +00:00
Angular Robot
54cc8d4e7d build: update all non-major dependencies 2023-02-21 10:01:33 +00:00
Alan Agius
68024234ed feat(@angular/cli): remove deprecated defaultCollection from workspace configuration
The deprecated 'defaultCollection' workspace option has been removed

BREAKING CHANGE:

The deprecated `defaultCollection` workspace option has been removed. Use `schematicCollections` instead.

Before
```json
"defaultCollection": "@angular/material"
```

After
```json
"schematicCollections": ["@angular/material"]
```
2023-02-17 16:10:21 +00:00
Alan Agius
d58428d3db feat(@angular/cli): remove deprecated defaultProject from workspace configuration
The deprecated 'defaultProject' workspace option has been removed

BREAKING CHANGE: The deprecated `defaultProject` workspace option has been removed. The project to use will be determined from the current working directory.
2023-02-17 16:10:21 +00:00
Angular Robot
15fdb2a20c build: update all non-major dependencies 2023-02-17 15:11:36 +00:00
Alan Agius
8095268fa4 build: update to rxjs 7
G3 is now using RXJS version 7 which makes it possible for the CLI to also be updated to RXJS 7.

NB: this change does not remove all usages of the deprecated APIs.

Closes #24371
2023-02-16 14:59:40 +00:00
Alan Agius
3cbeee7377 build: remove no longer used scripts
This commit removes scripts which have been replaced with Bazel.
2023-02-16 14:36:10 +00:00
Charles Lyding
c29c8e18d8 refactor(@angular/cli): remove Node.js v14 support
BREAKING CHANGE: Node.js v14 support has been removed

Node.js v14 is planned to be End-of-Life on 2023-04-30. Angular will stop supporting Node.js v14 in Angular v16.
Angular v16 will continue to officially support Node.js versions v16 and v18.
2023-02-16 14:08:24 +00:00
Alan Agius
f6624b974f feat(@angular-devkit/core): update SchemaRegistry compile to return Promise
Use promise based methods to reduce RXJS usage and boiler-platting.

BREAKING CHANGE: Several changes to the `SchemaRegistry`.
- `compile` method now returns a `Promise`.
- Deprecated `flatten` has been removed without replacement.
2023-02-15 21:03:30 +00:00
Angular Robot
70fcd37b58 build: update all non-major dependencies 2023-02-15 15:28:49 +00:00
Alan Agius
d9fed6a517 build: update parse5-html-rewriting-stream to version 7
This fixes an issue were the HTML is truncated if it's 128Kb or greater.

Closes #24707
2023-02-14 15:23:09 +00:00
Alan Agius
522463c42b fix(@angular/cli): replace os.version with os.release.
This is more user friendly.
2023-02-14 15:20:59 +00:00
Alan Agius
5f407337f9 fix(@angular/cli): add set SessionEngaged in GA
This is required for realtime reports.
2023-02-14 15:20:59 +00:00
Alan Agius
545c180e2b fix(@angular/cli): convert before option in .npmrc to Date
Previously, the `before` option in the npmrc was not converted properly to a date.

See: https://docs.npmjs.com/cli/v8/using-npm/config#before

Closes #24685
2023-02-10 20:17:41 +00:00
Angular Robot
4c69b27816 build: update all non-major dependencies 2023-02-08 19:11:07 +00:00
Kristiyan Kostadinov
234f265d16 fix(@angular/cli): error if Angular compiler is used in a schematic
When a schematic is executed, it is wrapped in a custom Node context. This context doesn't expose the same set of global variables. This can lead to an error if a schematic is importing the Angular compiler and the app is using i18n, because the `TextEncoder` isn't exposed through the custom context (see https://github.com/angular/angular/issues/48940).

These changes add the `TextEncoder` to the context.

Fixes https://github.com/angular/angular/issues/48940.
2023-02-07 01:01:20 +00:00
Jason Bedard
fac1e58b73
run e2e tests under bazel (#24338)
* test: run legacy-cli e2e tests via bazel

* fixup! test: run legacy-cli e2e tests via bazel

* fixup! test: run legacy-cli e2e tests via bazel

* fixup! test: run legacy-cli e2e tests via bazel
2023-02-03 07:52:28 +00:00
Alan Agius
7bcb19cddb fix(@angular/cli): only set DebugView when NG_DEBUG is passed
`querystring.stringify` will not remove undefined values.
2023-02-02 14:04:00 +00:00
Alan Agius
89ab29901b docs(@angular/cli): minor updates to ng run description
Minor improvements of `ng run` docs
2023-01-24 20:12:19 +00:00
Alan Agius
a7d2bda577 build: update quicktype-core to 20.0.15
This commit updates `quicktype-core` to `20.0.15` and enables Renovate to update this.
2023-01-20 18:37:55 +00:00
Alan Agius
983adbd6eb build: update @types/yargs to ^17.0.20 2023-01-20 18:37:40 +00:00
Alan Agius
0f58a17c4c feat(@angular/cli): log number of files update during ng update
This commit updates `ng update` to include the number of files updated when a migration is completed.

Closes #24488
2023-01-19 22:13:19 +00:00
Alan Agius
b5737efae8 fix(@angular/cli): handle extended schematics when retrieving aliases
Previously base collections where not being taken into account and the recent changes caused an exception

```
An unhandled exception occurred: Cannot destructure property 'aliases' of 'collection.description.schematics[schematicName]' as it is undefined.
```

See: https://angular-team.slack.com/archives/CHEEH2LCA/p1674122139247359
2023-01-19 22:12:26 +00:00
Doug Parker
f7c78dd384 Revert "refactor: temporaily disable sending analytics"
This reverts commit df9674bd361b46b1275eed98e503f8897e701af5.

Re-enables anayltics.
2023-01-18 23:13:58 +00:00
Doug Parker
b5dcb29cba refactor: only collect Node version if it's a standard version string
Any other kinds of Node version are collected as "other" to avoid pulling in an unbounded user input.
2023-01-18 17:12:47 +00:00
Alan Agius
3ebb195525 fix(@angular/cli): register schematic aliases when providing collection name in ng generate
Previously, schematic aliases were not registered when a collection name was provided to `ng generate`.  Example: `ng generate c` where `c` is an alias for `component` would work, but `ng generate @schematics/angular:c` would fail. This commits fixes the schematic registration to handle the latter case.

Closes #24518
2023-01-13 14:58:36 +00:00
Alan Agius
697df4f6e5 fix(@angular/cli): remove --to option from being required when using --from in ng update
This change remove the requirement for the `to` option to be provided when using the `from` option in conjunction with `migrate-only`.

Closes #24510
2023-01-13 08:29:25 +00:00
Alan Agius
ef39987e59 build: update Angular peer deps to support ^15.2.0-next.0 2023-01-12 12:24:11 +00:00
Alan Agius
143fc68adc docs(@angular/cli): add ng new long description
This appears to have been deleted by mistake when we switched to Yargs.
2023-01-11 15:56:52 +00:00
Charles Lyding
7f93735e98 build: use bazel to perform release builds
When performing a release via the dev-infra `ng-dev` tooling, the release
builds for the packages that will be published are now performed using bazel.
Prior to this, the release builds were performed using a custom build script
that programmatically invoked TypeScript APIs. The Bazel build and discovery
process for the releasable packages is performed by a script that is based on
the scripts from components and framework repositories. Several small modifications
were performed to match the behavior and structure of the cli repository:
* Use of `packages` as the source root in the bazel query
* Use of `pkg_npm` rule in the bazel query
* Partial transition to native Node.js `fs` APIs instead of `shelljs`
* Directory creation per package when copying output (supports multiple package scopes)
* Copying of archives (tgz) for each package

The snapshot and local build capabilities are not modified as part of this change
but will be merged in a followup as part of a larger transition to use bazel
throughout the package build process.
2023-01-05 03:21:58 +00:00
Kristiyan Kostadinov
ba895b1af6 build: update to TypeScript 4.9
Updates the project to TypeScript 4.9.
2023-01-03 16:46:36 +00:00
Angular Robot
a9c0982f3a build: update all non-major dependencies 2022-12-15 20:48:46 +00:00
Alan Agius
207358afb8 feat(@angular-devkit/schematics): add runSchematic and runExternalSchematic methods
These async methods are a replacement for the Observable based `runSchematicAsync` and `runExternalSchematicAsync` methods.

DEPRECATED:
The Observable based `SchematicTestRunner.runSchematicAsync` and `SchematicTestRunner.runExternalSchematicAsync` method have been deprecated in favor of the Promise based `SchematicTestRunner.runSchematic` and `SchematicTestRunner.runExternalSchematic`.
2022-12-08 14:49:43 -08:00
Angular Robot
3d885fbb21 build: update all non-major dependencies 2022-12-08 12:09:04 -08:00
Angular Robot
66a97103db build: update dependency npm-package-arg to v10.1.0 2022-12-02 09:04:04 +00:00
Alan Agius
a38650d4a4 Revert "docs: remove @latest reference from npm init command"
This reverts commit 467ba5af8278399c1fcf11137644f7c61af8f59c.
2022-11-29 14:37:16 +00:00
Alan Agius
2589df0be1 Revert "test: run legacy-cli e2e tests via bazel"
This reverts commit 794e33ae72c15a628f308260020bc4da608c4996.
2022-11-28 15:25:48 +00:00
Jason Bedard
794e33ae72 test: run legacy-cli e2e tests via bazel 2022-11-28 13:39:15 +00:00
Alan Agius
412cb3e61f fix(@angular/cli): use global version of the CLI when running ng new
In some cases orphan `node_modules` would cause the non global CLI to be used to generate a new workspace.

Closes #14603
2022-11-16 13:36:49 -08:00
Doug Parker
df9674bd36 refactor: temporaily disable sending analytics 2022-11-15 12:30:13 -08:00
Alan Agius
0dcb1998ad fix(@angular/cli): respect registry in RC when running update through yarn
This commit fixes an issue where when `ng update` was ran using `yarn` (`yarn ng update`) the registry was always being overridden to `https://registry.yarnpkg.com`.

This is because yarn will set the `npm_config_registry` env variable to `https://registry.yarnpkg.com` even when an RC file is present with a different repository.
2022-11-11 16:40:44 +01:00
Angular Robot
7f4c252eb5 build: update all non-major dependencies 2022-11-07 14:07:00 +01:00
Alan Agius
bf9516e017 build: update dependency npm-package-arg to v10
This commit updates the npm-package-arg to v10 and applies the changes needed due to the breaking change in
d2b87c083f
2022-11-04 11:07:27 -07:00
Angular Robot
4f0ee26b14 build: update dependency pacote to v15.0.6 2022-11-02 08:50:03 -07:00