995 Commits

Author SHA1 Message Date
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
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
Angular Robot
503682766f build: update all non-major dependencies 2022-10-27 12:25:33 -07:00
Alan Agius
65a0983a41
fix(@angular/cli): exclude @angular/localize@<10.0.0 from ng add pa… (#24152)
* fix(@angular/cli): exclude `@angular/localize@<10.0.0` from ng add package discovery

`@angular/localize@<10.0.0` has no peer dependencies. This can cause `ng add` to pick these versions of the package if the newer versions.

See: https://app.circleci.com/pipelines/github/angular/angular-cli/27402/workflows/faa64532-541a-4bea-b599-3c53afe42019/jobs/364822
```
Test Process error Error: Process exit error - "ng add @angular/localize --skip-confirmation": 1...

STDOUT:

STDERR:
npm version 7.4.0 detected. When using npm 7 with the Angular CLI, npm version 7.5.6 or higher is recommended.
- Determining package manager...
ℹ Using package manager: npm
- Searching for compatible package version...
✔ Found compatible package version: @angular/localize@10.0.0-next.7.
- Loading package information from registry...
✔ Package information loaded.
- Installing packages...
✔ Packages successfully installed.
NOT SUPPORTED: keyword "id", use "$id" for schema ID
```

* fixup! fix(@angular/cli): exclude `@angular/localize@<10.0.0` from ng add package discovery

Co-authored-by: Charles <19598772+clydin@users.noreply.github.com>

Co-authored-by: Charles <19598772+clydin@users.noreply.github.com>
2022-10-27 12:25:15 -07:00
Charles Lyding
56cb7679db fix(@angular/cli): allow ng add to find prerelease versions when CLI is prerelease
When the CLI is a prerelease version, the `ng add` command will now consider the
use of prerelease versions of requested packages. Without this behavior, attempting
to install a package without a version specifier (e.g., `ng add @angular/material`)
will install an older stable version of the requested package instead of the expected
prerelease version compatible with the prerelease Angular project.
2022-10-25 10:51:26 -07:00
Charles Lyding
9260087bf7 fix(@angular/cli): exclude @angular/material@7.x from ng add package discovery
`@angular/material@7.x` uses unbounded ranges for its framework peer dependencies.
This can cause `ng add` to pick these versions of the package if the newer versions
are not compatible since the peer dependency ranges would match any newer stable
framework version.
2022-10-25 10:51:26 -07:00
Alan Agius
ca7ca1bdfd fix(@angular/cli): disable version check during auto completion
This causes sub broken DX

```
ng bui[TAB]Your global Angular CLI version (14.2.6) is greater than your local version (14.1.3). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
ld --conf[TAB]Your global Angular CLI version (14.2.6) is greater than your local version (14.1.3). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
iguration dev[TAB]Your global Angular CLI version (14.2.6) is greater than your local version (14.1.3). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
elopment
```

Closes #24133
2022-10-25 10:49:00 -07:00
Alan Agius
1e4dbfdf4a fix(@angular/cli): skip node.js compatibility checks when running completion
A warning at this stage could cause a broken source action (`source <(ng completion script)`) when in the shell init script.

Closes #24104
2022-10-24 15:12:05 -07:00
Alan Agius
82cb04927f docs(@angular/cli): update add long description to analytics command
With this change we add a long description to analytics command with the information that is currently contained in https://angular.io/analytics which will be deleted at a later stage.
2022-10-24 15:11:40 -07:00
Alan Agius
708011ea8e build: update all non-major dependencies 2022-10-21 10:24:39 -04:00
Angular Robot
e9cd7f35c6 build: update dependency npm-pick-manifest to v8 2022-10-17 10:33:26 +02:00
Alan Agius
61fab6413a fix(@angular/cli): do not collect analytics when running in non TTY mode
Prior to this change we collected analytics when config was not present and the CLI was running in non TTY mode.
2022-10-14 15:55:03 +02:00
Alan Agius
f41d609ae8 fix(@angular/cli): add unique user id as user parameter in GA
While, GA collects the user id, this cannot be used for reporting and filtering purpose. This can be
2022-10-14 15:27:05 +02:00
Alan Agius
c59c1e7e6d fix(@angular/cli): add workspace information as part of analytics collection
With this change we collect 3 additional metrics
- `all_projects_count` Count of all project in a workspace
- `libs_projects_count` Count of library projects in a workspace
- `apps_projects_count` Count of application projects in a workspace
2022-10-14 15:27:05 +02:00
Angular Robot
1cd53d6be1 build: update dependency pacote to v15 2022-10-14 10:11:02 +02:00
Alan Agius
3928d084e6 ci: add validation for parameters length
Needed as otherwise if the parameter is longer we are unable to map this in GA4.

GA4 has a limit of:
- 24 characters for custom user dimension parameter names
- 40 characters for custom event dimension parameter names
- 40 characters for custom metric dimension parameter names
2022-10-12 15:32:28 +02:00
Alan Agius
5228c23763 refactor(@angular/cli): remove debug package from dependencies 2022-10-11 18:52:30 +02:00
Alan Agius
124be1cc9c refactor: add build and rebuild related statistics and analytics
The new build and rebuild statistics are used by the CLI to submit build related information to GA.
2022-10-11 18:52:30 +02:00
Alan Agius
639a3071c3 refactor: migrate analytics collector to use GA4
This change updates the analytics collector collector to use GA4 instead of UA. The motivation behind this change is that UA will stop collecting data in 2023.

BREAKING CHANGE:

`analyticsSharing` option in the global angular configuration has been
removed without replacement. This option was used to configure the Angular CLI to  access to your own users' CLI usage data.

If this option is used, it can be removed using `ng config --global cli.analyticsSharing undefined`.
2022-10-11 18:52:30 +02:00
Angular Robot
c7ca61290c build: update dependency pacote to v14 2022-10-07 14:15:31 -04:00
Alan Agius
4fa5b526e5 fix(@angular/cli): handle missing which binary in path
This change updates the `hasGlobalCliInstall` logic so that a pending promise is not created.

Closes #23997
2022-10-07 11:44:40 -04:00
Alan Agius
4827d1b23e feat(@angular/cli): add support for Node.js version 18
Pacote version 14 does requires `14.17.x` or `16.13.x`.

BREAKING CHANGE: The Angular CLI  no longer supports `16.10.x`, `16.11.x` and `16.12.x`. Current supported versions of Node.js are `14.20.x`, `16.13.x` and `18.10.x`.
2022-10-07 11:34:43 -04:00
Alan Agius
320241010e fix(@angular/cli): skip downloading temp CLI when running ng update without package names
In the case when `ng update` is ran without a package name, an update is not be performed. In this case using the current installed version of the CLI is good enough.

Closes #24024
2022-10-06 16:21:27 -04:00
Alan Agius
f313f4fb04 refactor(@angular/cli): remove leftover schematics path handling
Remove interim handling of `"format": "path"`. workingDirectory smart default provider should be used instead.
2022-10-06 16:20:15 -04:00
Angular Robot
24bcfaaca1 build: update all non-major dependencies 2022-10-05 09:55:07 -04:00
Alan Agius
4b623461a4 feat(@angular/cli): drop support for Node.js versions older than 14.20
Node.js 14.20 and newer support generating UUID using the crypto module. See: https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_crypto_randomuuid_options

BREAKING CHANGE: Node.js versions older than 14.20 are no longer supported.
2022-10-04 11:28:43 -04:00
Angular Robot
033e8ca8dd build: update dependency yargs to v17.6.0 2022-10-03 09:11:26 -04:00
Alan Agius
c76f9a337f docs(@angular/cli): update platform support information in auto-completion
Closes #23980
2022-09-30 08:56:15 +02:00
Angular Robot
8c3577d07c build: update all non-major dependencies 2022-09-29 14:28:56 +02:00
Alan Agius
23c233c296 fix(@angular/cli): add builders and schematic names as page titles in collected analytics
With this commit the builder and schematic names are added as page title to page events.

Also, we address a bug where during a watch or error in some cases analytics where not flushed. Examples when the builder has a watch mode.
2022-09-23 10:29:59 -04:00
Charles Lyding
326e9234c4 refactor(@angular/cli): remove use of global require resolve
The global require function is not present in Node.js ESM mode. To support
the eventual transition of the `@angular/cli` package to ESM, usage of the
`require.resolve` function has been converted to use locally created `require`
functions via `createRequire` from the `module` builtin.
2022-09-20 10:19:45 -04:00
Jason Bedard
4de9045de8 test: unit test multiple node versions in separate jobs 2022-09-14 10:43:17 -07:00
Charles Lyding
b2add316e7 build: remove unneeded BUILD file licenses rule comments 2022-09-13 10:33:49 -07:00
Angular Robot
a39aa0f499 build: update dependency uuid to v9 2022-09-06 08:20:50 +02:00
Alan Agius
7e64b1537d fix(@angular/cli): favor non deprecated packages during update
Prior to this change during update deprecated packages that satisfied the version range constrain where being favored over the non-deprecated versions if the version of the deprecated version is greater. Ex: if `14.3.1` is deprecated and `14.3.0` is not the former was being installed.

With this change we now change the logic to favor non deprecated version of the package and only use the deprecated package when no satisfying version is found.

This fix is needed as in some cases a package which cannot be unpublished from NPM will gave to be to be deprecated, if the version is for a reason or another broken.
2022-09-01 10:24:33 -04:00
Charles Lyding
e402c2358c build: adjust BUILD file external comment markers
Improvements to the syncing process allow for reduced usage of the comment markers.
2022-08-31 08:37:19 -04:00
Alan Agius
774d349b73 refactor(@angular/cli): remove deprecated path handler
BREAKING CHANGE: The 'path' option in schematics schema no longer has a special meaning. Use 'workingDirectory' smart default provider should be used instead.
2022-08-30 12:24:35 -04:00
Angular Robot
56b3299f12 build: update all non-major dependencies 2022-08-30 08:54:10 -04:00
Angular Robot
ea5edbebb5 build: update all non-major dependencies 2022-08-29 08:18:24 -04:00