1150 Commits

Author SHA1 Message Date
Angular Robot
7c4e0918d9 build: update all non-major dependencies 2024-06-27 10:09:22 -07:00
ddereszkiewicz
4947f29cfa fix(@angular/cli): make ng update to keep newline at the end of package.json
As stated in https://github.com/angular/angular-cli/issues/11744,
`ng update` command removed the newline at the end of the package.json file.
This commit makes `ng update` to preserve newline, if it was present before running the command.

Fixes #11744
2024-06-27 10:08:29 -07:00
Charles Lyding
741cf7fe1e test: enable @typescript-eslint/await-thenable lint rule
The `@typescript-eslint/await-thenable` rule is now enabled and all failures
have been addressed within the code.
2024-06-25 16:57:03 -04:00
Alan Agius
aebfde28c7 build: update all non-major dependencies
Closes #27881
2024-06-25 20:53:49 +02:00
Charles Lyding
137949e8ff refactor(@angular/cli): use non-experimental decorators for internal memoize
With standard decorator support now available for use, the memoize decorator
has been updated to be a standard decorator instead of a TypeScript experimental
decorator. This change also removes the only usage of decorators within the
Angular CLI code itself. This change does not affect application code.
2024-06-25 09:31:57 -07:00
Charles Lyding
579f81798f build: remove tsetse rule exclusions
To remove the tsetse rule exclusions, several usages of `JSON.parse` that
did not have type casting where adjusted to add types. This removed the
need for the manual configuration within the tsconfig.
2024-06-24 12:50:55 -04:00
Charles Lyding
8b6ae4cf24 refactor(@angular/cli): allow tty and color helpers to use a stream
The `isTTY` and `supportColor` helpers can now accept a stream to check
instead of assuming stdout. This is useful if stderr needs to be checked,
for instance. Also, color checking now uses Node.js `hasColors` where
possible which has been available since Node.js v10.
2024-06-21 16:26:45 +02:00
Angular Robot
a442f8c3a3 build: update all non-major dependencies 2024-06-20 09:15:40 +02:00
Charles Lyding
18226c6f57 refactor(@angular/cli): remove ora spinner dependency from package
The ora package has been removed now that the progress indicator for the
update command is now based on the `listr2` package that is also used
by the `ng add` command.
2024-06-19 09:52:24 +02:00
Charles Lyding
4c96537378 refactor(@angular/cli): remove ora-based spinner from update command
The `listr2` dependency that was recently introduced to improve the console
UI for the `ng add` command is now used for the package installation step
of the `ng update` command process.
2024-06-19 09:52:24 +02:00
Angular Robot
a1f60f93c4 build: update all non-major dependencies 2024-06-18 09:41:37 +02:00
Charles Lyding
303807aa68 refactor(@angular/cli): remove direct use of ansi-colors package
The newly introduced `listr2` dependency used for the updated `ng add`
console UI provides color support. This removes the need to retain a
direct dependency on a color package within the `@angular/cli`.
2024-06-18 09:38:57 +02:00
Charles Lyding
af1016630f refactor(@angular/cli): improve console status logging for add command
The step-based console UI of the add command has been refactored to use the `listr2` library.
Previously, an `ora` spinner was manually used and needed to handle a
variety of error conditions and could not handle the potential for concurrent
tasks as well as streaming subcommands cleanly while the spinner was in use.
Behavior of the add command has not been changed during this refactor. Further
improvements are possible including the integration of the schematic execution
within the step-based UI.
2024-06-17 09:07:34 -04:00
Alan Agius
6d266c146c fix(@angular/cli): add fallbacks for migration package resolution
Before this commit, running `ng update @angular/cli` would fail when using the PNPM package manager. This update resolves the issue by implementing fallbacks in the migration package resolution logic, similar to the approach used in `NodeWorkflow`.
2024-06-12 18:32:54 +02:00
Charles Lyding
9e35d174cb refactor(@angular/cli): use Node.js builtin ANSI escape removal helper
Node.js contains a helper function within the `util` builtin that will
remove any ANSI escape codes from a string. This removes the need for
a custom utility function.
2024-06-11 08:20:20 -04:00
Charles Lyding
b411b9854e refactor(@angular/cli): use latest inquirer prompt package
The `inquirer` package has been rewritten with a new set of packages.
The rewrite had a focus on reduced package size and improved performance.
The main prompt package is now `@inquirer/prompts`. The API is very similar
but did require some refactoring to adapt to Angular's usage.
2024-06-07 08:58:25 -04:00
Ash Ramirez
434a3740f0 refactor(@angular/cli): update aio links -> adev links
Updates for all angular.io links to the new angular.dev domain. Additionally, adjustment to new resources where the equivalent does not exist on the new site (e.g. Tour of Heroes tutorial)
2024-06-06 11:12:06 +02:00
Krzysztof Platis
ce8b5a3a74 fix(@angular/cli): add schema.json options to parsed command, also when a version is passed to ng add <package>@<version>
This commit fixes the method `AddCommandModule.getCollectionName()`, so it now returns only the package name, but remove the specified version (if present).

Previously, a `@<version>` specified in the const `collectionName` was causing a (silenced) error during the invocation of `workflow.engine.createCollection(collectionName)`, which lead to skipping eventually the invocation of the method `this.addSchemaOptionsToCommand()` in the try/catch block.

fixes https://github.com/angular/angular-cli/issues/27766
2024-06-04 11:20:34 -07:00
Angular Robot
2e9fe6a22a build: update all non-major dependencies 2024-06-03 10:50:03 -07:00
David LJ
767652bdcc docs: update blog, analytics, hydration links aio->adev 2024-05-27 08:31:53 +02:00
David LJ
b5782891c8 docs: update i18n, deploy links aio->dev 2024-05-27 08:31:53 +02:00
Angular Robot
c7205ea182 build: update all non-major dependencies 2024-05-22 17:56:52 -04:00
Charles Lyding
83ef6a133e fix(@angular/cli): only add --version option on default command
The newly added `--version` option was previously added to all subcommands
which can result in a warning being shown if the subcommand was a builder
or schematics that also happened to have a `version` option. To support
the default `--version` option that displays the actual CLI version, the
option is now only added when no subcommand is present. This prevents
potential version option overlap.
2024-05-22 07:08:54 -04:00
Alan Agius
386d766232 fix(@angular/cli): add --version option
This commit introduces the `--version` option, which will display the Angular CLI version when using `ng --version`.

Closes #27668
2024-05-21 13:59:31 -04:00
Alan Agius
36195059e0 fix(@angular/cli): eliminate prompts during ng version command
This update removes the analytics and completion prompts that appear when executing the `ng version` command, ensuring a smoother and uninterrupted user experience.

Closes #27668
2024-05-21 13:59:31 -04:00
Charles Lyding
ebfd7b12ee refactor(@angular/cli): show optional migration name and documentation URL if available during updates
The optional migration selection prompt shown during an interactive
`ng update` will now show the name of the migration which can be used
to manually run the update at a later time as well as a documentation link
if present for the migration.
2024-05-20 17:09:33 -04:00
Charles Lyding
3e07f5e788 fix(@angular/cli): keep cli package first in update package group metadata
The `ng update` command will use the first element in the `packageGroup`
metadata data within `package.json` for display purposes. The newly
introduced `@angular/build` package was initially added alphabetically
but this interfered with the first element position.
2024-05-20 17:09:33 -04:00
Angular Robot
776e63d3c9 build: update all non-major dependencies 2024-05-20 09:44:20 -04:00
Charles Lyding
c79a513a76 refactor(@angular/cli): use prompt helper functions in analytics and completion commands
Instead of manually invoking an underlying prompt library, the analytics
and completion commands now use the helper utility functions present to
handle console prompts.
2024-05-17 14:14:40 -04:00
Charles Lyding
cb18da3917 fix(@angular/cli): change update guide link to angular.dev
References to the Angular update guide now use the new angular.dev site.
2024-05-17 12:44:40 -04:00
Angular Robot
0154af9afa build: update all non-major dependencies 2024-05-14 14:29:10 +02:00
Charles Lyding
0ead36d213 fix(@angular/cli): clarify optional migration instructions during ng update
The instructions for when optional migrations are present within an updated
package have been adjusted. A sentence has been added to mention that
optional migrations can be executed after the update process if preferred
and can be skipped for now.
2024-05-13 08:00:13 -04:00
Angular Robot
8b97d80aaa build: update all non-major dependencies 2024-05-08 08:54:52 +02:00
Angular Robot
6953b4bb13 build: update all non-major dependencies 2024-05-07 12:26:51 +02:00
Angular Robot
fe392626c1 build: update all non-major dependencies 2024-05-06 10:30:11 +02:00
Alan Agius
abf18a64e3 build: update all non-major dependencies
(cherry picked from commit 807718f133489e8938a909bbb2204df6918d2c7e)
2024-05-02 10:19:09 -04:00
Charles Lyding
15ab9020b3 fix(@angular/cli): add @angular/build package to update group list
The ng update package group list now contains the newly introduced
`@angular/build` package which contains the esbuild/Vite-based
build system. The group list ensures that all relevant direct
project dependencies are update as group when `@angular/cli` itself
is updated.
2024-05-01 14:17:59 -04:00
Angular Robot
1d7531b88f build: update all non-major dependencies 2024-04-29 06:54:11 -04:00
Alan Agius
4087728c3e feat(@angular/cli): support for Node.js v22
Add support for Node.js v22
2024-04-25 14:04:43 +02:00
Angular Robot
ffb5428565 build: update all non-major dependencies 2024-04-25 09:51:33 +02:00
Charles Lyding
0b03829bce feat(@angular-devkit/build-angular): move i18n extraction for application builder to new build system package
With the `application` builder already within the new `@angular/build` package,
the `extract-i18n` builder with application builder support is now also contained within this package.
Only the application builder aspects of `extract-i18n` have been moved.
The compatibility builder `browser-esbuild` is not supported with `@angular/build:extract-i18n`.
The existing `extract-i18n` builder found within `@angular-devkit/build-angular` should continue to be used for both the
Webpack-based `browser` builder and the esbuild-based compatibility `browser-esbuild`
builder. To maintain backwards compatibility, the existing `@angular-devkit/build-angular:extract-i18n`
builder continues to support builders it has previously.

No change to existing applications is required.
2024-04-24 07:06:38 -04:00
Charles Lyding
810d213e18 feat(@angular/build): introduce new official build system package
The `@angular/build` package has been introduced to house the esbuild/Vite-based
build system that was newly introduced as stable in v17. The existing
`@angular-devkit/build-angular` package will continue to contain the Webpack-based
build system and to ensure backwards compatibility it will also provide aliases
for the esbuild/Vite-based build system. The changes here are the first stage
of the builder transition and moves the `application` builder into the new package.
The application builder can now be accessed when this package is installed directly
via `@angular/build:application`.

No changes are required for existing projects.
2024-04-18 17:24:23 +02:00
Alan Agius
53c319aaa9 feat(@angular-devkit/build-angular): add support for the poll option in the library builder
This commit adds support for polling when using the ng-packagr builder

Closes #27420
2024-04-18 16:40:36 +02:00
Angular Robot
8843188080 build: update all non-major dependencies 2024-04-17 20:01:54 +02:00
Angular Robot
0398392f2c build: update dependency pacote to v18 2024-04-16 11:52:59 +02:00
Angular Robot
b250831598 build: update all non-major dependencies 2024-04-15 12:34:09 +02:00
Matthieu Riegler
d482c65dae docs: fix image url for completion command 2024-04-10 09:53:56 -04:00
Matthieu Riegler
422edd70fd docs: replace links links to aio with links to adev
Currently those are handled by a custom link remapper (in dev-infra) which should be removed.
2024-04-09 12:23:33 -04:00
Alan Agius
03eee05450 refactor(@angular/cli): remove ng doc command
This command lacked practical utility.

BREAKING CHANGE: The `ng doc` command has been removed without a replacement. To perform searches, please visit www.angular.dev
2024-04-08 11:01:41 -04:00
Angular Robot
3860fb3e42 build: update all non-major dependencies
(cherry picked from commit 7da0965ce3856cfc99158db8510ae339d3dc8fad)
2024-04-02 10:07:07 -07:00