Commit graph

36863 commits

Author SHA1 Message Date
Angular Robot
91b3466e97 build: update actions/checkout action to v5 (#63114)
See associated pull request for more information.

PR Close #63114
2025-08-12 19:08:49 -07:00
Matthieu Riegler
657061e528 build: patch @angular/build to allow fw/cli mismatch (#63098)
This will allow us to build adev while the CLI and the FW major versions are mismatched.
we can remove this patch once the CLI has published a v21 pre-release (or a flag to disable that error).

PR Close #63098
2025-08-12 18:46:22 -07:00
Andrew Scott
aaf053c288 build: update main branch to target 21 (#63098)
main branch should go to 21 not 20.3

PR Close #63098
2025-08-12 18:46:22 -07:00
Jeremy Elbourn
4d9385b5fd docs: add topic for takeUntilDestroyed (#63122)
This was missing from the RxJS interop guide. I came across it while
cleaning up some Google-internal docs and realized I had nothing on adev
to which I could link.

PR Close #63122
2025-08-12 18:41:18 -07:00
Angular Robot
d7a5eadbfa build: update pnpm to v10 (#63087)
See associated pull request for more information.

PR Close #63087
2025-08-12 16:53:31 -07:00
Paul Gschwendtner
ea78278635 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
Jeremy Elbourn
e64271df92 fix(docs-infra): put content in <main> element (#63121)
This fix updates the adev `DocViewer` component to support rendering with the `main[docsViewer` selector so that the primary content for the page is inside of a `<main>` element (without introducing an extra DOM element).

PR Close #63121
2025-08-12 11:05:13 -07:00
ivanwonder
b695ff02cb feat(language-service): support auto-import for attribute completions (#62797)
Add logic to provide code actions for auto-importing directives that
are out of scope.

PR Close #62797
2025-08-12 10:57:08 -07:00
Angular Robot
6c51c29925 build: lock file maintenance (#62977)
See associated pull request for more information.

PR Close #62977
2025-08-12 10:05:28 -07:00
Angular Robot
11b527cecd build: update scorecard action dependencies (#63086)
See associated pull request for more information.

PR Close #63086
2025-08-12 09:58:11 -07:00
Angular Robot
01fb2b1b80 build: update actions/checkout action to v5 (#63102)
See associated pull request for more information.

PR Close #63102
2025-08-12 09:55:54 -07:00
Matthieu Riegler
09df37507f docs: add missing supported != operator (#63108)
fixes 63103

PR Close #63108
2025-08-12 09:39:05 -07:00
Alan Agius
54fe7ca055 build: use link: instead of file: (#63111)
When using `file:` renovate updates fails due to ` ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND ` this is due to a different behaviour between `link:` amd `file:`. `link:` however will not fail when the directory does not exist.

PR Close #63111
2025-08-12 09:37:54 -07:00
Alan Agius
5d9f124876 build: migrate config renovate.json (#63110)
Closes #62955 as a pr takeover

PR Close #63110
2025-08-12 09:37:04 -07:00
Alan Agius
1846874f1f ci: correctly configure ignored filenames (#63105)
Previously, the path did not match a file.

PR Close #63105
2025-08-12 10:02:00 +02:00
Alan Agius
434ff7f1a0 build: resolve pnpm workspace dependency on compiler-cli (#63105)
The `pnpm install` command was failing for the `packages/core/test/bundling` project with the error:
`ERR_PNPM_NO_MATCHING_VERSION No matching version found for @angular/compiler-cli@0.0.0-PLACEHOLDER`

This happenes only in renovate updates.

PR Close #63105
2025-08-12 10:02:00 +02:00
Alan Agius
91f8963d86 build: fix ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND for typings tests (#63105)
During `pnpm install` in a monorepo setup, the `packages/zone.js/test/typings` project would fail with the error: `ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND: Could not install from "/.../node_modules/typescript" as it does not exist.`

PR Close #63105
2025-08-12 10:01:59 +02:00
Alan Agius
a786bb6f4b build: remove redundant yarn.lock files (#63105)
These are now managed by pnpm.

PR Close #63105
2025-08-12 10:01:59 +02:00
Matthieu Riegler
9aef481172 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:09 -07:00
Matthieu Riegler
f9a38a4b73 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:45 -07:00
hawkgs
d47ea29b89 refactor(devtools): keep TreeVisualizer snapped node on focus (#62982)
Keep `TreeVisualizer` snapped node on focus when the container/split is being resized.

PR Close #62982
2025-08-11 12:26:31 -07:00
Matthieu Riegler
baa31fb1a1 docs: remove router testing from the testing scenarios guide (#63078)
This commit also adds the router testing guide to the testing section

PR Close #63078
2025-08-11 12:15:39 -07:00
Kristiyan Kostadinov
d17555a7c6 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:05 -07:00
Alan Agius
06f5879e42 ci: several fixes for renovate (#63083)
This commit contains several fixes for renovate to work properly with `pnpm`

PR Close #63083
2025-08-11 11:03:28 -07:00
Joey Perrott
c4dcfdf644 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:32 -07:00
Kristiyan Kostadinov
57184d0895 docs: release notes for the v20.2.0-rc.0 release 2025-08-11 10:42:32 +02:00
Kristiyan Kostadinov
2e4db98877 release: bump the next branch to v20.3.0-next.0 2025-08-11 10:42:32 +02:00
Kristiyan Kostadinov
660444fbf2 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:21 -07:00
SkyZeroZx
3b214d2040 feat(service-worker): Logs unhandled promise rejections in service worker (#63059)
Adds handling and logging for unhandled promise rejections to improve debugging and prevent silent failures. Updates tests and test harness to verify logging of rejection reasons

PR Close #63059
2025-08-08 11:07:19 -07:00
Shuaib Hasan Akib
efb2726ffc docs(docs-infra): add next page reference (#62566)
PR Close #62566
2025-08-08 11:06:33 -07:00
Jessica Janiuk
6a1184600c fix(core): prevents duplicate nodes when @if toggles with leave animations (#63048)
In the case that a leave animation is running and someone toggles an `@if`, a new node would be inserted. For a brief moment, there may be two of the same nodes visible at once. While this is expected with native CSS, it's not ideal. Instead, we retain a reference to the leaving element and can remove that node when the new node is entering.

fixes: #63020

PR Close #63048
2025-08-08 10:02:35 -07:00
hawkgs
c0bfe23bc9 refactor(devtools): save theme preference (#63050)
Save the theme preference in the settings store.

PR Close #63050
2025-08-08 08:58:14 -07:00
Matthieu Riegler
85d51a3215 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:46 -07:00
Kristiyan Kostadinov
a409534d6c feat(core): support as aliases on else if blocks (#63047)
Expands support for the `as` keyword to `@else if` blocks. Previously it was only allowed on `@if`.

PR Close #63047
2025-08-08 08:43:00 -07:00
Kristiyan Kostadinov
c77e51930d 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:23 -07:00
Andrew Scott
0a827f9284 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:24 -07:00
Andrew Scott
124dcc0a1f release: cut the v20.2.0-next.6 release 2025-08-07 15:45:04 -07:00
Andrew Scott
812463c563 fix(compiler-cli): Ignore diagnostics on ngTemplateContextGuard lines in TCB (#63054)
Deprecated diagnostics can appear on the context guard becaues the
directive itself may be deprecated.

For example, context guards look like `if (i1.NgForOf.ngTemplateContextGuard(_t8, _t9) /*331,378*/) {...}`
and typescript will report the deprecation on the whole element, from
start to end tag, because the span for that node includes it.

fixes https://github.com/angular/vscode-ng-language-service/issues/2203

PR Close #63054
2025-08-07 15:38:38 -07:00
Andrew Scott
45b030b5ce fix(compiler-cli): prevent dom event assertion in TCB generation on older angular versions (#63053)
This fixes an issue caused by
https://github.com/angular/angular/pull/62648 for older versions of
Angular when the newest version of the language service is used. This
prevents the TCB from attempting to use the assertType when it does not
exist.

fixes #63046

PR Close #63053
2025-08-07 15:37:54 -07:00
Joey Perrott
0d12eac34c build: remove unused old toolchain dependencies (#63039)
Update to latest version of dev-infra and complete the removal of rules_nodejs from the repo

PR Close #63039
2025-08-07 09:31:45 -07:00
Doug Parker
e524b333a3 docs(devtools): update pnpm install command (#63040)
The `install` subcommand is necessary for `--frozen-lockfile` to work.

PR Close #63040
2025-08-07 09:11:22 -07:00
Cheng-Hsuan Tsai
621d077746 docs(docs-infra): fix inconsistent codeblock styles (#63041)
PR Close #63041
2025-08-07 09:09:21 -07:00
Doug Parker
3a320bdec9 release: bump Angular DevTools version to 1.0.42 (#63036)
PR Close #63036
2025-08-06 14:56:26 -07:00
Andrew Scott
90b0227407 release: cut the v20.2.0-next.5 release 2025-08-06 12:11:18 -07:00
Andrew Scott
9365a7fde3 docs: release notes for the v20.1.6 release 2025-08-06 12:05:20 -07: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
Matthieu Riegler
687c374826 feat(router): add a currentNavigation signal to the Router service. (#63011)
This new signal property is convenient to derive a `isNavigating` state.

`isNavigating = computed(() => !!this.router.currentNavigation())`

DEPRECATED: The Router.getCurrentNavigation method is deprecated. Use the Router.currentNavigation signal instead.

fixes #62958

PR Close #63011
2025-08-06 09:54:53 -07:00
Ryan Bendel
d24d5742db feat(platform-browser): Add IsolatedShadowDom encapsulation method (#62723)
IsolatedShadowDom encapsulation fixes style leakage in Shadowdom encapsulation by removing sharedstyleshost from dom-renderer IsolatedShadowdom class. Updates docs.

PR Close #62723
2025-08-06 16:48:37 +02:00
Ben Hong
fd5fcf3887 docs: add dedicated router testing guide (#62445)
PR Close #62445
2025-08-06 16:47:21 +02:00
ivanwonder
b78de31c94 refactor(language-service): handle the undefined value of a symbol for a type (#63002)
using the `getSymbol` instead of the `type.symbol`, for the primitive type,
the `type.symbol` returns the `undefined` value. The return type of `getSymbol`
includes `undefined`, while `type.symbol` does not.

For example:

```ts
class BarComponent {
   /**
   * @deprecated
   */
  name = ""
}
```

The type of `name` is `string`, the `type.symbol` for the `string`
returns `undefined` here.

e3ef7ff50d/src/services/types.ts (L111)
e3ef7ff50d/src/compiler/types.ts (L6445)

PR Close #63002
2025-08-06 16:46:40 +02:00