30286 Commits

Author SHA1 Message Date
Jessica Janiuk c71d687db4 release: cut the v18.0.2 release 18.0.2 2024-06-05 12:56:00 -07:00
Dylan Hunn 8c9b7110c3 docs(zone.js): update release guide for zone.js (#55846)
Update the releasing guide for zone.js, because one of the release commands was outdated.
PR Close #55846
2024-06-05 19:33:28 +00:00
Kristiyan Kostadinov e2b99806ac refactor(language-service): integrate let declarations (#56270)
Integrates let declarations in the various places within the language service (quick info, completions etc).

PR Close #56270
2024-06-05 18:45:23 +00:00
Angular Robot 014fac8ec4 build: update dependency @rollup/plugin-commonjs to v26 (#56281)
See associated pull request for more information.

PR Close #56281
2024-06-05 18:36:51 +00:00
Thomas Nguyen dbf1d9361e refactor(core): Refactor parts of event_replay into a shared library that will be used with global event delegation. (#56172)
This also moves the code that stashes the jsaction more closely to the code that actually sets the event listener.

PR Close #56172
2024-06-05 16:35:23 +00:00
marktechson f205fe384e docs: remove v18 developer event banner (#56278)
PR Close #56278
2024-06-05 15:56:29 +00:00
Tom Wilkinson 33a6686806 refactor(core): Add and move tests for Dispatcher. (#56193)
Move tests from `eventcontract_test.ts` to `dispatcher_test.ts` for
functionality that lives in `Dispatcher`.

Add an extra test for `preventDefault` behavior for `CLICKMOD` that
covers a previous bug case.

PR Close #56193
2024-06-04 18:05:39 +00:00
arturovt b283c0c6ac fix(zone.js): store remove abort listener on the scheduled task (#56160)
Prior to this commit, a memory leak occurred when the `abort` listener was
not removed from the `AbortSignal`. We introduced a fix to remove the event
listener, but it was erroneously stored on the `taskData`, which is a shared
global object. Consequently, when something attempted to remove an event listener,
it immediately removed the last stored abort listener. As a result, events would
never be canceled.

We have now rectified this by storing the remove abort listener function directly on
the task itself. This adjustment ensures that the abort listener is tied only to the
specific task. When the `abort` function is called, it cancels the task. Therefore, it
is safe to associate the cleanup function directly with the task.

Closes: #56148

PR Close #56160
2024-06-04 17:29:05 +00:00
Kristiyan Kostadinov 647f2a886d refactor(compiler-cli): add diagnostic for duplicate let declarations (#56199)
Adds a template diagnostic that will flag cases where multiple `@let` declarations use the same name.

PR Close #56199
2024-06-04 17:28:04 +00:00
Kristiyan Kostadinov b70a286f27 refactor(compiler-cli): account for let declarations in two-way binding check (#56199)
Updates the check that prevent writes to template variables in two-way bindings to account for let declarations.

Also fixes some old tests that weren't properly setting up two-way bindings.

PR Close #56199
2024-06-04 17:28:04 +00:00
Kristiyan Kostadinov 35e9257226 refactor(compiler-cli): support completions for let declarations (#56199)
Adds support for let declarations inside the `CompletionEngine`.

PR Close #56199
2024-06-04 17:28:04 +00:00
Kristiyan Kostadinov ab529c6ded refactor(compiler-cli): support resolving the symbol of let declaration (#56199)
Updates the symbol builder to handle resolving the symbol of a let declaration.

PR Close #56199
2024-06-04 17:28:04 +00:00
Kristiyan Kostadinov 28e76d7c91 refactor(compiler-cli): integrate let declaration into the indexer (#56199)
Adds support for let declarations in the template indexer.

PR Close #56199
2024-06-04 17:28:04 +00:00
Kristiyan Kostadinov 7ef0dab427 refactor(compiler-cli): integrate let declarations into the template type checker (#56199)
Integrates let declarations into the template type checker by producing corresponding constants in the TCB.

This also includes a couple of custom diagnostics to flag usages of let before they're declared and illegal writes to let declarations. We can't rely on TS for these checks, because it includes the variable name in the diagnostic.

PR Close #56199
2024-06-04 17:28:04 +00:00
Kristiyan Kostadinov 4b00690cea refactor(compiler): integrate let declarations into the template binder (#56199)
Integrates the let declarations into the template binder which will be used to power the scoping behavior of the new syntax.

PR Close #56199
2024-06-04 17:28:03 +00:00
Kristiyan Kostadinov 405e4dda92 refactor(compiler-cli): add compiler flag for testing let declarations (#56199)
Adds a private `_enableLetSyntax` flag that allows for let declarations to be enabled in tests.

PR Close #56199
2024-06-04 17:28:03 +00:00
Paweł Kubiak c7ede8b2f5 fix(docs-infra): remove config release from test scripts (#56062)
fix(docs-infra): remove config release from test scripts

As we discussed in one of the previous PRs we should remove `--config=release` from test scripts on CI
fix(docs-infra): use DI to inject current VERSION.major

PR Close #56062
2024-06-04 17:27:27 +00:00
Angular Robot 9f5a17138e build: update io_bazel_rules_sass digest to 61dde52 (#56168)
See associated pull request for more information.

PR Close #56168
2024-06-04 16:34:20 +00:00
Angular Robot 609f6053c5 build: update cross-repo angular dependencies (#56260)
See associated pull request for more information.

PR Close #56260
2024-06-04 16:33:45 +00:00
Alvaro Junqueira f6475344a8 docs: fixing typo :ng-deep to ::ng-deep (#56251)
PR Close #56251
2024-06-04 16:14:50 +00:00
Pawel Kozlowski 629fee8418 refactor(docs-infra): mark adev-root component as OnPush (#56254)
After inspecting and testing the adev-root component is seems like
it could be marked as OnPush.
This change gets us closer to enabling zoneless for adev.

PR Close #56254
2024-06-04 13:52:38 +00:00
Pawel Kozlowski a107cc5006 refactor(docs-infra): mark code editors components as OnPush (#56254)
After inspecting and testing the embedded-editor and adev-code-editor
components it
seems like those could be marked as OnPush.
This change gets us closer to enabling zoneless for adev.

PR Close #56254
2024-06-04 13:52:38 +00:00
Pawel Kozlowski a73687016c refactor(docs-infra): mark the update component as OnPush (#56254)
After inspecting and testing the adev-update-guide component it
seems like it could be marked as OnPush. This change gets us closer
to enabling zoneless for adev.

PR Close #56254
2024-06-04 13:52:38 +00:00
Sasidharan SD ab38861e9a docs: fix docs links (#56234)
PR Close #56234
2024-06-04 13:52:04 +00:00
Matthieu Riegler 33b0d25bfd refactor(core): Use Nullish coalescing assignment for view getters. (#56242)
Micro optim, this wasn't minified by the optimizer.

PR Close #56242
2024-06-03 20:10:35 +00:00
Ben Hong a23850fa6f docs: fix vertical playground spacing issue (#55689)
PR Close #55689
2024-06-03 19:26:09 +00:00
Ben Hong 7b6d7764df docs: resolve extra padding on tutorial editor (#54828)
As of this commit, there is a visual discrepancy between the height of the content on the left compared to the separator and editors on the right. It appears that the cause of this is an additional computation of layout padding which is unnecessary for these particular elements.

PR Close #54828
2024-06-03 19:24:40 +00:00
Alan Agius a33d85dcb7 build: update Node.js to match Angular CLI engines (#56187)
The current supported Node.js engines by the Angular CLI are `^18.19.1 || ^20.11.1 || >=22.0.0`

PR Close #56187
2024-06-03 18:00:46 +00:00
Tomasz Ducin 988e51a2a0 refactor(devtools): update links to the new docs (angular.dev) (#56138)
This PR replaces all links available within the devtools to point
to the new docs.
The links to Input/Output (decorators) have been replaced with
their function (signal) counterparts: input, output.

PR Close #56138
2024-06-03 17:38:12 +00:00
Paweł c3f2c67fa0 refactor(core): remove doubled line (#56091)
remove doubled line of titlecase pipe in commonModulePipes array

PR Close #56091
2024-05-31 13:24:55 +00:00
Sasidharan SD 6abfe3b1a9 docs: fix alternate configuration link (#56201)
PR Close #56201
2024-05-31 13:24:15 +00:00
Angular Robot d95019d487 build: update scorecard action dependencies (#56119)
See associated pull request for more information.

PR Close #56119
2024-05-31 13:15:41 +00:00
Alan Agius c05d50cd6f docs: update file-structure doc (#56202)
Replace `/assets` with `public/`, this was replaced in version 18 of the Angular CLI.

PR Close #56202
2024-05-31 13:13:55 +00:00
Matthieu Riegler 64170f1021 docs: update version support (#56034)
fixes #56033

PR Close #56034
2024-05-31 13:13:01 +00:00
Tyler Tierney e849855f0b docs: edit sentence grammar in style-guide (#56173)
PR Close #56173
2024-05-31 13:12:29 +00:00
Andrew Scott 159c97ec69 refactor(core): provide zone token in prod as well (#56197)
This allows us to make decisions based on whether zone is provided for
when zoneless is the default.

PR Close #56197
2024-05-30 19:24:30 -07:00
Andrew Kushnir 290a47d842 fix(core): handle missing withI18nSupport() call for components that use i18n blocks (#56175)
This commit updates hydration serialization logic to handle a case when the `withI18nSupport()` call is not present for an application that has a component that uses i18n blocks. Note: the issue is only reproducible for components that also inject `ViewContainerRef`, since it triggers a special serialization code path.

Resolves #56074.

PR Close #56175
2024-05-30 18:36:58 +00:00
Jessica Janiuk 4cd546571d ci: update explicit required reviews for primitives (#56191)
This removes the explicit 1 review required for the primitives and primitives-shared groups so that PR creators can serve as their own approval for that group.

PR Close #56191
2024-05-30 18:34:58 +00:00
Tom Wilkinson 2a440e1064 fix(core): Fix shouldPreventDefaultBeforeDispatching bug (#56188)
When I copied this over in https://github.com/angular/angular/commit/caedd10597a6becfc1f1f0d98b06dc76d6b25a86
the parentheses moved around the A tag check and the CLICK type check,
instead of around the CLICK and CLICKMOD check.

PR Close #56188
2024-05-30 17:54:55 +00:00
Alex Rickabaugh 616cdef474 fix(core): don't coerce all producers to consumers on liveness change (#56140)
When a consumer switches its liveness state, it gets added to / removed from
the consumer list of all of its producers. This operation is transitive, so
if its producer is *also* a consumer and *its* liveness state is switched,
then the change is applied recursively.

Note that this only matters *if* the producer is also a consumer. However,
the logic in `producerAddLiveConsumer` / `producerRemoveLiveConsumerAtIndex`
coerced the producer node into a producer & consumer node, which allocated
extra arrays into the node structure that are never used. This didn't affect
correctness, but increased the memory usage of plain signal nodes (which are
just producers, never consumers).

This fix changes the logic in those operations to simply check if a producer
is also a consumer instead of coercing it into one.

PR Close #56140
2024-05-30 17:44:56 +00:00
Thomas Nguyen 7659dffa3f refactor(core): Remove lambda from error message. (#56161)
This should've been in the previous PR, but a bad rebase removed it.

PR Close #56161
2024-05-30 17:30:53 +00:00
Jessica Janiuk c144e507f1 ci: update primitives-shared membership (#56189)
This updates the shared primitives ownership list to be correct.

PR Close #56189
2024-05-30 17:28:25 +00:00
Matthieu Riegler a9075875c8 ci: Update Saucelabs config to use Andoid 13 and 14 (#55710)
This will allow us to run the test against versions closer to supported targets.

PR Close #55710
2024-05-30 16:43:25 +00:00
Thomas Nguyen 0e3e6d4336 refactor(core): Switch a .includes to a .indexOf(), as this is currently (#56046)
breaking internal tests that assert no usage of Array ES6 methods.

PR Close #56046
2024-05-30 15:30:52 +00:00
Andrew Kushnir 0c39a46a88 refactor(core): replace AIO link with ADEV one in hydration message (#56178)
This commit updates the content of hydration-related message and replaces AIO with ADEV domain.

PR Close #56178
2024-05-30 14:57:11 +00:00
Kristiyan Kostadinov 989a8e126e refactor(compiler): implement let declarations in render3 ast (#55848)
Introduces a new `LetDeclaration` into the Render3 AST, simiarly to the HTML AST, and adds an initial integration into the various visitors.

PR Close #55848
2024-05-30 14:55:37 +00:00
Kristiyan Kostadinov d44c8ee98c refactor(compiler): implement let declarations in html ast (#55848)
Adds a new `LetDeclaration` node to the AST that captures the `LetStart`, `LetValue` and `LetEnd` tokens into a single node.

PR Close #55848
2024-05-30 14:55:37 +00:00
Kristiyan Kostadinov 5ee235729c refactor(compiler): add support for tokenizing let declarations (#55848)
Updates the lexer to produce tokens for `let` declarations. Currently it' behind a flag while the feature is being worked on.

PR Close #55848
2024-05-30 14:55:37 +00:00
Matthieu Riegler 78cf9bfc0e fix(core): Do not migrate HttpClientModule imports on components. (#56067)
`provideHttpClient()` returns a `EnvironmentProvider` which is not compatible with component providers.

PR Close #56067
2024-05-30 14:55:06 +00:00
Kristiyan Kostadinov b70b80ba55 fix(migrations): do not generate aliased variables with the same name (#56154)
Adds some logic to avoid generating expressions like `let $index = $index` in the control flow migration.

Fixes #56152.

PR Close #56154
2024-05-30 14:54:36 +00:00