32130 Commits

Author SHA1 Message Date
Jessica Janiuk 5a66f6072d release: cut the v19.1.7 release 19.1.7 2025-02-19 13:43:00 -05:00
Matthieu Riegler 164facb6ba docs(docs-infra): disable CodeEditor tests (#60015)
The test are only broken on `19.1.x` but not on main. We'll disable them on this branch to allow the CI to go back to green.

PR Close #60015
2025-02-19 17:01:27 +00:00
arturovt e16394a1c9 refactor(common): inline supports check in slice pipe (#59684)
The refactored version improves the original code by removing the `supports` method from the prototype and inlining the logic directly into the `transform` method. This reduces indirection and simplifies the class, especially since `supports` is not reused elsewhere. ESBuild can directly inline the condition into the `if` statement by removing the variable: `if (!("string" == typeof e || Array.isArray(e))) throw i(s, e);`.

PR Close #59684
2025-02-19 15:22:49 +00:00
arturovt b323e2db2b refactor(forms): remove _checkFormPresent and move directly to ngOnChanges (#59741)
In this commit, we remove `_checkFormPresent` because it is a no-op in production. We move its body directly into `ngOnChanges` to eliminate the redundant method from the prototype. Previously, `_checkFormPresent` was being called with no body in production each time `ngOnChanges` was executed.

PR Close #59741
2025-02-19 15:22:13 +00:00
arturovt 354b1fa22f refactor(core): improve stringify (#59745)
In this commit, we improve branching in the `stringify` function, which is widely used by the framework, and add additional comments for clarification. Benchmark results of the old and new implementations (using `slice` makes it slightly faster) are as follows:
```
stringify (old version) x 117,945,419 ops/sec ±5.25% (55 runs sampled)
stringify (new version) x 136,692,820 ops/sec ±4.82% (56 runs sampled)
```

PR Close #59745
2025-02-19 15:21:37 +00:00
arturovt 236a623294 refactor(common): simplify stripTrailingSlash (#59746)
The new version of the function is smaller, eliminating extra bytes. The refactor improves both code size and readability while optimizing the implementation. Benchmark results for the old and new implementations are as follows:

```
stripTrailingSlash_old x 15,446,602 ops/sec ±0.89% (66 runs sampled)
stripTrailingSlash_new x 19,694,523 ops/sec ±1.10% (61 runs sampled)
```

Thus, the new implementation is both smaller and faster.

PR Close #59746
2025-02-19 15:20:53 +00:00
Vlad Boisa 066c52e0a3 docs: add serve section to Service-worker (#59972)
Add the section which mention way to enable service-worker during local development

Fixes #59949

PR Close #59972
2025-02-19 15:19:19 +00:00
Matthieu Riegler 538895b5f5 docs(docs-infra): remove unused examples (#59252)
PR Close #59252
2025-02-19 15:18:47 +00:00
Miles Malerba 265739544e ci: add mmalerba to pullapprove (#60005)
Add mmalerba to pullapprove config

PR Close #60005
2025-02-19 15:18:08 +00:00
Angular Robot 4ec0e66cc1 build: update actions/cache digest to 0c907a7 (#60002)
See associated pull request for more information.

PR Close #60002
2025-02-18 20:23:09 +00:00
Matthieu Riegler ec1e4c3d94 fix(forms): Fix typing on FormRecord. (#59993)
Priori to this change, `ɵRawValue` of a `FormRecord` returned a `Partial`. This commit fixes it.

fixes #59985

PR Close #59993
2025-02-18 19:28:36 +00:00
Kristiyan Kostadinov da1426b3fe refactor(core): simplify serialization of inputs and outputs (#59980)
Simplifies the functions that serialize inputs/outputs for the `ComponentFactory` type.

PR Close #59980
2025-02-18 19:28:01 +00:00
Kristiyan Kostadinov a29c2e0f25 build: update bundle goldens (#59980)
Updates the bundle goldens to account for the latest changes.

PR Close #59980
2025-02-18 19:28:01 +00:00
Kristiyan Kostadinov fa260a9862 refactor(core): add assertion to avoid writes to directive factories (#59980)
Attempting to write to directive inputs before the directive is created can lead to subtle issues that won't necessarily trigger errors. These changes add an assertion to catch such issues earlier.

PR Close #59980
2025-02-18 19:28:01 +00:00
Kristiyan Kostadinov a1b45799eb refactor(core): avoid unnecessary lookup when writing inputs (#59980)
Currently we resolve the DOM node when writing inputs up-front, because it's necessary for the `ng-reflect-` attributes. Since the attributes are dev-mode-only, we can move the resolution into the function that writes them so we can avoid the resolution when it's not used.

PR Close #59980
2025-02-18 19:28:01 +00:00
Kristiyan Kostadinov d359650273 refactor(core): simplify InitialInputs data structure (#59980)
Reworks the `InitialInputs` data structure to only store a public name and initial value, resulting in less memory usage and making it easier to work with.

PR Close #59980
2025-02-18 19:28:01 +00:00
Kristiyan Kostadinov e7834767f6 refactor(core): remove flags from TNode.inputs (#59980)
The input flags are already available on the definition so we don't need to store them on `TNode.inputs`.

PR Close #59980
2025-02-18 19:28:01 +00:00
Kristiyan Kostadinov 798752b423 refactor(compiler): remove input transforms feature (#59980)
An earlier refactor made the `InputTransformsFeature` a no-op so these changes remove the code that was generating it.

PR Close #59980
2025-02-18 19:28:01 +00:00
Kristiyan Kostadinov 951178233d refactor(core): remove inputTransforms from definition (#59980)
Removes the `inputTransform` from the directive definition since this information is already available on the `inputs`.

PR Close #59980
2025-02-18 19:28:01 +00:00
Kristiyan Kostadinov b8d1b070b2 refactor(core): simplify how inputs are stored in the directive definition (#59980)
Currently the values in `DirectiveDef.inputs` are either strings or arrays, depending if there are flags. This makes it a bit hard to work with, because each time it's read, the consumer needs to account for both cases.

These changes rework it so the values are always an arrays.

PR Close #59980
2025-02-18 19:28:00 +00:00
Pawel Kozlowski 6d8c2e2162 refactor(core): move LContainer manipulation logic to its own file (#59989)
All the view in a container logic is in the
packages/core/src/render3/view/container.ts file
plus some other associated refactorings.

PR Close #59989
2025-02-18 15:42:28 +00:00
arturovt e9f10eb4c9 fix(common): clean up urlChanges subscribers when root scope is destroyed (#59703)
In this commit, the `urlChanges` subject is completed to release all active observers when the root scope is destroyed. Previously, subscribing to the `urlChanges` subject caused the subscriber to capture `this`, resulting in a memory leak after the root scope was destroyed.

PR Close #59703
2025-02-18 15:40:20 +00:00
hawkgs 26c64a8554 docs(docs-infra): fix card highlighting in the API reference details page (#59965)
Drop `pointer-events: none` and update the member card highlighting mechanism.

PR Close #59965
2025-02-18 14:56:49 +00:00
Matthieu Riegler 28551a82b4 docs(docs-infra): attemp to fix flaky mermaid test (#59994)
This test has 2 async parts, loading the markdown file and the marked parsing.
First attempt to fix the flakiness is by inline the markdown file.

If this test timeouts again in the future it means the timeout is related to marked itself (and the dynamic import of mermaid).

PR Close #59994
2025-02-18 14:55:50 +00:00
Doug Parker 8d40876900 docs: update zip command and link to recent DevTools commits (#59792)
`-x dist/` never worked for reasons I don't really understand. Historically I've just deleted `dist/` before zipping. I tried a few different approaches, but all of them lead to some form of "Name not matched" error in `zip` of the `dist/` directory. Instead I just opted to delete `dist/` as part of the zipping command.

The link to recent DevTools commits seems good enough to manually write a changelog. All relevant commits should be using `refactor(devtools)`, so the string "devtools" should definitely be in there.

PR Close #59792
2025-02-14 19:32:00 +00:00
Andrew Scott d46dd77742 refactor(benchpress): move initializer to constructor (#59960)
Move the initializer into the constructor for instance members that reference identifiers declared in the constructor.

When TypeScript outputs modern language features, the below case throws an TS error.

PR Close #59960
2025-02-14 18:39:58 +00:00
Angular Robot 387eb043a7 build: update all non-major dependencies (#59641)
See associated pull request for more information.

PR Close #59641
2025-02-14 18:39:10 +00:00
Angular Robot e141893836 build: update dependency jsdom to v26 (#59958)
See associated pull request for more information.

PR Close #59958
2025-02-14 18:01:26 +00:00
Alan Agius 82eba1d44b ci: update nvm node.js verson to 18.20.5 (#59957)
This is needed due to some deps.

PR Close #59957
2025-02-14 17:24:55 +00:00
Angular Robot 37d4fa883b build: update io_bazel_rules_sass digest to c01e884 (#59948)
See associated pull request for more information.

PR Close #59948
2025-02-14 16:34:24 +00:00
Doug Parker f76adcc33c release: bump Angular DevTools version to 1.0.23 (#59931)
PR Close #59931
2025-02-14 16:31:37 +00:00
Alan Agius 6b2685de65 build: update bazel node.js version to 18.20.5 (#59943)
This is needed as selenium-webdriver requires at least this version.

PR Close #59943
2025-02-14 16:31:05 +00:00
Jessica Janiuk 1b4fc8e20b ci: fix flakey incremental hydration test (#59945)
This extends the test timeout for the two timer tests while shortening the actual hydrate on timer. This hopefully should result in more reliable CI.

PR Close #59945
2025-02-13 22:35:04 +00:00
iteriani 3fd69d7ab4 refactor(core): Check in some interfaces for the DI package (#59921)
This will be the starting point of the DI package. We will first check in some interfaces and then make sure the existing DI package implements that interface. Afterwards, we'll slowly start moving injector implementation.

PR Close #59921
2025-02-13 20:19:29 +00:00
Jessica Janiuk 419e67faf4 build: update zone.js pullapprove rule (#59942)
This fixes the broken pullapprove config due to a missing array.

PR Close #59942
2025-02-13 20:16:50 +00:00
Jessica Janiuk defe672084 build: update zone.js pullapprove rule (#59941)
This excludes lock and package files from requiring zones approval.

PR Close #59941
2025-02-13 19:17:14 +00:00
JoostK 16fc074689 fix(compiler-cli): avoid crash in isolated transform operations (#59869)
The CLI uses the `ts.transform` API to apply the Angular compiler's transformers
on the source files when `isolatedModules` is true (and various other constraints)
instead of going through a full `ts.Program.emit` operation. This results in the
transformers to operate in an environment where no emit resolver is available, which
was not previously accounted for. This commit reflects the possibility for the emit
resolver to be missing and handles this scenario accordingly.

Fixes #59837

PR Close #59869
2025-02-13 16:39:05 +00:00
arturovt 04851c748b refactor(common): remove redundant transferCacheInterceptorFn dependencies (#59819)
The `transferCacheInterceptorFn` injects dependencies in itself; the `TransferCache` and cache options are redundant in the `deps` list.

PR Close #59819
2025-02-13 15:11:19 +00:00
arturovt 6d1ebc52a2 refactor(core): simplify concatStringsWithSpace (#59820)
The new version of the function is smaller, eliminating extra bytes. The refactor improves both code size and readability while optimizing the implementation. Benchmark results for the old and new implementations are as follows:

```
concatStringsWithSpace_old x 149,225,311 ops/sec ±8.54% (50 runs sampled)
concatStringsWithSpace_new x 160,206,834 ops/sec ±5.72% (54 runs sampled)
```

Thus, the new implementation is both smaller and faster.

PR Close #59820
2025-02-13 15:10:43 +00:00
Doug Parker adbf013cea docs: link to Tailwind docs about Angular CLI integration (#59765)
We should probably have our own authoritative documentation here, but Tailwind's doc is pretty decent, so this is a good starting point.

PR Close #59765
2025-02-13 15:00:56 +00:00
rysavy-dudrtools 0131c703ab docs(localize): added link to add-package.md (#59937)
PR Close #59937
2025-02-13 14:59:37 +00:00
hawkgs f01d827a05 docs(docs-infra): drop tabs layout from the API reference details page (#59068)
Drop the tabs in favor of a single page separated by sections.

PR Close #59068
2025-02-13 14:58:33 +00:00
Angular Robot df03cfd731 build: update github/codeql-action action to v3.28.9 (#59914)
See associated pull request for more information.

PR Close #59914
2025-02-13 14:56:39 +00:00
Doug Parker 22c2dfa756 release: bump Angular DevTools version to 1.0.22 (#59791)
PR Close #59791
2025-02-13 14:50:39 +00:00
Andrew Scott 20df2cd108 release: cut the v19.1.6 release 19.1.6 2025-02-12 12:02:25 -08:00
Kristiyan Kostadinov 01f669a274 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:09 -08:00
Angular Robot b41a263508 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:53 -08:00
Bobokhuja bc6e11160e docs: fix tabs in example code in creating injectable services (#59911)
PR Close #59911
2025-02-12 09:46:52 -08:00
Kristiyan Kostadinov 710759ddcc 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:15 -08:00
Kristiyan Kostadinov 46f36a58bf 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:15 -08:00