Commit graph

35739 commits

Author SHA1 Message Date
arturovt
80dbd74ae8 refactor(core): wrap operationsCounter calls with ngDevMode checks
Wrap operationsCounter method calls (recordCreate, recordDestroy, reset)
with ngDevMode guards to ensure they are tree-shaken in production builds.

This aligns with the existing pattern where operationsCounter is only
initialized in development mode, and eliminates unnecessary method call
overhead in production.

The optional chaining (?.) is retained as TypeScript doesn't narrow types
based on ngDevMode checks, but the entire expression will be removed during
production builds.
2025-12-09 10:38:39 -08:00
Matthieu Riegler
8199945637 refactor(core): add dedicated deprecated signatures for providedIn: any / NgModule.
Those were deprecated by #47616 back in v15.

fixes #65923
2025-12-09 10:38:09 -08:00
Angular Robot
feb1278b5c docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-09 10:37:32 -08:00
Miles Malerba
aff8b248b3
feat(forms): expose element on signal forms Field directive
This allows for easier focusing of the relevant element based on the
`field` property of a `ValidationError`
2025-12-09 09:47:51 -08:00
Andrew Scott
200d923436 docs: Update tutorial last step to use markForCheck
Ideally this tutorial would have used signals but didn't. That's a bigger change than
we are able to make right now and there are other things we would like
to update at the same time. This fix is a temporary patch to the
existing content until there is time to redo the tutorial and videos
entirely.

fixes #65863
2025-12-09 09:39:31 -08:00
Angular Robot
95dfca7254 build: update bazel dependencies
See associated pull request for more information.
2025-12-09 09:38:19 -08:00
Matthieu Riegler
75fe8f8af9 refactor(upgrade): deprecate VERSION export
users should use the entry from `upgrade/static`.

DEPRECATED: `VERSION` from `@angular/upgrade` is deprecated. Please use the entry from `@angular/upgrade/static` instead.
2025-12-09 09:26:02 -08:00
SkyZeroZx
9a6b8e0315 docs(docs-infra): Refactors tutorial generation and updates ng-container docs
Updates the `ng-container` documentation page to use the correct `angular-html` code format and removes an unused CLI documentation file.
2025-12-09 09:25:29 -08:00
Kristiyan Kostadinov
ae1c0dc490 perf(compiler): chain query creation instructions
We always emit the query creation instructions in a group which makes them good candidates for chaining.
2025-12-09 09:24:36 -08:00
Andrew Scott
c9dfc6c484 fix(vscode-extension): Show warning if multiple versions of Angular are detected in workspace
This shows a more prominent warning when multiple versions of Angular
are detected in the workspace and we are forced to choose one to use for
the language server. This also logs those versions with their locations
and directs the user to view the output panel.

fixes #65466
2025-12-09 09:23:47 -08:00
Matthieu Riegler
3411638f65 docs(docs-infra): prefer/avoid code block styling
fixes #65866
2025-12-09 09:23:12 -08:00
Miles Malerba
ebc5c2b083 feat(forms): redo the signal forms metadata API
This PR makes a number of changes to the metadata API to address design
flaws in the previous API. Some of the changes include:

- Replaces the previous `MetadataKey` and `AggregateMetadataKey` with a
  single unified `MetadataKey` that is used for all metadata.
- The new `MetadataKey` is only defined for fields that explicitly set
  it in their schema logic
- All metadata now has reducer / aggregate behavior
- The new `MetadataKey` has an option to create a managed key which
  wraps the result of its computed aggregate into some other structure
  such as a `Resource` or `linkedSignal`
- There are now two APIs to create metadata keys
  - `createMetadataKey` for pure computed metadata
  - `createManagedMetadataKey` for metadata that manages its computation
    internally
2025-12-09 09:21:41 -08:00
Joey Perrott
349133374f build: update repository to use node 22.21.1 in bazel
The repository was updated to use node 22.21.1 via nvm, but bazel had not been updated to match
2025-12-09 09:19:13 -08:00
Shuaib Hasan Akib
4b9fffaa79 docs(docs-infra): hide trailing empty line in code examples
Add CSS rule to hide the last empty line in code blocks to prevent displaying
unnecessary empty lines when source files end with a newline character.
The empty line remains in the DOM for proper copy-paste functionality.
2025-12-09 09:17:41 -08:00
Gouvernathor
5607f513a7 docs(common): Explain how ::ng-deep works
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2025-12-09 09:16:45 -08:00
cexbrayat
9fe9566581 fix(forms): add signals for dirty, hidden, and pending states in custom controls
FormUiControl states that hidden, pending and dirty will be bind in custom controls, but this is currently not the case.

Fixes #65575
2025-12-08 10:30:43 -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
Miles Malerba
efde94a525 refactor: followup cleanup for #65758 fallout
Fixes some issues left behind by recent refactor
2025-12-08 10:27:59 -08:00
mahmoudaboueleneen
bad758d4ea docs: fix typo in 'components' word in host elements guide 2025-12-08 10:24:05 -08:00
Shuaib Hasan Akib
5fd75410a9 refactor(core): use proper type for stringifyTypeFromDebugify parameter
Replace the 'any' type with ClassDebugInfo for the debugInfo parameter in
stringifyTypeFromDebugInfo function. This removes the TODO comment that was
tracking the need for proper typing without creating circular dependencies.

The change improves type safety while avoiding circular imports since
stringify_utils.ts doesn't export anything that definition.ts imports.
2025-12-08 10:23:16 -08:00
Joey Perrott
aa92f19307 build: update to bazel version 8.4.2
Update bazel to use version 8.4.2
2025-12-08 10:21:59 -08:00
Alan Agius
22eda59a31 build: ignore adev generated content JSON files in Prettier
These files are auto generated.
2025-12-08 10:20:29 -08:00
Matthieu Riegler
9d1d742f1b build: enable angular formatting on all html files
This should also be safe on any html file that isn't an angular template
2025-12-08 10:19:45 -08:00
Alessio Pelliccione
253dc95d63 feat(docs-infra): add complexity level badge
Introduces the new complexity badge in recommendation cards.
The implementation utilizes CSS variables and `color-mix` to efficiently
handle color themes (Basic, Medium, Advanced) and dark mode support.

Closes #65378
2025-12-08 10:05:45 -08:00
Angular Robot
dd47c57635 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-08 09:37:30 -08:00
SkyZeroZx
70e024ea80 docs: add attribute binding reference in accessibility guide 2025-12-08 09:24:25 -08:00
Shuaib Hasan Akib
c9cba99407 docs: add missing page title to update guide
Fixes the missing page title so the update guide displays a proper heading.
2025-12-08 09:23:23 -08:00
SkyZeroZx
ccf31349c5 docs: Updates tutorial syntaxis highlight 2025-12-08 09:21:44 -08:00
hawkgs
0c4a5c599d fix(devtools): prod app detected screen
Do not call `getSupportedApis` in a prod app since it throws an error due to the absence of `ng`, which prevents the FE from getting the `ngAvailability` message and, respectively, the proper info screen that DevTools cannot be used on a prod app.
2025-12-08 09:21:16 -08:00
Angular Robot
7efc6f0086 build: update all non-major dependencies
See associated pull request for more information.
2025-12-08 09:20:18 -08:00
Angular Robot
aecd166bec build: update dependency cldr to v8
See associated pull request for more information.
2025-12-08 09:18:46 -08:00
Alan Agius
5a38aed388 build: move NG_FORCE_TTY environment variable
This moved the `NG_FORCE_TTY` from individual `ng_web_app` rules to a global Bazel build flag as this is also needed for integration tests that under the hood run `ng serve` .
2025-12-08 09:12:39 -08:00
SkyZeroZx
6f2ef918e3 docs: add documentation HOST_TAG_NAME 2025-12-08 09:08:50 -08:00
Jessica Janiuk
ce4ddf4b47 docs: Update contributing guidelines
This commit updates the CONTRIBUTING.md file to provide clearer
guidelines for new contributors, including sections on code style,
testing, and the pull request process.
2025-12-08 09:06:25 -08:00
Miles Malerba
cda56db20f
test: fix broken adev tests
Fixes a broken adev tests and enables another one that seems to work
fine now
2025-12-08 09:04:50 -08:00
SkyZeroZx
7e1e396a00 docs: add documentation for HTTP_TRANSFER_CACHE_ORIGIN_MAP 2025-12-08 09:00:08 -08:00
jnizet
28017c1c1a docs: add browser-mode option description to Vitest migration guide 2025-12-08 08:50:27 -08:00
SkyZeroZx
a4563044ad docs(docs-infra): fix hideCopy option to code snippets
Adds the ability to hide the copy button on code snippets.

Updates documentation to use the new `hideCopy` option with the new
markdown code fence syntax.
2025-12-08 08:48:20 -08:00
Shuaib Hasan Akib
45aa63308e docs: fix lazy loading documentation reference
Updates broken or outdated references in the lazy loading guide.

Fixes: #65906
2025-12-08 08:47:40 -08:00
Alan Agius
d2ac93d5ca build: format manifest files after updating its version
This commit run the formatter during the release.
2025-12-08 08:43:55 -08:00
Alan Agius
52aac81829 refactor: move Prettier ignore rules from ng-dev config to .prettierignore
This moves all prettier ignore rules to the prettier config
2025-12-08 08:43:06 -08:00
Matthieu Riegler
13bc1bc721 docs(docs-infra): fix next version dropdown
fixes #65912
2025-12-08 08:42:19 -08:00
Matthieu Riegler
81cf319534 docs(docs-infra): expose VERSION from @angular/upgrade
The missing src was responsible for not exposing the symbols during the doc extraction.

fixes #65916
2025-12-08 08:41:35 -08:00
Joey Perrott
aba8fbe5cd
build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-08 08:40:42 -08:00
kirjs
789f91bd4f feat(docs-infra): forward preview error locations
Intercept the WebContainer preview overlay open-in-editor requests and relay them to the editor via postMessage so errors open the matching file.
2025-12-04 11:45:51 -08:00
kirjs
21b995f4b7 feat(docs-infra): allow navigating to editor error locations
This shows up in a little pop-up, and is clickable now, and leads to exact line
2025-12-04 11:45:51 -08:00
Georgi Serev
87e05e935c
refactor(devtools): create a reusable component for all prop mat-trees
Create a reusable component for object property inspection.
2025-12-04 11:44:00 -08:00
diegoinost02
e311f3df72 docs: clarify linkedSignal update behavior
Updates the linkedSignal documentation to specify that it updates its value when the source changes or when any signal referenced in the computation changes, ensuring the description accurately reflects its behavior.
2025-12-04 11:42:46 -08:00
Shuaib Hasan Akib
abcd6b5bfb docs: update rxResource changes in updated page
Add both `request` and `loader` changes in rxResource section
2025-12-04 11:41:36 -08:00
SkyZeroZx
3adb091c1a docs: update zone pollution guide highlight syntax 2025-12-04 11:40:01 -08:00