Commit graph

33286 commits

Author SHA1 Message Date
arturovt
ce916fe08c 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:39 -07:00
Andrew Scott
ad8931cb49 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:09 -07:00
Hakeem
5735ea7115 docs(docs-infra): fix nav items active status is shown for multiple items (#61597)
PR Close #61597
2025-05-21 16:04:23 -07:00
Andrew Scott
7a43963d62 docs: release notes for the v20.0.0-rc.2 release 2025-05-21 13:11:10 -07:00
Andrew Scott
833c61583a docs: release notes for the v19.2.12 release 2025-05-21 12:53:34 -07:00
Maciej Sawicki
905194fa57 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:40 -07:00
Maciej Sawicki
b35396345c 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:40 -07:00
Maciej Sawicki
05eb028c7a 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:40 -07:00
Maciej Sawicki
07811ddd7d 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:40 -07:00
Maciej Sawicki
5762c23a77 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:40 -07:00
Joey Perrott
bde1b5e3d5 build: remove the "restamping" substitutions from adev shared-docs package (#61585)
Remove the substitutions as they are not actually needed

PR Close #61585
2025-05-21 17:37:52 +00:00
Steven Nguyendoan
d7753988bd refactor(migrations): update references for dom_trigger functions onInteract, onHover, onViewport to point to new location in core/primitives/defer (#61342)
Moves the onInteract, onHover, onViewport dom_trigger functions to /packages/core/primitives/defer to be used as a shared library

PR Close #61342
2025-05-21 17:30:10 +00:00
Steven Nguyendoan
74cf9cb010 refactor(migrations): moved onInteraction, onHover (#61342)
, onViewport to core/primitives

PR Close #61342
2025-05-21 17:30:10 +00:00
Joey Perrott
4554c096fe build: add comment explaining path maps (#61584)
Add a commend explaning why the path mappings are in place.

PR Close #61584
2025-05-21 17:27:18 +00:00
Bouguima, Walid
610bebfce9 fix(forms): Allow ControlState as reset arguments for FormGroup/FormRecord (#55860)
This change also decorelate the `reset` type argument from `TValue` by adding a 3rd generic parameter to `AbstractControl`.
This improves the typings overall.

PR Close #55860
2025-05-21 17:26:23 +00:00
Joey Perrott
b37fd9753f build: migrate language service to use rules_js (#61568)
Migrate language service to build using ts_project

PR Close #61568
2025-05-21 17:05:14 +00:00
marktechson
1afe20f774 docs: add new ai setcion to adev (#61583)
This new sections outlines guides, code samples and best practices for building AI apps with Angular.

PR Close #61583
2025-05-21 17:04:15 +00:00
cexbrayat
f68001d424 docs: fix descendants default explanation for contentChild (#61580)
See #61534

PR Close #61580
2025-05-21 16:15:07 +00:00
hirowf
373480c18b docs: include bun in packageManager value types (#60907)
PR Close #60907
2025-05-21 15:19:38 +00:00
arturovt
93e8565f0e fix(core): cleanup rxResource abort listener (#58306)
The observable terminates immediately when `error` is called, and no further emissions or completion notifications occur. Thus, we have to remove the `abort` listener in both the `error` and `complete` notifications.

PR Close #58306
2025-05-21 15:17:22 +00:00
Kristiyan Kostadinov
1650a8572a refactor(core): handle NO_CHANGE in bindingUpdated (#61557)
Updates the `bindingUpdated` function to handle `NO_CHANGE` instead of throwing. This will allow us to reuse instructions across more cases.

PR Close #61557
2025-05-21 15:13:47 +00:00
Kristiyan Kostadinov
02bd5f8d76 refactor(core): remove attribute interpolation instructions (#61557)
The attribute interpolation instructions aren't used anymore so we can remove them.

PR Close #61557
2025-05-21 15:13:47 +00:00
Kristiyan Kostadinov
32ae421526 refactor(compiler): replace attribute interpolation instructions (#61557)
Replaces the attribute interpolation instructions with `attribute` plus the new `interpolateX` instruction. This allows to reduce our overall instruction footprint.

PR Close #61557
2025-05-21 15:13:47 +00:00
Kristiyan Kostadinov
a7be5069dd refactor(core): add instructions for interpolating values (#61557)
Adds the new `interpolate*` instructions that can be passed into other instructions and used to replace our existing flavors of interpolations.

PR Close #61557
2025-05-21 15:13:46 +00:00
Jan Martin
5537950079 refactor(core): expose Binding for easier use of inputBinding (#61351)
When passing bindings as arguments or storing them before use in
`createComponent`, it's handy to be able to reference this type.

The current workaround is to use `ReturnType<typeof inputBinding>`.

PR Close #61351
2025-05-21 15:11:47 +00:00
arturovt
17fe731e8e fix(common): cancel reader when app is destroyed (#61528)
Streams left in a pending state (due to `break` without cancel) may continue consuming or holding onto data behind the scenes. Calling `reader.cancel()` allows the browser or the underlying system to release any network or memory resources associated with the stream.

PR Close #61528
2025-05-21 15:07:17 +00:00
Andrew Scott
971981e1df fix(core): TestBed.tick should ensure test components are synchronized (#61382)
This ensures that `TestBed.tick` updates any components created with
`TestBed.createComponent`, regardless of whether autoDetectChanges is
on.

PR Close #61382
2025-05-21 15:02:52 +00:00
Angular Robot
127bad774a build: update cross-repo angular dependencies (#61576)
See associated pull request for more information.

PR Close #61576
2025-05-21 15:00:22 +00:00
arturovt
216222f8b4 refactor(common): drop httpResource error message (#61570)
Drops `httpResource` error message in production and replaces with an error code.

PR Close #61570
2025-05-21 14:16:53 +00:00
Matthieu Riegler
dba912dd07 refactor(platform-browser): replace platform-browser-dynamic with platform-browser (#61498)
The former isn't needed anymore and is now deprecated.

PR Close #61498
2025-05-21 14:01:49 +00:00
Pawel Kozlowski
1123b314b1 refactor(core): consolidate TNode creation checks (#61563)
This change de-duplicates code executed during TNode creation
and reponsible for asserting a TNode index.

PR Close #61563
2025-05-21 13:49:32 +00:00
Pawel Kozlowski
a5a18ae191 refactor(core): minimize code in the element-like instructions (#61563)
Minor changes to the element and elementContainer instructions to
move as much code as possible out of those instructions.

PR Close #61563
2025-05-21 13:49:31 +00:00
Jonathan Meier
0cf1001715 feat(compiler-cli): support host directives with direct external references in fast type declaration emission (#61469)
In the initial implementation for experimental fast type declaration
emission introduced in e62fb35, external references in host directives
were not supported at all.

This change adds support for direct external references in host
directives. Any other expressions indirectly using external references
are still not supported.

PR Close #61469
2025-05-21 13:46:43 +00:00
PandaByte
ba66a12ec3 docs: fix capitalization error (#61554)
PR Close #61554
2025-05-21 13:42:35 +00:00
arturovt
e7656b84b2 refactor(core): drop rxResource error messages (#61565)
Drops `rxResource` error messages in production and replaces with error codes.

PR Close #61565
2025-05-21 12:42:59 +00:00
arturovt
62185714b5 refactor(core): drop injection context assertion in production (#61564)
In other parts of the code, calls to the `assertInInjectionContext` function are guarded with `ngDevMode`. This change aligns these parts of the code with other implementations that drop such assertions in production.

PR Close #61564
2025-05-21 12:42:10 +00:00
Kristiyan Kostadinov
46af02395f fix(compiler): avoid conflicts between HMR code and local symbols (#61550)
Currently we construct the HMR replacement URL inline by calling into the native `URL` constructor. This can cause conflicts with user code that defines a symbol called `URL`.

These changes resolve the issue by moving the URL construction into a separate function. This has a secondary benefit of making the generated code easier to follow and allowing us to update the URL without changing the compiled code.

Fixes #61517.

PR Close #61550
2025-05-21 12:25:25 +00:00
arturovt
6bf6dbc37e fix(core): cleanup testability subscriptions (#61261)
This commit prevents leaking memory when the application is destroyed and subscriptions are still alive.

PR Close #61261
2025-05-21 12:06:23 +00:00
Angular Robot
a2fdb497bc build: update cross-repo angular dependencies (#61561)
See associated pull request for more information.

PR Close #61561
2025-05-21 11:55:44 +00:00
arturovt
9416483bd3 refactor(core): drop injection context assertion in production (#61560)
In other parts of the code, calls to the `assertInInjectionContext` function are guarded with `ngDevMode`. This change aligns these parts of the code with other implementations that drop such assertions in production.

PR Close #61560
2025-05-21 11:35:47 +00:00
Jessica Janiuk
fa5d7ff409 ci: temporarily disable saucelabs for push jobs (#61558)
This also disables saucelabs for the CI (push) jobs.

PR Close #61558
2025-05-21 11:07:18 +00:00
Matthieu Riegler
ef01d3c69e refactor(core): Merge R3TemplateRef implementation and TemplateRef interface (#61455)
This was an artifact of the Ivy migration.

PR Close #61455
2025-05-21 10:07:12 +00:00
Angular Robot
e57509e0a2 build: update dependency google-closure-compiler to v20250519 (#61551)
See associated pull request for more information.

PR Close #61551
2025-05-21 10:02:05 +00:00
Paul Gschwendtner
08f7d21d5c refactor(migrations): ensure tsurge configures file system properly (#61553)
Currently in 1P, without this commit, the tsconfig parsing picks up the
default file system (InvalidFS) and results in runtime errors.

PR Close #61553
2025-05-21 10:01:18 +00:00
Charles Lyding
7adbb9c693 docs: add a short redirect for HMR information (#61545)
The `https://angular.dev/hmr` URL will now redirect
to the HMR information at the longer URL:
https://angular.dev/tools/cli/build-system-migration#hot-module-replacement
This shorter URL will be used within console messages within the Angular CLI.

PR Close #61545
2025-05-21 10:00:29 +00:00
Milo
33715b098a refactor(devtools): add dagre-d3-es (#61538)
add dagre-d3-es for use by the signals graph pane. Additionally, add a
patch so that html labels display correctly within d3-zoom

PR Close #61538
2025-05-21 09:56:40 +00:00
Joey Perrott
3acc2a5f07 build: migrate router to use rules_js (#61542)
Use ts_project and ng_project for building router

PR Close #61542
2025-05-21 09:53:34 +00:00
Ahmed Hakeem
7651d37cfe docs(docs-infra): modify bazel config to include shared docs global styles (#61384)
PR Close #61384
2025-05-21 09:51:47 +00:00
Hakeem
2807a166d1 docs(docs-infra): fix docs pages overflow when specific example-viewer exists (#61384)
enforce content to be fluid until a specific max width, and rollback breakpoints to be applied when 1430px is the current win size
as widths between 1430px and 1431px will be broken

PR Close #61384
2025-05-21 09:51:47 +00:00
Jessica Janiuk
282357f042 ci: temporarily disable saucelabs (#61555)
Saucelabs is having connection issues

PR Close #61555
2025-05-21 09:50:45 +00:00