13820 Commits

Author SHA1 Message Date
Kristiyan Kostadinov cda402f1d8 fix(compiler-cli): account for expression with type arguments during HMR extraction (#63261)
Fixes that the HMR extraction logic didn't accoubnt for expressions with type arguments (e.g. `viewChild('foo', {read: TemplateRef<unknown>})`).

Fixes #63240.

PR Close #63261
2025-08-20 11:31:44 +00:00
Matthieu Riegler 373670c42c docs: update NG_VALIDATORS examples to use forwardRef (#63247)
PR Close #63247
2025-08-20 09:27:20 +00:00
Julien Zapata Duque 683ae03764 docs: use correct closing quote in input and model import usage notes (#63237)
PR Close #63237
2025-08-19 12:33:23 +00:00
Shuaib Hasan Akib 9e26158668 refactor(core): update NG0303 error message (#63222)
Ensure consistency in error message wording by aligning the NG0303
error with other Angular error strings. This improves clarity and
maintains a uniform developer experience

PR Close #63222
2025-08-19 08:25:50 +00:00
Matthieu Riegler d4c100ccb3 docs(docs-infra): lift circular imports (#63186)
This commit also adds adev on the cyclic import check.

PR Close #63186
2025-08-19 07:58:46 +00:00
Joey Perrott b413b62856 build: update the failure message with the correct command (#63219)
Update the failure message for compliance tests to use the correct command for updating the goldens

PR Close #63219
2025-08-18 15:08:57 +00:00
Kristiyan Kostadinov 691f5ed033 fix(compiler): error when ng-content fallback has translated children (#63156)
Fixes that the pipeline wasn't processing the fallback content of `ng-content` for i18n which resulted in a compiler error further down the line.

Fixes #63065.

PR Close #63156
2025-08-15 09:47:18 +02:00
Kristiyan Kostadinov b1dec9bc50 fix(compiler): incorrect source span for expression AST inside template attribute (#63175)
Similar fix as #63082, but for template attributes. The root cause is the same where we should be using `fullStart` instead of `start` in order to account for whitespaces being skipped.

Fixes #63157.

PR Close #63175
2025-08-15 09:44:36 +02:00
Matthieu Riegler 7ee49651b4 docs: fix edit links for block/element api entries (#62766)
PR Close #62766
2025-08-14 13:03:01 +02:00
Joey Perrott 04f1d54001 build: update to bazel 7.6.0 (#63096)
Update to later version of bazel

PR Close #63096
2025-08-14 13:01:31 +02:00
Paul Gschwendtner 5e9893daa0 refactor(compiler-cli): ensure JIT transforms with queries work with closure property renaming (#63123)
This map for the JIT transforms accidentally is property-renamed,
breaking the lookups below. This commit fixes this.

PR Close #63123
2025-08-12 13:24:09 -07:00
Matthieu Riegler e6c84a4a12 refactor(zone.js): remove unused jasmine globalerror monkey patching. (#63077)
This is for testing purposes for now. See discussion on the related issue.

fixes #63072

PR Close #63077
2025-08-11 16:41:11 -07:00
Matthieu Riegler 1dd6fd044a refactor(core): remove temporary resource setter function. (#63097)
Now that G3 has been fully migrated to the new throwing behavior, we don't need that setter anymore.

PR Close #63097
2025-08-11 15:43:47 -07:00
Kristiyan Kostadinov d9e37908a5 fix(compiler): incorrect spans for AST inside input value with leading space (#63082)
When parsing expressions inside a bound attribute, we offset all of its spans by an `absoluteOffset` in order to get the right spans in the source file. The offset was incorrect when parsing an attribute with leading spaces during the construction of the Ivy AST, because of the combination of:
1. We were setting the offset by looking at `valueSpan.start`.
2. The Ivy parser sets `leadingTriviaChars: [' ', '\n']` which means that spaces and new lines will be ignored in the `sourceSpan.start`.

These changes resolve the issue by using `valueSpan.fullStart` which includes the leading spaces.

Fixes #63069.

PR Close #63082
2025-08-11 11:57:06 -07:00
Joey Perrott b72ef65b08 build: update to the latest version of devinfra and rename npm2 workspace (#63093)
Rename the npm2 workspace to npm and use the latest version of devinfra which drops rules_nodejs

PR Close #63093
2025-08-11 10:35:33 -07:00
Kristiyan Kostadinov 5fd79424e3 fix(router): attempt to resolve component resources in JIT mode (#63062)
In #62758 we started loading the component resources during bootstrap in JIT mode to ensure that they're in place by the time we create the component. This won't work for lazy-loaded components in the router, because they don't exist at bootstrap time.

These changes add similar logic when the router loads a component.

PR Close #63062
2025-08-08 14:18:22 -07:00
Matthieu Riegler 322042c5b3 fix(core): destroying the effect on afterRenderEffect (#63001)
Prior to this commit, the effect node wasn't destroyed.

fixes #62980

PR Close #63001
2025-08-08 08:46:47 -07:00
Kristiyan Kostadinov 4aa120ac00 fix(compiler-cli): error when type checking host bindings of generic directive (#63061)
Fixes that the compiler was throwing an error if type checking of host bindings is enabled for a generic directive. The problem was that we were always using the `TcbNonGenericDirectiveTypeOp`.

Fixes #63052.

PR Close #63061
2025-08-08 08:42:24 -07:00
Andrew Scott f6876d7c30 refactor(zone.js): Add internal implementation for auto ticking fakeAsync (#62135)
Benefits of auto-ticking mock clocks have been described in other PRs,
such as https://github.com/jasmine/jasmine/pull/2042 and
https://github.com/sinonjs/fake-timers/pull/509. In short, `fakeAsync`
cannot work when some tasks are required to be truly async, such as XHRs
or observers like ResizeObserver. In addition, auto ticking mock clocks
can be applied to tests without the tests then needing to update
everything to manually flush timers.

PR Close #62135
2025-08-08 08:39:25 -07:00
Joey Perrott 847de40196 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:34 -07:00
SkyZeroZx 974ba1066f refactor(service-worker): improve localhost detection in scheduleInitialization (#62861)
Replaces ad hoc localhost check with a dedicated method using a regular expression for more reliable detection

PR Close #62861
2025-08-06 15:09:57 +02:00
Amila Welihinda fd373f2ddd refactor(animations): optimize resolveTimeExpression (#62927)
This moves a regexp expression into a const to optimize performance.

PR Close #62927
2025-08-06 15:09:19 +02:00
Milo 294fc880e4 refactor(devtools): enable view source for template effects (#62692)
Use inspect(class instance.constructor) to jump to the source of
components when trying to inspect template effects

PR Close #62692
2025-08-06 11:19:15 +02:00
Joey Perrott 26f99b3dcd build: migrate all npm packages to use new rules_js based npm_package rule (#62989)
Use a common rule for all npm_packages

PR Close #62989
2025-08-05 19:09:26 +00:00
Joey Perrott 16a4d80745 build: no longer rely on archive packages for integration tests (#62997)
Now that the packages are avaiable at the base node_modules we can treat local packages as normal packages and not leverage the archive package versions

PR Close #62997
2025-08-05 10:12:34 +02:00
Paul Gschwendtner c9f3976eba fix(core): properly recognize failed fetch responses when loading external resources in JIT (#62992)
Currently when loading external resources in JIT, when `fetch` fails,
the `text` is empty and the component is loading. This hides the actual
underlying fetch error. We should properly detect this and error out.

PR Close #62992
2025-08-05 10:10:57 +02:00
Kristiyan Kostadinov 3b2e8efcac fix(compiler-cli): correctly type check host listeners to own outputs (#62965)
Currently the code that type checks host bindings assumes that all listeners are bound to the DOM, however that's not the case since host bindings can also bind to own outputs.

These changes update the TCB to generate the proper code for type checking such outputs.

Fixes #62783.

PR Close #62965
2025-08-05 10:04:26 +02:00
Kristiyan Kostadinov 17c110e618 refactor(compiler): allow directives to be resolved on host element (#62965)
Allows the target binder to resolve directives set on the host element.

PR Close #62965
2025-08-05 10:04:26 +02:00
Vincent ae443f8eb0 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:53 +00:00
Joey Perrott 216d883074 build: use pnpm as the package manager instead of yarn (#62926)
Use pnpm instead of yarn as the package manager and interaction tool for the repo

PR Close #62926
2025-07-31 22:11:52 +00:00
Angular Robot c92a306e5b build: update cross-repo angular dependencies (#62903)
See associated pull request for more information.

PR Close #62903
2025-07-31 09:58:08 +00:00
Kristiyan Kostadinov 7a5851e4b0 fix(migrations): incorrect filtering in inject migration (#62913)
The inject migration wasn't implementing file filtering properly which resulted in it passing an invalid tsconfig path to TypeScript.

Fixes #62866.

PR Close #62913
2025-07-31 09:15:43 +00:00
Joey Perrott 875ea30d6b build: remove ts_project_interop infrastructure (#62909)
Remove the interop macros and final usages

PR Close #62909
2025-07-31 09:14:25 +00:00
Joey Perrott adbb19d40f build: remove usages of runtime_rnjs_interop (#62909)
Remove all usages of the runtime_rnjs_interop feature

PR Close #62909
2025-07-31 09:14:25 +00:00
Joey Perrott 97180abd44 build: migrate @angular/upgrade examples tests to new esbuild (#62907)
Migrate to the new esbuild

PR Close #62907
2025-07-30 17:37:14 +00:00
Joey Perrott 280f1f59e1 test(language-service): update language-service legacy tests (#62900)
Update the language-service legacy tests to use new toolchain as basis for tests

PR Close #62900
2025-07-30 15:54:59 +00:00
Jessica Janiuk 82fcc9c136 Revert "fix(http): add missing http options allowed in fetch API (#62881)" (#62899)
This reverts commit ab6033979a.

PR Close #62899
2025-07-30 14:35:36 +00:00
SkyZeroZx ab6033979a fix(http): add missing http options allowed in fetch API (#62881)
The addBody function was not preserving all fetch API options like integrity and referrer when creating request options for POST/PUT/PATCH requests. This caused these options to be stripped out during request construction.

PR Close #62881
2025-07-30 14:07:42 +00:00
Matthieu Riegler 25c6b1547f refactor(core): add private resource error helper function for g3 migration (#62840)
This function is intented to be temporary to help migrate G3 code to the new throwing behavior.

PR Close #62840
2025-07-30 09:23:11 +00:00
Joey Perrott 775f918192 build: remove usages of rules_nodejs (#62885)
Remove rules_nodejs usages with direct migrations to rule_js alternatives

PR Close #62885
2025-07-30 08:51:28 +00:00
Matthieu Riegler db3c5826ee fix(compiler): exclude more safe reads expression from 2way-binding (#62852)
Priori to this fix the parser would allow safereads in accestor receievers (but the direct one).

fixes #62837

PR Close #62852
2025-07-29 17:28:08 +00:00
arturovt 8ddf5e4dc1 refactor(service-worker): align getRegistration() types (#62497)
In this commit, we align the service worker types with those provided by TypeScript. The `ServiceWorkerContainer.getRegistration()` method returns a `Promise<ServiceWorkerRegistration | undefined>`, but we were casting it to `Observable<ServiceWorkerRegistration>`, ignoring the possibility of `undefined`.

This is unsafe, as we should account for the case where the registration is `undefined` and handle it appropriately in the push manager.

PR Close #62497
2025-07-29 17:25:03 +00:00
Joey Perrott c9fb4e31dd build: use ts_project based extract_types (#62875)
Use the extract_types that pulls from ts_project deps

PR Close #62875
2025-07-29 17:14:27 +00:00
Joey Perrott ea1afec1e4 build: move http_server and generate_api_docs into defaults2.bzl (#62878)
Move http_server and generate_api_docs into defaults2.bzl as they are rules_js compliant

PR Close #62878
2025-07-29 16:53:55 +00:00
Matthieu Riegler 0b9f53a05d docs: fix ActivateRoute example (#62855)
PR Close #62855
2025-07-29 12:17:46 +00:00
Matthieu Riegler f0fca612ee refactor(common): replace aio links to adev (#62839)
The is a doc change + a minor test change (to remove test logs that mention aio)

PR Close #62839
2025-07-29 09:55:26 +00:00
Joey Perrott 622e10881f build: standardize usage of js_binary (#62860)
Remove usages of nodejs_binary and use a commonly defined js_binary macro

PR Close #62860
2025-07-29 06:43:45 +02:00
Joey Perrott 2b16824110 build: move tsec to new toolchain (#62825)
Migrate tsec tooling/macro to use tsec directly as a js_binary and rely on ts_project dependencies.

PR Close #62825
2025-07-28 20:07:05 +02:00
Milo c633b63e56 fix(core): update symbols for new signals api (#62284)
approve the new symbols that appear from bundling the signals changes

PR Close #62284
2025-07-28 17:01:43 +02:00
Milo ce2cd9e7a0 refactor(core): use quad linked lists for signals (#62284)
inspired by the design of Preact's signals, use linked lists instead of arrays for faster signal creation

PR Close #62284
2025-07-28 17:01:43 +02:00