1186 Commits

Author SHA1 Message Date
Angular Robot
b63607c773 build: update dependency pacote to v20 2024-10-18 19:49:54 +00:00
Angular Robot
e448cf6ee9 build: update all non-major dependencies 2024-10-15 09:30:59 -07:00
Angular Robot
4656c541d2 build: update all non-major dependencies 2024-10-08 10:10:55 -07:00
Angular Robot
5c57e1da36 build: update dependency @inquirer/prompts to v7 2024-10-07 09:44:53 -07:00
Alan Agius
4941725f9e refactor: remove unused methods and locals 2024-10-04 13:16:13 +02:00
Angular Robot
a896b74ac1 build: update all non-major dependencies 2024-09-30 09:53:17 +02:00
Angular Robot
be3f3ff82f build: update dependency pacote to v19 2024-09-28 15:24:09 -04:00
Angular Robot
c0b1221ef4 build: update dependency npm-package-arg to v12 2024-09-27 11:20:07 -04:00
Angular Robot
0b4294af4a build: update dependency npm-pick-manifest to v10 2024-09-27 09:29:02 -04:00
Charles Lyding
f249e7e856 perf(@angular/cli): enable Node.js compile code cache when available
The Angular CLI will now enable the Node.js compile cache when available
for use. Node.js v22.8 and higher currently provide support for this feature.
The compile cache stores the v8 intermediate forms of JavaScript code for the Angular
CLI itself. This provides a speed up to initialization on subsequent uses the Angular CLI.
The Node.js cache is stored in a temporary directory in a globally accessible
location so that all Node.js instances of a compatible version can share the
cache. The code cache can be disabled if preferred via `NODE_DISABLE_COMPILE_CACHE=1`.

Based on initial profiling, this change provides an ~6% production build time
improvement for a newly generated project once the cache is available.

```
Benchmark 1: NODE_DISABLE_COMPILE_CACHE=1 node ./node_modules/.bin/ng build
  Time (mean ± σ):      2.617 s ±  0.016 s    [User: 3.795 s, System: 1.284 s]
  Range (min … max):    2.597 s …  2.640 s    10 runs

Benchmark 2: node ./node_modules/.bin/ng build
  Time (mean ± σ):      2.475 s ±  0.017 s    [User: 3.555 s, System: 1.354 s]
  Range (min … max):    2.454 s …  2.510 s    10 runs

Summary
  node ./node_modules/.bin/ng build ran
    1.06 ± 0.01 times faster than NODE_DISABLE_COMPILE_CACHE=1 node ./node_modules/.bin/ng build
```
2024-09-18 09:30:57 -04:00
Angular Robot
93542bfc6d build: update dependency @inquirer/prompts to v6 2024-09-16 08:19:49 +02:00
Alan Agius
de17cbcb88 Revert "perf(@angular/cli): enable Node.js compile code cache when available"
This reverts commit ecc107d83bfdfd9d5dd1087e264892d60361625c.
2024-09-13 11:26:15 +02:00
Alan Agius
929d4835af refactor(@angular/cli): remove unused imports
Remove unused imports from command-module file.
2024-09-12 14:54:23 +02:00
Alan Agius
743188ba62 refactor: Add lines-around-comment rule
I often struggle with spacing around block comments, so I've decided to add the `lines-around-comment` lint rule to help manage this.

For more details, see the https://eslint.style/rules/js/lines-around-comment
2024-09-11 12:10:54 +02:00
Angular Robot
27c1c77896 build: update all non-major dependencies 2024-09-09 19:36:13 +02:00
Simon Knott
e4d598f5d1 docs(@angular/cli): add playwright to e2e targets 2024-09-09 19:35:56 +02:00
Jan Krems
201b60e1dd feat(@angular/cli): handle string key/value pairs, e.g. --define 2024-09-09 19:35:32 +02:00
Angular Robot
63d4f9298e build: update dependency ini to v5 2024-09-06 10:30:04 -04:00
Charles Lyding
ecc107d83b perf(@angular/cli): enable Node.js compile code cache when available
The Angular CLI will now enable the Node.js compile cache when available
for use. Node.js v22.8 and higher currently provide support for this feature.
The compile cache stores the v8 intermediate forms of JavaScript code for the Angular
CLI itself. This provides a speed up to initialization on subsequent uses the Angular CLI.
The Node.js cache is stored in a temporary directory in a globally accessible
location so that all Node.js instances of a compatible version can share the
cache. The code cache can be disabled if preferred via `NODE_DISABLE_COMPILE_CACHE=1`.

Based on initial profiling, this change provides an ~6% production build time
improvement for a newly generated project once the cache is available.

```
Benchmark 1: NODE_DISABLE_COMPILE_CACHE=1 node ./node_modules/.bin/ng build
  Time (mean ± σ):      2.617 s ±  0.016 s    [User: 3.795 s, System: 1.284 s]
  Range (min … max):    2.597 s …  2.640 s    10 runs

Benchmark 2: node ./node_modules/.bin/ng build
  Time (mean ± σ):      2.475 s ±  0.017 s    [User: 3.555 s, System: 1.354 s]
  Range (min … max):    2.454 s …  2.510 s    10 runs

Summary
  node ./node_modules/.bin/ng build ran
    1.06 ± 0.01 times faster than NODE_DISABLE_COMPILE_CACHE=1 node ./node_modules/.bin/ng build
```
2024-09-05 12:29:20 -04:00
Angular Robot
83918eee6c build: update all non-major dependencies 2024-09-03 07:44:10 -04:00
Alan Agius
474571f087 build: remove Bazel typings workaround
The workaround is no longer necessary since the bug has been resolved upstream.
2024-08-14 19:12:27 +02:00
Alan Agius
c5ed0b1248 fix(@angular/cli): prevent bypassing select/checkbox prompts on validation failure
Previously, when a select or checkbox prompt failed validation, it was bypassed, preventing users from correcting their input. This commit ensures that when validation fails, the prompts are re-displayed, allowing users to make the necessary corrections. This improves the user experience and helps avoid unintended selections.

Closes #28189
2024-08-12 15:42:17 +02:00
Angular Robot
3e1f952536 build: update all non-major dependencies 2024-08-07 11:00:03 -04:00
Angular Robot
349e052f41 build: update all non-major dependencies 2024-08-05 15:43:13 -04:00
Angular Robot
2bf8e7f296 build: update all non-major dependencies 2024-07-30 12:40:39 +02:00
Angular Robot
22938486c5 build: update all non-major dependencies 2024-07-29 14:39:15 +02:00
Angular Robot
048df34ccb build: update dependency @inquirer/prompts to v5.3.2 2024-07-23 18:14:59 -07:00
Angular Robot
94b331e667 build: update all non-major dependencies 2024-07-22 12:53:59 -07:00
Angular Robot
64b50815e1 build: update all non-major dependencies 2024-07-18 10:04:45 -07:00
Angular Robot
e21e9867f0 build: update all non-major dependencies 2024-07-17 09:34:41 -07:00
Charles Lyding
5895e9fb01 test: enable no-case-declarations lint rule
The `no-case-declarations` rule is now enabled and all failures
in have been addressed within the published code. Unit tests
have been excluded.
2024-07-11 08:19:56 +02:00
Angular Robot
22d9369aef build: update all non-major dependencies 2024-07-10 09:07:48 +02:00
Charles Lyding
10f882c562 refactor(@angular/cli): use Node.js CommonJS wrapping for schematic encapsulation
The schematics encapsulation process now uses a similar wrapping setup to
Node.js itself. This removes some custom code and also provides a more
comprehensive global object which should provide improved compatibility
for third-party packages used within schematics.
2024-07-10 08:40:11 +02:00
Charles Lyding
afbe3119bf refactor(@angular/cli): provide a default extract-i18n target for applications
The `extract-i18n` command will now use a default project target and builder
name if the target entry is not explicitly defined. This allows the removal
of additional configuration from an `angular.json` file. If the target is
already present than it will take priority over any default builder behavior.
Infrastructure is also now present to allow other architect commands to
have similar functionality in the future.
2024-07-08 12:08:44 +02:00
Angular Robot
89aa22a7ba build: update all non-major dependencies 2024-07-08 12:06:20 +02:00
Alan Agius
f16fbd82ad build: update all non-major dependencies 2024-07-01 13:44:11 +02:00
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