Commit graph

1260 commits

Author SHA1 Message Date
SkyZeroZx
3dfdb71d65 docs: add docs for transform property in built-in loaders 2026-01-07 09:17:59 -05:00
Andrew Scott
dd58c4b667 refactor(common): Add token to indicate whether precommit handler is supported
This commit adds a token that indicates whether the precommitHandler feature
is supported by the navigation api.

https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/intercept#precommithandler
2026-01-06 16:10:56 -05:00
SkyZeroZx
a6b8cb68af feat(common): support custom transformations in ImageKit and Imgix loaders
Adds a `transform` parameter for ImageKit and Imgix image loaders.
2026-01-05 15:50:13 -05:00
SkyZeroZx
d8790972be feat(common): Add custom transformations for Cloudflare and Cloudinary image loaders
Adds support for custom transformations to Cloudinary and Cloudflare image loaders via a `transform` parameter.

Fixes #65191 #64639
2026-01-02 08:07:29 +01:00
Matthieu Riegler
6270bba056 ci: reformat files
This is after we've slightly changed a rule in #66056
2025-12-16 14:44:19 -08:00
SkyZeroZx
8485579649 refactor(common): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary declarations from injection tokens
2025-12-12 08:05:30 -08:00
Anuj Chhajed
96b79fc393 refactor(core): correct all typeof ngDevMode comparison patterns introduced by #63875
This change replaces all remaining occurrences of `typeof ngDevMode !== undefined`
with the correct `typeof ngDevMode !== 'undefined'` form. This aligns the codebase
with JavaScript typeof semantics and maintains consistency with other Angular code.
2025-12-08 10:30:01 -08:00
SkyZeroZx
7e1e396a00 docs: add documentation for HTTP_TRANSFER_CACHE_ORIGIN_MAP 2025-12-08 09:00:08 -08:00
Alan Agius
0659d11c85
fix(http): enable XSRF protection for same-origin absolute URLs
Previously, the XSRF interceptor only added the XSRF token to requests with relative URLs.
This commit updates the interceptor to also add the token to requests with absolute URLs, provided they match the current origin.
2025-12-03 12:19:43 +01:00
Alan Agius
40790ef980 fix(http): prevent XSRF token leakage to protocol-relative URLs
The XSRF interceptor previously failed to detect protocol-relative URLs (starting with `//`) as absolute URLs. This allowed requests to such URLs to include the XSRF token, potentially leaking it to external domains.

This change updates the interceptor to correctly identify protocol-relative URLs as absolute and exclude them from receiving the XSRF token.
2025-11-25 13:47:26 -05:00
hawkgs
3ae452e64f 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-11-24 11:30:12 -05:00
SkyZeroZx
24243e34d9 refactor(common): removes unused NgModuleFactory config in NgComponentOutlet
Removes the `ngComponentOutletNgModuleFactory`  in `_needToReCreateNgModuleInstance`
2025-11-17 08:46:08 -08:00
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