Commit graph

1248 commits

Author SHA1 Message Date
SkyZeroZx
d999667b57 docs: add reference to Built-in Pipes in multiple pipe files 2025-11-11 08:47:07 -08:00
arturovt
feb86e3fde fix(common): remove placeholder image listeners once view is removed
Prior to this commit, attempting to resolve a `ChangeDetectorRef` after views or app have been destroyed would result in an error. In this commit, we clean up listeners once the view is destroyed, before the placeholder loads or fails to load.
2025-11-10 12:05:20 -08:00
arturovt
d3f67f6ca8 refactor(core): mark VERSION as @__PURE__ for better tree-shaking
Annotate the `new Version(...)` call with `/* @__PURE__ */` to signal to optimizers that the constructor is side-effect free.

Without this hint, bundlers such as Terser or ESBuild may conservatively retain the `VERSION` instantiation even when unused. With the annotation, the constant can be tree-shaken away in production builds if not referenced, reducing bundle size.
2025-11-10 12:04:04 -08:00
SkyZeroZx
55be477979 refactor(http): migrate XSRF classes to use inject() function
Remove constructor injection in favor of inject() calls
2025-11-10 09:49:09 -08:00
Alan Agius
26fed34e0e
build: format md files
This commit configures prettier to format markdown files.
2025-11-06 10:03:05 -08:00
SkyZeroZx
ca3ef38143 refactor(common): Removes unused imports to clean up dependencies
Eliminates unnecessary imports to reduce clutter and improve maintainability
2025-11-06 08:35:28 -08:00
SkyZeroZx
7c49c5338f refactor(common): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens
2025-11-05 17:08:39 +00:00
SkyZeroZx
44435ea97b refactor(http): simplifies destruction tracking using destroyed property
Replaces the manual destroyed state with destroyed property
2025-11-05 17:05:24 +00:00
Kristiyan Kostadinov
b9e2ccdda8 refactor(common): remove unused import (#64699)
Cleans up unused code to improve readability and maintainability.

PR Close #64699
2025-10-30 19:27:33 +00:00
arielbackenroth
07b8e953f4 refactor(http): add hooks for propagating traces across XHR callbacks.
Enables propagating a trace across XHR callbacks by providing a hook for
wrapping the callback with a function bound to the send trace context.
2025-10-28 15:08:57 +01:00
SkyZeroZx
c5e6b8bdc8 docs: Adds guide links to HTTP API docs for better discoverability 2025-10-27 09:25:56 +01:00
Andrew Scott
dd09da8ba2
refactor(router): Add provider for integrating with Navigation API and Location shim
This adds a (private) provider for integrating with the browser Navigation API.
This provider ensures that interactions with the `Location` service
use the underlying platform navigation rather than the history and
location APIs.
2025-10-27 09:21:56 +01:00
SkyZeroZx
a3639e2258 feat(common): Blocks IPv6 localhost from preconnect checks
Prevents unnecessary preconnect warnings by adding IPv6 loopback ('[::1]') to the blocklist.
2025-10-24 18:46:43 +02:00
SkyZeroZx
207baad322 refactor(common): Add missing OnDestroy interface in PreconnectLinkChecker
The OnDestroy interface was implemented but not declared; this adds the missing interface declaration
2025-10-24 18:46:43 +02:00
Joey Perrott
a1868c9d13 feat(common): update to cldr 47 (#64032)
Update to CLDR version 47 for localization

PR Close #64032
2025-10-21 23:23:30 +00:00
Kristiyan Kostadinov
196fa500a3 fix(common): properly type ngComponentOutlet (#64561)
Resolves an older TODO about properly typing the `ngComponentOutlet` input.

PR Close #64561
2025-10-21 15:25:13 +00:00
Andrew Kushnir
fc65107506 Revert "refactor(core): add debug name to resource (#64172)" (#64418)
This reverts commit 63180067aa.

PR Close #64418
2025-10-14 14:28:16 -07:00
hawkgs
63180067aa refactor(core): add debug name to resource (#64172)
Decorate `resource` (and `httpResource`) with `debugName`, along with all of its internal signals.

PR Close #64172
2025-10-14 09:31:41 -07:00
SkyZeroZx
2739b7975b feat(http): add referrerPolicy option to HttpResource (#64283)
Adds support for the `referrerPolicy` option in `HttpResource`, allowing developers to control how much referrer information is sent with each HTTP request.

PR Close #64283
2025-10-13 10:00:27 -07:00
SkyZeroZx
3013226acf docs: Adds documentation for image decoding attribute (#64261)
Expands the image optimization guide to explain browser image decoding strategies

PR Close #64261
2025-10-10 06:41:32 -07:00
SkyZeroZx
5cbdefcf11 feat(http): add support for fetch referrerPolicy option in HttpClient (#64116)
Introduces a referrer policy option for HTTP requests to allow specifying the referrer information sent, improving privacy and security controls.

PR Close #64116
2025-10-07 20:45:34 -04:00
Matthieu Riegler
9eac43cf46 feat(common): Support of optional keys for the KeyValue pipe (#48814)
This commit is extending the capabilities of the KeyValue pipe by allowing interfaces with optional keys.

fixes angular#46867

PR Close #48814
2025-10-02 16:58:40 +00:00
Jeremy Kescher
0e4e17cd97 refactor(http): HttpResponseBase.statusText (#64176)
Since HTTP/2, responses no longer contain a status text besides the status code, which caused our default value of 'OK' to be used in HttpErrorResponse.message.

DEPRECATED: `HttpResponseBase.statusText` is deprecated

PR Close #64176
2025-10-02 07:50:29 -07:00
kirjs
05370837fc Revert "feat(common): Support of optional keys for the KeyValue pipe (#48814)" (#64179)
This reverts commit 99c5269ee8.

PR Close #64179
2025-10-01 12:45:32 -04:00
Matthieu Riegler
99c5269ee8 feat(common): Support of optional keys for the KeyValue pipe (#48814)
This commit is extending the capabilities of the KeyValue pipe by allowing interfaces with optional keys.

fixes #46867

PR Close #48814
2025-10-01 08:58:47 -04:00
Joey Perrott
a9145f3856 Revert "feat(common): update to cldr 47 (#63923)" (#64031)
This reverts commit 8ca3e3a0bc.

PR Close #64031
2025-09-24 15:03:43 +00:00
Joey Perrott
8ca3e3a0bc feat(common): update to cldr 47 (#63923)
Update to CLDR version 47 for localization

PR Close #63923
2025-09-23 19:57:00 +00:00
JoostK
50d9d55f49 fix(core): fix narrowing of Resource.hasValue() (#63994)
This commit changes `Resource.hasValue()` and its derived types to improve narrowing
of resources whose generic type either does not include `undefined` (i.e. when a default
value has been provided) or when the generic type is `unknown`. This fixes the undesirable
behavior where `hasValue()` would cause the `else` branch of an `hasValue()` conditional
to have a narrowed type of `never`, given that the `hasValue()`'s type guard covers the
entire type range already (meaning that the type in the else-branch cannot be inhabited
in the type system, yielding the `never` type).

By making the `hasValue()` method only a type guard when the generic type includes `undefined`
these problems are avoided.

Fixes #60766
Fixes #63545
Fixes #63982

PR Close #63994
2025-09-23 14:20:55 +00:00
Matthieu Riegler
c50d659509 refactor(core): protect InjectionToken usage of ngDevMode (#63875)
Since those are top level APIs, `ngDevMode` might not be available at runtime if they're invoked before the variable is set.

fixes #62796

PR Close #63875
2025-09-19 21:27:45 +00:00
Matthieu Riegler
e52338466f refactor(common): trim undefined from locale data. (#63520)
This is an optimization to shave of unecessary data.

fixes #42315

PR Close #63520
2025-09-17 14:57:16 +00:00
Kristiyan Kostadinov
8f59295019 refactor(core): remove unnecessary deps arrays (#63823)
We don't need to use the `deps` array syntax anymore since we have the `inject` function. These changes clean up the relevant usages.

PR Close #63823
2025-09-16 16:51:52 +00:00
SkyZeroZx
3327de1b88 docs: add documentation for NG02802 warning about HttpTransferCache headers (#63802)
add documentation for NG02802 warning about HttpTransferCache headers

PR Close #63802
2025-09-15 15:38:24 +00:00
Matthieu Riegler
7a4b225c57 refactor(common): improve typing of ngComponentOutletContent (#63674)
Dropping `any` in favor of `Node` for better type safety and clarity.

BREAKING CHANGE: `ngComponentOutletContent` is now of type `Node[][] | undefined` instead of `any[][] | undefined`.

fixes #63538

PR Close #63674
2025-09-10 22:26:27 +00:00
Matthieu Riegler
5220cea223 build: add a noDuplicateEnumValue rule (#63483)
It caught several legitimate issues.
In the cases I wasn't sure, I just disabled the rule.

fixes #45843

PR Close #63483
2025-09-10 22:16:10 +00:00
Andrew Scott
c3576506b3 refactor(core): Update tests for zoneless by default (#63668)
This updates tests and examples only to prepare for zoneless by default.

These changes were identified and made as part of #63382. Anything that
failed gets `provideZoneChangeDetection` unless the fixes were easily
and quickly determined.

It also adds the zoneless provider to the `initTestEnvironment` calls
for tests in this repo to prevent regressions before #63382 is merged.

PR Close #63668
2025-09-09 14:41:56 -07:00
Matthieu Riegler
7aa9350dc7 build: use cldr typings (#63519)
This replaces an `any`.

PR Close #63519
2025-09-02 16:50:34 +00:00
Andrew Scott
c795960ada feat(common): Add experimental support for the Navigation API (#63406)
The navigation API is part of interop 2025. You can find the
implementation status for each major browser here:

https://wpt.fyi/results/navigation-api?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2025-navigation

https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API

BREAKING CHANGE: (test only) - `TestBed` now provides a fake `PlatformLocation`
implementation that supports the Navigation API. This may break some
tests, though we have not observed any failures internally. You can revert to the
old default for `TestBed` by providing the `MockPlatformLocation` from
`@angular/common/testing` in your providers:
`{provide: PlatformLocation, useClass: MockPlatformLocation}`

PR Close #63406
2025-08-28 11:48:03 -07:00
Hongxu Xu
1f4c5f72aa refactor(bazel): reduce build deps (#63348)
clean up deps in bazel build scripts

PR Close #63348
2025-08-28 09:16:10 -07:00
SkyZeroZx
07e678872f feat(http): Add reponseType property to HttpResponse and HttpErrorResponse (#63043)
Add support for the Fetch API's responseType property in HttpResponse and HttpErrorResponse when using HttpClient with the withFetch provider.

PR Close #63043
2025-08-28 08:34:56 -07:00
Matthieu Riegler
6489af7678 refactor(http): rework the HttpEvent union to improve narrowing. (#63267)
Prior to this change, `HttpProgressEvent` could not be narrowed to `HttpDownloadProgressEvent` or `HttpUploadProgressEvent`

PR Close #63267
2025-08-27 11:25:02 -07:00
Joey Perrott
b4ae94d5ef refactor: remove TODOs which have been corrected (#63421)
Remove TODOs which were addressed but the comment was not removed

PR Close #63421
2025-08-27 11:23:57 -07:00
Joey Perrott
2fcafb65c5 build: rename defaults2.bzl to defaults.bzl (#63383)
Use defaults.bzl for the common macros

PR Close #63383
2025-08-25 15:45:01 -07:00
arturovt
1ebba5442f refactor(common): drop X-Request-URL (#61943)
This commit drops the `X-Request-URL` header. It was a non-standard HTTP response header, deprecated long ago and never part of any official specification. Modern browsers now expose the final URL via the `XMLHttpRequest.responseURL` property, as defined in the WHATWG spec.

PR Close #61943
2025-08-25 08:45:19 -07:00
Joey Perrott
3df1dccebe refactor: various build and import specificer fixes for strict deps (#63323)
Change direct deps in bazel targets and import specifiers within files to maintain strict deps requirements ahead of enabling strict deps tests in the repo

PR Close #63323
2025-08-22 14:45:00 -07:00
Matthieu Riegler
25f593ce2a refactor(common): removengModuleFactory input of NgComponentOutlet (#62838)
This was deprecated by #44815

BREAKING CHANGE: NgModuleFactory has been removed, use NgModule instead.

PR Close #62838
2025-08-20 13:27:18 +00:00
Joey Perrott
718bfd2fb7 build: move from using WORKSPACE to MODULE.bazel (#63246)
Update to use MODULE.bazel

PR Close #63246
2025-08-20 08:26:17 +00:00
Matthieu Riegler
4bed062bc9 feat(http): Provide http services in root (#56212)
The changes introduced in this commit allows to use the HttpClient without the provider function.

PR Close #56212
2025-08-14 13:04:35 +02:00
Joey Perrott
ecc86e2986 build: explicitly include types for locales in @angular/common/locales (#63030)
Include the d.ts files for each local in the @angular/common/locales files

PR Close #63030
2025-08-06 11:44:33 -07:00
Joey Perrott
fa8d8b8396 build: migrate all npm packages to use new rules_js based npm_package rule (#62954)
Use a common rule for all npm_packages

PR Close #62954
2025-08-05 19:08:45 +00:00
Vincent
e5d6fb5825 fix(http): Reset headers, progress, and statusCode when using set() in HttpResource (#62873)
Currently, those values aren't reset, which means they are out of sync with the new value

PR Close #62873
2025-08-01 08:08:52 +00:00