Commit graph

32123 commits

Author SHA1 Message Date
Kristiyan Kostadinov
9e847fc60d fix(compiler): handle tracking expressions requiring temporary variables (#58520)
Currently when we generate the tracking expression for a `@for` block, we process its expression in the context of the creation block. This is incorrect, because the expression may require ops of its own for cases like nullish coalescing or safe reads. The result is that while we do generate the correct variable, they're added to the creation block rather than the tracking function which causes an error at runtime.

These changes address the issue by keeping track of a separate set of ops for the `track` expression that are prepended to the generated function, similarly to how we handle event listeners.

Fixes #56256.

PR Close #58520
2025-02-12 09:56:08 -08:00
Angular Robot
6f315fe501 build: update io_bazel_rules_sass digest to d829b6a (#59862)
See associated pull request for more information.

PR Close #59862
2025-02-12 09:47:52 -08:00
Bobokhuja
b2f1d4eb9e docs: fix tabs in example code in creating injectable services (#59911)
PR Close #59911
2025-02-12 09:46:51 -08:00
Kristiyan Kostadinov
aa285c548c fix(migrations): account for let declarations in control flow migration (#59861)
Fixes that the control flow migration wasn't accounting for `@let` when determining which symbols are used.

PR Close #59861
2025-02-12 09:45:14 -08:00
Kristiyan Kostadinov
1119f85ca9 fix(migrations): count used dependencies inside existing control flow (#59861)
Fixes that the control flow migration wasn't checking the content of pre-existing control flow nodes for dependencies.

Fixes #59846.

PR Close #59861
2025-02-12 09:45:14 -08:00
Angular Robot
c69125009c build: update dependency saucelabs to v9 (#59801)
See associated pull request for more information.

PR Close #59801
2025-02-12 09:39:28 -08:00
AleksanderBodurri
28dd04a866 fix(devtools): regressions in component tree (#59873)
This commit solves two cases

Bug: When a directive of the same name is selected, the property view tab would not update properly. This was caused by a signals refactor that changed the behaviour of a string input property to not re-render because the underlying signal did not change (string equality). This is fixed by converting this input into an object.

Bug: When a selected element is removed from the component tree, DevTools would not rerender the component tree properly and deselect that component. Now if DevTools detects that a component is removed, it re-renders the tree and deselects the component.

PR Close #59873
2025-02-12 09:22:28 -08:00
Matthieu Riegler
0d88463a66 docs(docs-infra): inline example in description (#59908)
fixes #59905

PR Close #59908
2025-02-12 09:21:49 -08:00
Hendra Arfiansyah
4a5c3df824 docs: remove trailing parentheses in example code in linked signal (#59917)
PR Close #59917
2025-02-12 09:20:31 -08:00
Angular Robot
8cdb7b8e85 docs: update Angular CLI help [main] (#59925)
Updated Angular CLI help contents.

PR Close #59925
2025-02-12 09:19:37 -08:00
Kristiyan Kostadinov
5cd26a9420 fix(compiler-cli): handle deferred blocks with shared dependencies correctly (#59926)
When the compiler analyzes the defer blocks in a component, it generates two sets of dependencies: ones specific for each block and others from all the deferred blocks within the component. The logic that combines all the defer block dependencies wasn't de-duplicating them which resulted in us producing `setClassMetadataAsync` calls where the callback can have multiple parameters with the same name. This was a problem both in full and partial compilation, but the latter was more visible, because Babel throws an error in such cases.

These changes add some logic to de-duplicate the dependencies so that we produce valid code.

Fixes #59922.

PR Close #59926
2025-02-12 09:15:53 -08:00
Kristiyan Kostadinov
b0266bda4a fix(core): invalidate HMR component if replacement throws an error (#59854)
Integrates https://github.com/angular/angular-cli/pull/29510 which allows us to invalidate the data in the dev server for a component if a replacement threw an error.

PR Close #59854
2025-02-12 09:05:30 -08:00
Kristiyan Kostadinov
e47c1e5abe refactor(compiler): pass more information to HMR replacement function (#59854)
Adjusts the code we generate for HMR so that it passes in the HMR ID and `import.meta` to the `replaceMetadata` call. This is necessary so we can do better logging of errors.

PR Close #59854
2025-02-12 09:05:30 -08:00
Alex Rickabaugh
a7f20eb863 release: cut the v19.2.0-next.2 release 2025-02-06 12:50:20 -08:00
Alex Rickabaugh
7196725622 docs: release notes for the v19.1.5 release 2025-02-06 12:34:52 -08:00
Wadie
951155eb4c fix(docs-infra): reset sandbox runtime on template change (#59844)
Ensure the sandbox runtime is properly reset when the template changes to prevent any unexpected behavior during development.

PR Close #59844
2025-02-05 15:01:33 -08:00
Alex Rickabaugh
b592b1b051 fix(core): fix race condition in resource() (#59851)
The refactoring of `resource()` to use `linkedSignal()` introduced the
potential for a race condition where resources would get stuck and not update
in response to a request change. This occurred under a specific condition:

1. The request changes while the resource is still in loading state
2. The resource resolves the previous load before its `effect()` reacts to the
   request change.

In practice, the window for this race is small, because the request change in
(1) will schedule the effect in (2) immediately. However, it's easier to
trigger this sequencing in tests, especially when one resource depends on the
output of another.

To fix the race condition, the resource impl is refactored to track the request
in its state, and ignore resolved values or streams for stale requests. This
refactoring actually makes the resource code simpler and easier to follow as
well.

Fixes #59842

PR Close #59851
2025-02-05 15:01:02 -08:00
Andrew Scott
8ee91bceed build: remove self from unavailable list (#59858)
remove self from unavailable list

PR Close #59858
2025-02-05 12:18:57 -08:00
Jeevan Mahesha
4d2684d9a3 docs: Add v18 Angular version link to versions configuration (#58933)
PR Close #58933
2025-02-05 09:02:02 -08:00
muhammadali1658
a592fbc8cd docs: fix broken link of FID (#59848)
PR Close #59848
2025-02-05 09:01:31 -08:00
Miles Malerba
a299e02e91 fix(core): preserve tracing snapshot until tick finishes (#59796)
This change waits until the end of `tick` to clear the tracing snapshot.
This ensures that if we notify the scheduler during `tick` the correct
tracing snapshot is used.

PR Close #59796
2025-02-05 09:00:49 -08:00
hyperlife1119
5191a41a18 docs(service-worker): corrected default values ​​for navigation URLs (#58156)
The default value described in the documentation is inconsistent with the actual default value.

PR Close #58156
2025-02-05 09:00:23 -08:00
Jeremias Peier
fa0c3e3210 feat(forms): support type set in form validators (#45793)
Previously, using `Validators.required`, `Validators.minLength` and `Validators.maxLength` validators don't work with sets because a set has the `size` property instead of the `length` property. This change enables the validators to be working with sets.

PR Close #45793
2025-02-05 08:59:55 -08:00
Pawel Kozlowski
41b1a7c582 refactor(core): minor code cleanups (#59843)
Some minor code cleanups after code changes in
previous commits.

PR Close #59843
2025-02-05 08:56:28 -08:00
Pawel Kozlowski
d8fca6d3df refactor(core): reuse element end first creation pass (#59843)
Reuse element end first creation pass in ComponentRef impl.

PR Close #59843
2025-02-05 08:56:28 -08:00
Pawel Kozlowski
5e0dcf1f53 refactor(core): reuse element first create pass in ComponentRef (#59843)
Reuse element first create pass in ComponentRef.

PR Close #59843
2025-02-05 08:56:28 -08:00
Pawel Kozlowski
e3dcf523ea refactor(core): move directive matching logic to a separate file (#59843)
Move directive matching logic to a separate file.

PR Close #59843
2025-02-05 08:56:27 -08:00
Kristiyan Kostadinov
146ab9a76e feat(core): support TypeScript 5.8 (#59830)
Updates the repo to support TypeScript 5.8 which is currently in beta.

PR Close #59830
2025-02-03 14:00:41 -08:00
Angular Robot
5e9e9bde0d build: update dependency angular-split to v19 (#59827)
See associated pull request for more information.

PR Close #59827
2025-02-03 14:00:11 -08:00
Ole Martin Sørli
3769935df7 docs(migrations): fix misspelled link text in overview.md (#59816)
I assume that the link text should read "Try it now" instead of "Try it not". The latter is funnier, but also implies that this migration is not a recommended one.
PR Close #59816
2025-02-03 13:59:16 -08:00
Kristiyan Kostadinov
a97136052f fix(compiler-cli): gracefully fall back if const enum cannot be passed through (#59815)
Adds some logic so that if we can't produce a runtime representation of an enum, the dev server can fall back to refreshing the page.

PR Close #59815
2025-02-03 13:58:31 -08:00
Kristiyan Kostadinov
bae94b82fd fix(compiler-cli): handle const enums used inside HMR data (#59815)
When we generate an HMR replacement function, we determine which locals from the file are used and we pass them by reference. This works fine in most cases, but breaks down for const enums which don't have a runtime representation.

These changes work around the issue by passing in all the values as an object literal.

Fixes #59800.

PR Close #59815
2025-02-03 13:58:31 -08:00
Kristiyan Kostadinov
03bcd30e34 fix(compiler-cli): handle enum members without initializers in partial evaluator (#59815)
Fixes that the partial evaluator was interpreting initializer-less enum members as undefined. In this case the value is the same as the index.

PR Close #59815
2025-02-03 13:58:31 -08:00
arturovt
a88b00c9e3 refactor(platform-browser): remove redundant DomEventsPlugin dependencies (#59811)
The `DomEventsPlugin` only injects the `DOCUMENT`; the platform ID and `NgZone` are redundant.

PR Close #59811
2025-02-03 13:57:45 -08:00
Pawel Kozlowski
2d53bacec3 refactor(core): reuse existing logic in ComponentRef impl (#59806)
This change removes some code and logic duplication by
re-using the existing functionality. It also pulls some
code into separate methods for clarity.

PR Close #59806
2025-02-03 13:57:10 -08:00
Luan Gong
4684e67fd0 docs: Fix wording for Angular CLI end-to-end testing (#59808)
PR Close #59808
2025-02-03 13:56:39 -08:00
Andrew Scott
ad88304233 refactor(core): move callAndReportToErrorHandler to bootstrap file (#59793)
This function is only used in the bootstrap file and does not need to be in application_ref

PR Close #59793
2025-02-03 13:54:40 -08:00
Angular Robot
f9ff989b59 build: update github/codeql-action action to v3.28.8 (#59786)
See associated pull request for more information.

PR Close #59786
2025-02-03 13:54:01 -08:00
Gerard Esteve
e725c4774c docs: add clarification for sourceLocale location in angular.json (#59783)
PR Close #59783
2025-02-03 13:53:35 -08:00
Alan Agius
5762cdd7fd docs: replace provideServerRoutesConfig with provideServerRouting (#59777)
The `provideServerRoutesConfig` is replaced with `provideServerRouting`

PR Close #59777
2025-02-03 13:53:04 -08:00
arturovt
f8eae13dde refactor(docs-infra): allow home animation to be cleaned up properly (#59732)
In this commit, we wrap `initCanvas` in an observable to prevent executing any code, such as `getViews()`, if the view is destroyed before the canvas becomes ready.

PR Close #59732
2025-02-03 13:52:17 -08:00
arturovt
30ff7e3f1a refactor(docs-infra): extract NodeRuntimeSandbox lazy-loading into separate function (#59344)
In this commit, we extract `NodeRuntimeSandbox` lazy-loading into a separate function (because it's duplicated).

PR Close #59344
2025-02-03 13:51:51 -08:00
BreadInvasion
5a6daa6cd3 docs: use inject() in dependency injection guide (#59079)
PR Close #59079
2025-02-03 13:51:23 -08:00
Sam Knutson
042ee75d1b docs: fix spelling of "set up" (#58362)
Fix spelling of the word "set up" in docs. "Setup" (one word) is a noun
whereas "set up" (two words) is a verb.

Fixes #58361

PR Close #58362
2025-02-03 13:50:49 -08:00
Alex Rickabaugh
9723f034c3 release: cut the v19.2.0-next.1 release 2025-01-29 15:17:55 -08:00
Alex Rickabaugh
eb9dca3120 docs: release notes for the v19.1.4 release 2025-01-29 15:11:55 -08:00
Dmitry Ivanitskiy
b5f9018148 docs: fix programmatic-rendering example (#59768)
Fixes example of programmatically rendering of components using dynamic import, as calling dynamic import returns module namespace object rather than component instance

PR Close #59768
2025-01-29 10:54:10 -08:00
Doug Parker
c03f45ce8e docs: updates versioning docs to recommend that fixes in an RC period be released as a -next release prior to hitting stable (#59766)
PR Close #59766
2025-01-29 10:52:44 -08:00
Kristiyan Kostadinov
ea2ea5e65b test(core): update tests that were relying on implicit animations module (#59762)
We had some tests that were relying on the fact that the server module was importing animations implicitly.

PR Close #59762
2025-01-29 10:52:18 -08:00
Kristiyan Kostadinov
fc5d187da5 fix(platform-server): decouple server from animations module (#59762)
Removes the hard dependency between `platform-server` and `platform-browser/animations` since now the animations module will disable itself automatically.

PR Close #59762
2025-01-29 10:52:18 -08:00