33279 Commits

Author SHA1 Message Date
Andrew Scott 40e2b5b4d1 release: cut the v20.0.0 release 20.0.0 2025-05-28 06:52:44 -07:00
Andrew Scott 0502cf26c5 release: cut the v20.0.0-rc.3 release 20.0.0-rc.3 2025-05-27 15:59:11 -07:00
Matthieu Riegler 925a41c285 Revert "fix(core): call DestroyRef on destroy callback if view is destroyed (#58008)" (#61625)
This reverts commit 5f7f04634f.

PR Close #61625
2025-05-27 15:21:21 -07:00
Matthieu Riegler 87659baa01 docs(docs-infra): limit file interactions on tutorials. (#61696)
The restricted mode on the code editor prevents renaming, deleting or adding files.

PR Close #61696
2025-05-27 11:33:11 -07:00
Angular Robot cc5a393a27 build: lock file maintenance (#61681)
See associated pull request for more information.

PR Close #61681
2025-05-26 11:56:37 +00:00
arturovt 833c69b618 refactor(platform-browser): replace isPlatformServer with ngServerMode (#59496)
In this commit, we switch from using the `isPlatformServer` runtime call to the `ngServerMode`.

Note: constructors haven't been touched in order to prevent any breaking changes for the public API.

PR Close #59496
2025-05-26 11:14:28 +00:00
Angular Robot 360660db17 build: update all non-major dependencies (#61667)
See associated pull request for more information.

PR Close #61667
2025-05-26 11:13:25 +00:00
Joey Perrott 3731cce85d build: migrate examples to use rules_js (#61650)
Migrate examples to use ng_project and ts_project for building

PR Close #61650
2025-05-26 11:01:00 +00:00
Angular Robot 2f1f6eeb57 build: update cross-repo angular dependencies (#61680)
See associated pull request for more information.

PR Close #61680
2025-05-26 10:27:08 +00:00
Kristiyan Kostadinov eceacbc18b fix(migrations): preserve comments when removing unused imports (#61674)
Updates the unused imports schematic to preserve comments inside the array. THis is necessary for some internal use cases.

PR Close #61674
2025-05-26 10:26:22 +00:00
Matthieu Riegler 6ca7590666 fix(compiler): lexer support for template literals in object literals (#61601)
This commit fixes a shortcoming of the lexer with template literals

fixes #61572

PR Close #61601
2025-05-26 10:24:19 +00:00
Joey Perrott 308404eca7 build: update common's locales to use rules_js (#61629)
Use ts_project to build the common locales

PR Close #61629
2025-05-26 10:18:15 +00:00
Joey Perrott d366a9811d build: update tools directory to use rules_js for building (#61657)
Use ts_project for building the tools directory targets

PR Close #61657
2025-05-26 09:58:03 +00:00
Kristiyan Kostadinov 117e570ded refactor(core): replace propertyInterpolateX with property (#61639)
Replaces the `propertyInterpolateX` instructions with calls to `property` and the `interpolate` helper. This allows us to drop the dedicated interpolation instructions and simplify the runtime for future work.

PR Close #61639
2025-05-26 09:21:24 +00:00
Kristiyan Kostadinov d1ed9ac41b refactor(core): simplify single interpolations (#61639)
Updates the `ɵɵinterpolate` instruction so it doesn't call into `interpolation1` under the hood since it requires a prefix/suffix and we know there isn't one.

PR Close #61639
2025-05-26 09:21:24 +00:00
Kristiyan Kostadinov 6409e58160 refactor(core): replace classMapInterpolateX with classMap (#61639)
Replaces the `classMapInterpolateX` instructions with `classMap` plus a call to `interpolate` in order to simplify the runtime. The only difference between `classMapInterpolateX` and `classMap` was that the former passes `keyValueArraySet` into `checkStylingMap` while the latter passes `classKeyValueArraySet`. This doesn't appear to matter, because the interpolation instructions always have a string value which means that the function is never called.

PR Close #61639
2025-05-26 09:21:24 +00:00
Kristiyan Kostadinov e64141f038 refactor(core): replace styleMapInterpolateX with styleMap (#61639)
Replaces the `styleMapInterpolateX` instructions with the existing `styleMap` and a passed-in interpolated value in order to simplify the runtime.

PR Close #61639
2025-05-26 09:21:24 +00:00
Kristiyan Kostadinov 6b60a88766 refactor(core): replace stylePropInterpolateX with styleProp (#61639)
Replaces all of the `stylePropInterpolateX` instructions with the existing `styleProp` with an interpolated value.

PR Close #61639
2025-05-26 09:21:24 +00:00
Jonathan Meier 556413d440 refactor(compiler-cli): remove hardcoded config for unused standalone imports rule enablement (#61622)
The hardcoded config was introduced because suppressing the diagnostic
via `extendedDiagnostics` in the TS config was unreliable in google3.
This has since been fixed and the workaround is no longer needed.

PR Close #61622
2025-05-26 09:20:28 +00:00
Alan Agius f6ee2811cb ci: remove sync angular-robot forked repository workflow (#61675)
Renovate now supports syncing of non-default base branches, making this workflow obsolete.

PR Close #61675
2025-05-26 09:18:33 +00:00
Angular Robot 6498629752 build: update dependency google-closure-compiler to v20250520 (#61673)
See associated pull request for more information.

PR Close #61673
2025-05-26 09:14:22 +00:00
Alan Agius f355fbc446 build: disable esbuild metadata file generation (#61636)
Disables creation of the esbuild meta.json file, which is not utilized in the build process. This streamlines the output and avoids generating unused artifacts.

PR Close #61636
2025-05-26 08:57:44 +00:00
Alan Agius 49bac6bb66 build: exclude esbuild metadata files from distributable packages (#61636)
Prevents esbuild generated metadata files from being included in build artifacts. This reduces package size and avoids shipping unnecessary internal build data.

PR Close #61636
2025-05-26 08:57:44 +00:00
Joey Perrott 9eefc5dcd4 build: migrate localize package to use rules_js (#61613)
Use ts_project to build localize package

PR Close #61613
2025-05-26 08:53:55 +00:00
Alan Agius e25e6c95a2 fix(compiler): remove TypeScript from linker (#61635)
This commit removes the direct dependency on TypeScript within the linker, addressing a performance overhead that was adding between 500ms to 1s to compilation times for applications.

The primary cause of this overhead was the linker's direct reliance on TypeScript's which was caused by importing from barrel files. While convenient, barrel files are detrimental to code splitting and code motion. They force the bundling of all exported modules, even if only a subset is actually used.

By removing the usage of this barrel file and restructuring the imports to be more granular, we can avoid unnecessary TypeScript imports.
 Furthermore, TypeScript has now been changed to an optional peer dependency as using only the linker does not require TypeScript.

(cherry picked from commit 7cf2425fb5)

PR Close #61635
2025-05-26 08:48:24 +00:00
Rafal Slawik 2e5362a469 feat(common): accept undefined inputs in NgTemplateOutlet (#61404)
Extend types of inputs to include `undefined` to avoid `?? null` when using singals (e.g. `viewChild`).

Fixes #51225

PR Close #61404
2025-05-25 14:26:44 -07:00
Charles Lyding f1568efcbe docs: add initial experimental vitest testing guide (#61483)
An initial guide to use the experimental unit testing system with the
vitest runner has been added. This includes setup instructions for switching
from the karma/jasmine based system.
Additional content for configuration and potential migration of existing
projects may be added in future changes.

PR Close #61483
2025-05-23 15:39:38 -07:00
Joey Perrott 968bbe9609 build: migrate platform-browser and platform-browser-dynamic package to use rules_js (#61623)
Use ts_project and ng_project to build platform-browser and platform-browser-dynamic package

PR Close #61623
2025-05-23 15:14:02 -07:00
Andrew Scott aa7190d972 fix(common): avoid injecting ApplicationRef in FetchBackend (#61649)
fixes a circular dependency caused by injecting applicationRef

fixes #61644

PR Close #61649
2025-05-23 10:04:13 -07:00
Jessica Janiuk 5bdd29121b Revert "fix(core): Testing should not throw when Zone does not patch test FW APIs (#61628)" (#61637)
This reverts commit 3d4ddd2247.

PR Close #61637
2025-05-23 07:38:18 +00:00
Andrew Scott f400e9c156 release: cut the zone.js-0.15.1 release (#61632)
PR Close #61632
2025-05-22 14:53:20 -07:00
Andrew Scott eb4abc2ddb refactor(zone.js): Add a withProxyZone helper that might be used for unpatched test frameworks (#61626)
As an alternative to monkey patching vitest, this change adds a method that could be used
for manually running functions inside a shared proxy zone. If used inocrrectly,
this would mean that
the `fakeAsync` closure may not capture all timers and microtasks if it
invokes things created in a zone that was already forked (e.g. creating
a component in a beforeEach:
https://github.com/angular/angular/blob/2699dd65558d70fadeac1e9b420841f3dfc3a059/packages/zone.js/lib/jasmine/jasmine.ts#L363-L371)

PR Close #61626
2025-05-22 13:39:32 -07:00
Angular Robot 7e5abb3942 build: update dependency node to v22.16.0 (#61603)
See associated pull request for more information.

PR Close #61603
2025-05-22 13:08:11 -07:00
Alan Agius 8f52f0b5b0 build: update all esbuild target to node20 (#61606)
This is the min supported node.js version

PR Close #61606
2025-05-22 13:02:04 -07:00
michael-small 2ee9cb03f7 docs: remove dev preview banner from RXJS interop (#61598)
Disclaimer: I made this PR directly from the MD editor in GH since I can't run the docs locally at the moment.
PR Close #61598
2025-05-22 13:00:24 -07:00
Andrew Scott 3d4ddd2247 fix(core): Testing should not throw when Zone does not patch test FW APIs (#61628)
This prevents `core/testing` from throwing an error if ZoneJS is present
but does not patch the test FW APIs such that `fakeAsync` works
automatically. For example, there is currently no patching of the vitest
APIs, so if you try to use Vitest with Zone on the page, it will throw.

PR Close #61628
2025-05-22 12:56:57 -07:00
Alan Agius c8951159ac fix(core): mark zone.js as an optional peer dependency (#61616)
`zone.js` is no longer mandatory.

PR Close #61616
2025-05-22 12:14:07 -07:00
Matthieu Riegler cee40cf778 docs: remove top level heading which (#61593)
It interferes with `docs-decorative-header`

PR Close #61593
2025-05-22 12:12:34 -07:00
Joey Perrott 14f2648302 build: migrate platform-server to rules_js (#61589)
Migrate platform-server to use ts_project and ng_project.

PR Close #61589
2025-05-22 11:35:56 -07:00
Doug Parker 114253ea02 release: bump Angular DevTools to version 1.0.32 (#61620)
PR Close #61620
2025-05-22 10:52:20 -07:00
arturovt 959258d8dd fix(service-worker): do not register service worker if app is destroyed before it is ready to register (#61101)
In this commit, we check whether the application is destroyed before calling `serviceWorker.register(...)`. We should not register the worker because other resources will not be available.

PR Close #61101
2025-05-22 10:02:42 -07:00
Andrew Scott 1a3313a08c fix(zone.js): classes that extend Error should retain cause property (#61599)
ZoneAwareError previously did not copy the cause property over to the
`this` object when an error extends the native error class.

PR Close #61599
2025-05-21 20:43:11 -07:00
Hakeem e7cb313823 docs(docs-infra): fix nav items active status is shown for multiple items (#61597)
PR Close #61597
2025-05-21 16:04:30 -07:00
Angular Robot 6b7c8d1d6f build: update cross-repo angular dependencies to v20.0.0-rc.2 (#61588)
See associated pull request for more information.

PR Close #61588
2025-05-21 15:31:35 -07:00
Andrew Scott 09f79e0a46 release: cut the v20.0.0-rc.2 release 20.0.0-rc.2 2025-05-21 13:05:34 -07:00
Maciej Sawicki 6e79eaf739 fix(core): reading resource value after reload in the error state (#61441)
When the resource is loading after reloading from the error state reading `Resource.value()` would return the default value instead of throwing an error.
This change prevents `Resource.hasValue()` from throwing an error in such a case.

PR Close #61441
2025-05-21 12:06:42 -07:00
Maciej Sawicki 3ba39bc28f fix(core): getting resource value throws an error instead of returning undefined (#61441)
When there is an underlying error state it would not be possible to swallow the error with:
`computed(() => res.value()?.inner);`

PR Close #61441
2025-05-21 12:06:42 -07:00
Maciej Sawicki a89f1cff24 fix(core): narrow error type for resources API (#61441)
`Resource.error` used to return `unknown`. Now it's `Error | undefined`.
For non-`Error` types they are encapsulated with the `Error` type.

PR Close #61441
2025-05-21 12:06:42 -07:00
Maciej Sawicki d62379bb13 fix(core): move reload method from Resource to WritableResource (#61441)
Now only mutable resources can be reloaded.

PR Close #61441
2025-05-21 12:06:42 -07:00
Maciej Sawicki 36af9213ac build: use es2022 lib (#61441)
It was set to es2022 for build tsconfig in https://github.com/angular/angular/pull/60066/files#diff-7ec658aedc62a693cc513accc8f360938d90bcbdb09aa79c1401e56fe84f5fd3, but was missed for the main one.

PR Close #61441
2025-05-21 12:06:42 -07:00