Commit graph

35730 commits

Author SHA1 Message Date
SkyZeroZx
e0694df3ec fix(language-service): avoid interpolation highlighting inside @let
This change omits treating `{{ }}` interpolation syntax as valid inside `@let` binding strings, preventing the interpolation curly braces from superseding the match of the surrounding binding expression and ensuring the highlighter reflects the correct semantics of `@let` bindings.

fixes #61643

(cherry picked from commit 9f5744a92d)
2025-12-17 09:39:23 -08:00
Alan Agius
48492524ea fix(core): use mutable ResponseInit type for RESPONSE_INIT token
The `RESPONSE_INIT` token previously used `ResponseInit`. However, `@types/node` (and `undici`) definitions for `ResponseInit` mark properties as `readonly`, which differs from the standard DOM `ResponseInit`.

This commit introduces a `ResponseInit` type that explicitly removes `readonly` modifiers to ensure compatibility and allow for mutable options. This type is now used by the `RESPONSE_INIT` token and is exported from `@angular/core`.

(cherry picked from commit f516370c8e)
2025-12-17 09:35:27 -08:00
Andrew Kushnir
a4d2de8179 Revert "fix(core): explicitly cast signal node value to String"
This reverts commit c501b25d04.

(cherry picked from commit 9fa77af110)
2025-12-16 17:37:38 -08:00
Andrew Seguin
0eb623c05a fix(core): explicitly cast signal node value to String
If the computed's `toString` is called and `node.value` is a Symbol, the browser will throw an exception `ERROR TypeError: Cannot convert a Symbol value to a string`

Symbols cannot be implicitly changed to strings. This change changes the conversion to be explicit by wrapping `node.value` with `String()`

This can be reproduced if you create a computed with `createComputed(computation, equal)` and call `toString()` while `node.value` is something like `Symbol(UNSET)`

(cherry picked from commit c501b25d04)
2025-12-16 16:38:07 -08:00
SkyZeroZx
dc0aae9a59 docs: add section about reactive contexts
(cherry picked from commit 62ccd64e9f)
2025-12-16 16:35:28 -08:00
Marc Stammerjohann
0e59ac795c docs(router): add missing inject import
(cherry picked from commit dc7ae9aef3)
2025-12-16 16:34:23 -08:00
Matthieu Riegler
feed89e83c ci: reformat files
This is after we've slightly changed a rule in #66056

(cherry picked from commit 6270bba056)
2025-12-16 14:44:25 -08:00
Miles Malerba
729b96476b refactor(forms): rename field to fieldTree in FieldContext and ValidationError
BREAKING CHANGE:

(cherry picked from commit ae0c59028a)
2025-12-16 10:26:26 -08:00
SkyZeroZx
8d92f05105 refactor(platform-browser): remove unused platformIsServer flag from renderer
The` platformIsServer` flag is no longer referenced by the renderer and is effectively unused.
Removing it simplifies the implementation and avoids carrying redundant state.

(cherry picked from commit 2ccdf50fba)
2025-12-16 10:25:14 -08:00
SkyZeroZx
0a5fd6b6d4 refactor(core): conditionally include debug names based on ngDevMode
Conditionally include debug-related metadata based on `ngDevMode` to avoid
unnecessary information in production builds.

(cherry picked from commit bf2e50843d)
2025-12-16 09:37:42 -08:00
Angular Robot
7846bccdfc build: lock file maintenance
See associated pull request for more information.
2025-12-16 09:36:56 -08:00
Angular Robot
b92ffccf43 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-16 09:34:00 -08:00
Ben Hong
61a46487f1 docs: update links to guides in signal forms overview
(cherry picked from commit 3750622c46)
2025-12-16 09:29:15 -08:00
SkyZeroZx
561d300302 docs: update lightweight injection tokens guide to use contentChild, contentChildren, and inject APIs.
(cherry picked from commit 53c447e3c8)
2025-12-16 09:28:27 -08:00
Matthieu Riegler
df5ba9e2bd ci: reformat files
This is after we've slightly changed a rule in #66056
2025-12-16 09:25:37 -08:00
Shuaib Hasan Akib
c250bd01fe refactor(docs-infra): remove deprecated h.JSX.HTMLAttributes usage
Import HTMLAttributes directly from preact to address deprecation warning in header-api.tsx

(cherry picked from commit 3ff20a58d3)
2025-12-15 17:44:27 -08:00
Angular Robot
ca167b9f57 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-15 14:22:55 -08:00
Alan Agius
31b909040a refactor(compiler): remove unnecessary sanitization for safe attributes
Remove sanitization for attributes that cannot execute code (e.g. `javascript: URIs`).

(cherry picked from commit d4111eebc6)
2025-12-15 14:13:42 -08:00
Kirill Cherkashin
5afb1eb600 docs(forms): improve JSDoc for Signal Forms Schema types
Improved documentation for Schema, SchemaFn, and SchemaOrSchemaFn types
with clearer descriptions and usage examples.

(cherry picked from commit 193aa332fc)
2025-12-15 14:02:39 -08:00
Angular Robot
0905eb63b5 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-15 13:28:07 -08:00
Matthieu Riegler
3151c05e04 refactor(forms): add signal forms to the type tests
This will ensure that signal forms emit valid typings.
Also this commits moves `@standard-schema/spec` from peer-dep to regular dep

(cherry picked from commit 44d4439bc4)
2025-12-15 11:44:58 -08:00
kirjs
45e967b295 refactor(forms): convert Signal Forms errors to use RuntimeError
- Added 13 new error codes to forms/src/errors.ts (1900-1999)
- use RuntimeError

(cherry picked from commit 3a01d72850)
2025-12-15 11:44:06 -08:00
Angular Robot
e08350dfdd build: update dependency bazel to v8.5.0
See associated pull request for more information.

Closes #66067 as a pr takeover

(cherry picked from commit aabf719a6d)
2025-12-15 11:41:47 -08:00
Alan Agius
5148523bec build: remove API doc generation for localize/init and add mnemonic to API rendering rule.
The removed target was not used and was generating an empty output which causes `java.io.IOException: mandatory output packages/localize/init/localize_docs_html was not created`

(cherry picked from commit 2a5c6919d0)
2025-12-15 11:41:47 -08:00
Andrew Scott
def3c6636e docs: update link to releases for vscode extension
(cherry picked from commit a1eb2cef16)
2025-12-15 11:41:18 -08:00
Shuaib Hasan Akib
0dd5417352 docs: format CLI builder JSON examples using fenced blocks
Replaces custom docs-code components with fenced ```json``` blocks for
CLI builder examples, improving readability, consistency, and copy
support across the documentation.

Fixes #66060

(cherry picked from commit a2aa8fef05)
2025-12-15 11:35:01 -08:00
aparziale
01a6426ce3 docs(docs-infra): Fix broken link
Fix broken link side effects

Fix #66051

(cherry picked from commit a29a3988d6)
2025-12-15 11:34:00 -08:00
SkyZeroZx
3c417c7e56 docs: update code block syntax highlighting in documentation & fixed identation
(cherry picked from commit b043c7490f)
2025-12-15 11:33:34 -08:00
SkyZeroZx
15fd24d506 docs: replace @debugging tag with proper Markdown syntax
(cherry picked from commit 23fbe5cf9f)
2025-12-15 10:01:03 -08:00
Axel Jäger
23b2ca880a docs(forms): include update() in example for updating form value
(cherry picked from commit a1f5f52880)
2025-12-15 10:00:32 -08:00
Angular Robot
467a8aec63 build: update all github actions
See associated pull request for more information.
2025-12-15 09:59:39 -08:00
Matthieu Riegler
3267b98eb7 ci: enable embeddedLanguageFormatting for prettier
This allows to format inline templates

(cherry picked from commit f530b777b9)
2025-12-15 09:54:51 -08:00
SkyZeroZx
69b089a6c9 docs: Adds documentation for the NG0919 error
Adds a new documentation page for the NG0919 error, which indicates a circular dependency in Angular applications.

fixes  #65968

(cherry picked from commit bb65520991)
2025-12-15 09:52:20 -08:00
Joey Perrott
8d387658e1 ci: update google sync configuration to not include package.json
We don't use the package.json files within google3 and they don't need to be marked for sync

(cherry picked from commit 5f01f121df)
2025-12-15 09:51:23 -08:00
Matthieu Riegler
fe59d9abbc ci: fix deployement of previews
By pulling the fix angular/dev-infra/pull/3301

patch backport of #65971
2025-12-15 09:45:37 -08:00
Andrew Kushnir
534b1b507d Revert "refactor(compiler): remove unnecessary sanitization for safe attributes"
This reverts commit 128aef0ede.

(cherry picked from commit 8243bb3064)
2025-12-12 12:59:50 -08:00
Angular Robot
88e1829496 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-12 11:41:17 -08:00
Matthieu Riegler
8cabd67faf docs: update guidelines.md to match best-practices.md
fixes #65953

(cherry picked from commit be5dbf45ba)
2025-12-12 10:10:37 -08:00
Angular Robot
d6b02a788b docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-12 10:06:13 -08:00
Angular Robot
27bb376641 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-12 09:54:50 -08:00
Miles Malerba
81772b420d feat(forms): pass field directive to class config
Updates signal forms to pass the full `Field` directive to the class
configuration functions, rather than just the state. This allows
developers to take the element as well as the state into consideration
when deciding classes to apply.

Closes #65762

BREAKING CHANGE: The shape of `SignalFormsConfig.classes` has changed

Previously each function in the `classes` map took a `FieldState`. Now
it takes a `Field` directive.

For example if you previously had:
```
provideSignalFormsConfig({
  classes: {
    'my-valid': (state) => state.valid()
  }
})
```

You would need to update to:
```
provideSignalFormsConfig({
  classes: {
    'my-valid': ({state}) => state().valid()
  }
})
```

(cherry picked from commit 348f149e8b)
2025-12-12 08:07:57 -08:00
Kristiyan Kostadinov
4c8fb3631d fix(core): throw better errors for potential circular references
Currently circular references in user code manifest themselves with an error like `Cannot read properties of undefined (reading 'ɵcmp')`. This is a bit cryptic so these changes add an assertion mentioning circular references.

Relates to #65917.

(cherry picked from commit 7be4ddef1c)
2025-12-12 08:06:30 -08:00
Alan Agius
b8cb6cda30 refactor(compiler): remove unnecessary sanitization for safe attributes
Remove sanitization for attributes that cannot execute code (e.g. `javascript: URIs`).

(cherry picked from commit 128aef0ede)
2025-12-12 08:06:03 -08:00
SkyZeroZx
6d9d2b83f6 refactor(common): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary declarations from injection tokens

(cherry picked from commit 8485579649)
2025-12-12 08:05:34 -08:00
Angular Robot
0b90940461 build: update bazel dependencies
See associated pull request for more information.
2025-12-12 08:04:05 -08:00
Angular Robot
a507029666 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-12 08:01:08 -08:00
Angular Robot
87d20fd3ff build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-11 17:18:42 -08:00
Shuaib Hasan Akib
4d3b2bff88 docs: simplify example headers by showing only the file name
Removed redundant `src/app/` prefixes from <docs-code> headers to make
examples cleaner and easier to read. The full path remains available via
the `path` attribute, so the shortened headers improve clarity without
losing context.

(cherry picked from commit 63538524bc)
2025-12-11 17:17:09 -08:00
Andrew Xue
25f800712f docs(docs-infra): add primary color vars for tutorial button
(cherry picked from commit ff68806c67)
2025-12-11 17:11:31 -08:00
Leon Senft
8906814750 docs(forms): fix broken example
As written, the example rewrote the input value as the user edited it,
causing all kinds of confusing behavior which rendered the input nearly
unusable. While such implementations are possible, they require great
care to manage the cursor position while editing. For the sake of
brevity, this example now only updates the model on `blur` events; once
the user is done editing.

(cherry picked from commit f0ad30cce6)
2025-12-11 17:10:55 -08:00