e9e5e25 | Doug Parker | 20 February 2024, 18:34:27 UTC | release: bump Angular DevTools version to 1.0.10 (#54523) PR Close #54523 | 21 February 2024, 23:23:36 UTC |
a9f563f | Kristiyan Kostadinov | 19 February 2024, 09:40:39 UTC | refactor(compiler-cli): move defer block tests into separate file (#54499) Splits the tests for `@defer` blocks out into a separate file since the `ngtsc_spec.ts` is getting quite large. PR Close #54499 | 21 February 2024, 23:22:36 UTC |
badda0c | Kristiyan Kostadinov | 19 February 2024, 09:39:59 UTC | fix(compiler-cli): correctly detect deferred dependencies across scoped nodes (#54499) This is based on an internal issue report. An earlier change introduced a diagnostic to report cases where a symbol is in the `deferredImports` array, but is used eagerly. The check worked by looking through the deferred blocks in a scope, resolving the scope for each and checking if the element is within the scope. The problem is that resolving the scope won't work across scoped node boundaries. For example, if there's a control flow statement around the block or within the block but around the deferred dependency, it won't be able to resolve the scope since it isn't a direct child, e.g. ``` @if (true) { @defer { <deferred-dep/> } } ``` To fix this the case where the deferred block is inside a scoped node, I've changed the `R3BoundTarget.deferBlocks` to be a `Map` holding both the deferred block and its corresponding scope. Then to resolve the case where the dependency is within a scoped node inside the deferred block, I've added a depth-first traversal through the scopes within the deferred block. PR Close #54499 | 21 February 2024, 23:22:36 UTC |
1d14e52 | Kristiyan Kostadinov | 17 February 2024, 11:18:53 UTC | refactor(compiler-cli): add the ability to treat object literals as enums in docs (#54487) We have a couple of cases now (#53753 and #54414) where we're forced to redefine enums as object literals. These literals aren't rendered in the best way in the docs so these changes introduce a new `object-literal-as-enum` tag that we can use to mark them so they're treated for documentation purposes. PR Close #54487 | 21 February 2024, 23:21:58 UTC |
5a13c18 | Dean Davidson | 16 February 2024, 18:58:27 UTC | docs: add closing tags to code examples (#54485) There were two minor issues in the code examples that this addresses. PR Close #54485 | 21 February 2024, 23:20:12 UTC |
2760399 | Lukas Matta | 16 February 2024, 00:38:27 UTC | docs: fix typos (#54475) PR Close #54475 | 21 February 2024, 23:19:39 UTC |
024c14f | vladboisa | 11 February 2024, 10:30:48 UTC | docs(docs-infra): fix tab shrinking (#54380) Fix a behavior when block shrinks on Usage notes tab Fixes #52818 PR Close #54380 | 21 February 2024, 23:19:13 UTC |
efdc50a | cexbrayat | 09 February 2024, 21:36:55 UTC | docs: view child static query differences formatting (#54370) The docs were broken as the first line is the only one to be displayed in the table. PR Close #54370 | 21 February 2024, 23:18:43 UTC |
dba3e0b | Dmitry Ivanitskiy | 14 December 2023, 00:24:15 UTC | fix(compiler): adding the inert property to the "SCHEMA" array (#53148) This change allows template binding "inert" attribute with the following syntax: [inert]="isInert" Fixes #51879 fixup! fix(compiler): adding the inert property to the "SCHEMA" array revert: "fixup! fix(compiler): adding the inert property to the "SCHEMA" array" This reverts commit b637b7ce646e8bab2f585339028a84018e8ea982. This commit is being reverted because the inert property is safe as a boolean attribute PR Close #53148 | 21 February 2024, 23:13:48 UTC |
23119c5 | Matthieu Riegler | 17 January 2024, 21:37:37 UTC | refactor(platform-browser): use performance API for async animations (#53963) This commit adds a standard performance marker PR Close #53963 | 21 February 2024, 23:12:04 UTC |
d3b273a | Andrew Scott | 05 February 2024, 16:46:58 UTC | fix(router): Clear internal transition when navigation finalizes (#54261) This commit fixes a small memory issue in the router where a destroyed component instance would be retained. fixes #54241 PR Close #54261 | 21 February 2024, 22:09:52 UTC |
e9246f7 | Joey Perrott | 21 February 2024, 15:45:22 UTC | refactor(docs-infra): correct location of hosted images (#54547) Properly include hosted images in the generated application PR Close #54547 | 21 February 2024, 16:52:01 UTC |
554628e | Matthieu Riegler | 20 February 2024, 21:17:26 UTC | docs(docs-infra): Add missing API entries to ADEV (#54530) * `localize`: `MessageId` & `MessageId` * `core/global` * `upgrade/static` : `downgradeComponent`, `downgradeInjectable`, `getAngularJSGlobal`, `getAngularLib`, `setAngularJSGlobal` & `setAngularLib` PR Close #54530 | 21 February 2024, 16:41:33 UTC |
d49558d | Matthieu Riegler | 19 February 2024, 23:03:45 UTC | docs: fix brokens links (#54507) PR Close #54507 | 21 February 2024, 16:05:30 UTC |
0644072 | Matthieu Riegler | 19 February 2024, 16:00:17 UTC | docs: fix links in ngModule API guide (#54507) fixes #54506 PR Close #54507 | 21 February 2024, 16:05:30 UTC |
7220c89 | Joey Perrott | 20 February 2024, 18:43:31 UTC | fix(docs-infra): enable font inlining for adev (#54524) Enable font inlining for adev PR Close #54524 | 21 February 2024, 16:02:00 UTC |
6501d9b | Joey Perrott | 20 February 2024, 20:06:16 UTC | build: update to the latest @angular/docs version (#54528) Update @angular/docs to latest PR Close #54528 | 21 February 2024, 16:00:35 UTC |
36afd89 | cexbrayat | 21 February 2024, 09:25:33 UTC | docs: typos in signal queries guide (#54540) PR Close #54540 | 21 February 2024, 15:59:00 UTC |
dd413eb | Matthieu Riegler | 20 February 2024, 16:28:59 UTC | docs(docs-infra): fix error page. (#54522) Display the not found page on 404. fixes #54506 PR Close #54522 | 21 February 2024, 15:58:01 UTC |
55fd7b3 | Matthieu Riegler | 20 February 2024, 13:35:42 UTC | docs(docs-infra): Add missing api entries (#54517) This commit adds `common/http/testing` and `platform-browser/animations/async`. PR Close #54517 | 20 February 2024, 17:50:36 UTC |
219445c | Kristiyan Kostadinov | 20 February 2024, 12:07:17 UTC | fix(common): image placeholder not removed in OnPush component (#54515) Fixes that the placeholder wasn't being removed when an optimized image is placed in an `OnPush` component. Fixes #54478. PR Close #54515 | 20 February 2024, 17:49:58 UTC |
69daa37 | Pawel Kozlowski | 19 February 2024, 17:02:57 UTC | test(core): more tests for queries as signals (#54508) A couple of tests that illustrate combination of signal and decorator queries in once component. PR Close #54508 | 20 February 2024, 17:49:19 UTC |
0c8744c | JoostK | 18 February 2024, 19:48:17 UTC | fix(compiler-cli): use correct symbol name for default imported symbols in defer blocks (#54495) This commit addresses a problem with PR #53695 that introduced support for default imports, where the actual dynamic import used in the defer loading function continued to use the symbol name, instead of `.default` for the dynamic import. This issue went unnoticed in the testcase because a proper instance was being generated for the `ɵsetClassMetadataAsync` function, but not the generated dependency loader function. Fixes #54491 PR Close #54495 | 20 February 2024, 17:45:32 UTC |
960fe15 | Jamie Couperwhite | 18 February 2024, 11:01:25 UTC | docs: fix developer preview link in signal queries (#54492) PR Close #54492 | 20 February 2024, 17:44:42 UTC |
a14d139 | Alex Castle | 15 February 2024, 19:03:43 UTC | docs(common): add new faq entry to NgOptimizedImage docs (#54469) add new FAQ entry explaining that we're not adding new loaders to the angular repo PR Close #54469 | 20 February 2024, 17:43:46 UTC |
a9741e6 | Andrew Scott | 15 February 2024, 19:29:51 UTC | docs(router): deprecate RouterTestingModule (#54466) Deprecate `RouterTestingModule` as it is no longer needed or useful and is not actively maintained. fixes #54461 PR Close #54466 | 20 February 2024, 17:33:16 UTC |
fcfef52 | Ahmed Hakeem | 15 February 2024, 18:58:07 UTC | docs: enhance Dependency injection description (#54464) PR Close #54464 | 20 February 2024, 17:29:53 UTC |
70345b1 | Matthieu Riegler | 18 February 2024, 17:51:15 UTC | docs: override piscina dependency for webcontainers projects in adev (#54494) PR Close #54494 | 20 February 2024, 17:21:04 UTC |
d9a1a7d | Pawel Kozlowski | 15 February 2024, 10:26:33 UTC | fix(core): properly execute content queries for root components (#54457) Prior to this fix an incorrect view instance (a dynamically created component one instead of the root view) was passed to the content query function. Having incorrect view instance meant that a component instance could not be found. This is a pre-existing bug, introduction of signal-based queries just surfaced it. Fixes #54450 PR Close #54457 | 15 February 2024, 20:21:29 UTC |
62be680 | Joey Perrott | 15 February 2024, 19:21:04 UTC | build: no longer include the unnecessary `--config=aio_local_deps` flag (#54465) With the correction of how local build linker interaction works the `aio_local_deps` flag is no longer needed. PR Close #54465 | 15 February 2024, 20:20:40 UTC |
ee9c272 | Pawel Kozlowski | 12 February 2024, 14:57:59 UTC | docs: add guide for signal queries (#54395) Adding new guide for the signal-based queries. PR Close #54395 | 15 February 2024, 20:17:01 UTC |
d181a36 | Fabio Heer | 12 February 2024, 08:33:35 UTC | docs: correct default application builder for new apps (#54386) The documentation on angular.dev mentions build-angular:browser as default application builder. This is not correct. Recent applications are setup with build-angular:application by default. PR Close #54386 | 15 February 2024, 18:54:17 UTC |
96e9dbe | Joey Perrott | 14 February 2024, 17:27:56 UTC | ci: automatically deploy to angular.dev on every push to the main branch (#54436) Automatically deploy adev on each commit to the main branch PR Close #54436 | 15 February 2024, 18:50:03 UTC |
03acdbe | Joey Perrott | 15 February 2024, 18:01:33 UTC | fix(docs-infra): process mermaid code blocks (#54462) Render mermaid code blocks as SVGs in adev PR Close #54462 | 15 February 2024, 18:33:34 UTC |
6c2d4b6 | Dylan Hunn | 14 February 2024, 17:14:14 UTC | refactor(compiler): Enable Template Pipeline globally in 1P. (#54435) The switch/index.ts file only affects g3; externally, it is replaced with a Blaze genrule. PR Close #54435 | 15 February 2024, 17:24:18 UTC |
ebcdc8d | AleksanderBodurri | 26 January 2024, 00:35:36 UTC | refactor(devtools): implement multiframe support in devtools page (#53934) In the Angular DevTools Chrome DevTools page: - Angular DevTools is able to ask the background script to list each frame that has been registered on a page. - Angular Devtools is able to ask the background script to "enable" the connection on a particular frame. This enables the messaging between the content script <-> background script <-> devtools page - Implements detection of non unique urls on the inspected page Limitations: - The `inspectedWindow.eval` API is only able to target frames by frameURL. This means some features that integrate with Chrome DevTools like inspect element and open source will not be available when inspecting frames that do not have a unique url on the page. PR Close #53934 | 15 February 2024, 01:15:25 UTC |
dd3dac9 | AleksanderBodurri | 26 January 2024, 00:31:57 UTC | refactor(devtools): implement iframe support for Angular DevTools' browser code (#53934) Modifies the messaging layer of devtools to allow for switching communication between frames on a page. When served as a browser extension. Design: - When a page renders, DevTools installs a content script onto it through it's manifest file. The all_frames option is used here to install this script onto every frame in a page. - When Angular is detected, the content script will install a backend script into it's frame. - Each content script / backend script pairing is kept track of in the background script. This pairing represents an angular devtools context in a particular frame. - Angular DevTools is able to ask the background script to list each frame that has been registered on a page. - Angular Devtools is able to ask the background script to "enable" the connection on a particular frame. This enables the messaging between the content script <-> background script <-> devtools page Limitations: - The `inspectedWindow.eval` API is only able to target frames by frameURL. This means some features that integrate with Chrome DevTools like inspect element and open source will not be available when inspecting frames that do not have a unique url on the page. PR Close #53934 | 15 February 2024, 01:15:25 UTC |
e0d59f7 | Andrew Kushnir | 15 February 2024, 00:04:40 UTC | Revert "fix(docs-infra): process mermaid code blocks (#54434)" (#54448) This reverts commit 925c86a76e94e9061a810a3eaa6010e6532277a6. Reason for revert: broken CI after merging to main, see https://github.com/angular/angular/actions/runs/7908845750/job/21588824548. PR Close #54448 | 15 February 2024, 00:18:57 UTC |
da7fbb4 | Joey Perrott | 14 February 2024, 17:57:28 UTC | fix(compiler-cli): detect when the linker is working in unpublished angular and widen supported versions (#54439) When the linker is running using an unpublished version of angular, locally built, the version will be `0.0.0`. When encountering this situation, the range that for the linker map support is considered to be `*.*.*` allowing for the linker to work at build time with packages built with versioned angular. Most notably this allows for us to properly use the linker in building our documentation site with the locally built version of angular. PR Close #54439 | 14 February 2024, 23:43:22 UTC |
36bd7d3 | Angular Robot | 13 February 2024, 06:06:15 UTC | build: update all non-major dependencies (#54406) See associated pull request for more information. PR Close #54406 | 14 February 2024, 23:39:36 UTC |
2bf0ccc | Joey Perrott | 14 February 2024, 21:52:29 UTC | docs: remove unnecessary usages of aio in adev (#54445) Remove usages of aio in adev. PR Close #54445 | 14 February 2024, 23:38:45 UTC |
925c86a | Joey Perrott | 14 February 2024, 16:15:25 UTC | fix(docs-infra): process mermaid code blocks (#54434) Render mermaid code blocks as SVGs in adev PR Close #54434 | 14 February 2024, 23:36:16 UTC |
aefbe32 | Joey Perrott | 14 February 2024, 19:47:48 UTC | ci: remove feature-request bot (#54442) Remove feature request bot from usage. PR Close #54442 | 14 February 2024, 23:33:54 UTC |
20c4739 | Kisters-BS | 14 February 2024, 08:16:57 UTC | docs: fix typo (#54427) PR Close #54427 | 14 February 2024, 23:29:21 UTC |
12d4b8e | Paul Gschwendtner | 07 February 2024, 15:11:22 UTC | docs: add guide for signal inputs (#54316) Adds a guide for signal inputs. We will port that to `angular.dev` once we finalized this version. PR Close #54316 | 14 February 2024, 23:22:49 UTC |
ed0d5ec | Andrew Kushnir | 14 February 2024, 22:57:32 UTC | docs: release notes for the v17.2.1 release | 14 February 2024, 22:57:48 UTC |
9ca8c68 | Alex Rickabaugh | 14 February 2024, 20:19:23 UTC | fix(compiler-cli): fix broken version detection condition (#54443) The version detection condition for signal two-way bindings used an OR instead of an AND, resulting in every `.0` patch version being considered as supporting two-way bindings to signals. This commit fixes the logic and adds additional parentheses to ensure the meaning of the condition is more clear. Long term, we should switch to semver version parsing instead. PR Close #54443 | 14 February 2024, 20:47:02 UTC |
edd10ac | Andrew Kushnir | 14 February 2024, 19:00:42 UTC | docs: release notes for the v17.2.0 release | 14 February 2024, 19:01:06 UTC |
981c28c | Kristiyan Kostadinov | 13 February 2024, 19:33:27 UTC | refactor(compiler-cli): do not emit signal unwrap calls in versions older than 17.2 (#54423) In order to allow both signals and non-signals in two-way bindings, we have to pass the expression through `ɵunwrapWritableSignal`. The problem is that the language service uses a bundled compiler that is fairly new, but it may be compiling an older version of Angular that doesn't expose `ɵunwrapWritableSignal` (see https://github.com/angular/vscode-ng-language-service/issues/2001). These changes add a `_angularCoreVersion` flag to the compiler which the language service can use to pass the parsed Angular version to the compiler which can then decide whether to emit the function. PR Close #54423 | 13 February 2024, 23:53:42 UTC |
74b5a51 | Matthieu Riegler | 11 February 2024, 00:16:49 UTC | fix(http): Use string body to generate transfer cache key. (#54379) This is particularly usefull for GraphQL queries where the string body might be the only discriminator. Fixes #54377 PR Close #54379 | 13 February 2024, 19:53:20 UTC |
a33f09c | Joey Perrott | 12 February 2024, 20:16:06 UTC | fix(docs-infra): don't include prerender flag based on fast/full build in adev (#54400) The serve command for architect does not support the `--prerender` flag PR Close #54400 | 13 February 2024, 19:52:39 UTC |
4789685 | Lukas Matta | 12 February 2024, 23:43:09 UTC | docs: fix typo (#54403) PR Close #54403 | 13 February 2024, 19:51:54 UTC |
5b767d6 | JiaLiPassion | 13 February 2024, 07:19:09 UTC | release: cut the zone.js-0.14.4 release (#54409) PR Close #54409 | 13 February 2024, 19:42:07 UTC |
79001a7 | Kristiyan Kostadinov | 12 February 2024, 22:57:13 UTC | build: update node (#54399) Updates the repo to a newer version of Node to fix errors in the integration tests. PR Close #54399 | 12 February 2024, 23:36:19 UTC |
383e093 | Kristiyan Kostadinov | 12 February 2024, 13:02:47 UTC | fix(core): show placeholder block on the server with immediate trigger (#54394) Currently all triggers are set up to show the placeholder block on the server, except for `on immediate` which is basically a noop. These changes update `on immediate` to match the rest of the triggers. Fixes #54385. PR Close #54394 | 12 February 2024, 19:02:38 UTC |
0b955b8 | Kristiyan Kostadinov | 12 February 2024, 10:00:58 UTC | test(language-service): add tests for model inputs (#54387) Updates the language service tests to cover `model()` inputs. PR Close #54387 | 12 February 2024, 19:01:53 UTC |
6897b76 | Kristiyan Kostadinov | 09 February 2024, 14:16:23 UTC | refactor(compiler-cli): split input and model tests (#54387) Splits up the tests for `input()` and `model()` into separate files. PR Close #54387 | 12 February 2024, 19:01:53 UTC |
b9ba136 | Kristiyan Kostadinov | 09 February 2024, 14:11:19 UTC | refactor(compiler-cli): add diagnostic tests for models (#54387) Sets up type checking diagnostic tests for model() inputs. PR Close #54387 | 12 February 2024, 19:01:52 UTC |
be4620c | Kristiyan Kostadinov | 09 February 2024, 12:22:55 UTC | test(core): add type tests for ɵunwrapWritableSignal (#54387) Getting the typing for `ɵunwrapWritableSignal` just right was tricky so these changes add some tests to ensure that we don't regress. Also reworks the type tester a bit to make it easier to find where to add new test files. PR Close #54387 | 12 February 2024, 19:01:52 UTC |
58666e9 | Kristiyan Kostadinov | 09 February 2024, 12:00:34 UTC | refactor(core): reuse input signal node for models (#54387) Reworks the model so that it reuses `INPUT_SIGNAL_NODE` instead of implementing its own. PR Close #54387 | 12 February 2024, 19:01:52 UTC |
4a7ca50 | Kristiyan Kostadinov | 09 February 2024, 08:47:25 UTC | refactor(core): avoid wrapper around subscribe return value (#54387) Reworks `ModelSignal.subscribe` so it doesn't have to wrap its value to look like a subscription. PR Close #54387 | 12 February 2024, 19:01:52 UTC |
1c990cd | arturovt | 12 June 2023, 21:22:29 UTC | fix(zone.js): patch form-associated custom element callbacks (#50686) This commit updates the implementation of the `customElements` patch and also patches FACE callbacks (`formAssociatedCallback`, `formDisabledCallback`, `formResetCallback` and `formStateRestoreCallback`). This now allows invoking those callbacks in the same zone where the custom element has been defined. PR Close #50686 | 12 February 2024, 16:50:55 UTC |
629a222 | Payam Valadkhan | 09 February 2024, 16:24:04 UTC | refactor(compiler-cli): expose a helper to check if a diagnostic is related to local compilation (#54366) Such helper is needed in 1P in order to be able to add extra google3 specific instruction to local compilation errors. PR Close #54366 | 12 February 2024, 16:49:03 UTC |
27886cc | Payam Valadkhan | 09 February 2024, 16:00:19 UTC | refactor(compiler-cli): use a more generic error for unsupported expressions in local compilation mode (#54366) A new error code `LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION` is added for this purpose, replacing a narrow one. PR Close #54366 | 12 February 2024, 16:49:03 UTC |
ff62244 | Pawel Kozlowski | 09 February 2024, 20:42:58 UTC | fix(core): return the same children query results if there are no changes (#54392) Assure that the same readonly array corresponding to the children query results is returned for cases where a query is marked as dirty but there were no actual changes to the content of the results array (this can happen if a view is added and removed thus marking queries as dirty but not influencing final results). Fixes #54376 PR Close #54392 | 12 February 2024, 16:48:29 UTC |
9bc386e | Joey Perrott | 08 February 2024, 23:44:15 UTC | refactor(docs-infra): create fast mode (#54364) Creates a "fast mode" for building the adev site, currently only disabling prerender during fast build. This is intended to be used for local development. PR Close #54364 | 09 February 2024, 18:59:06 UTC |
abf6371 | JoostK | 08 February 2024, 20:50:19 UTC | fix(core): do not crash for signal query that does not have any matches (#54353) The newly introduced signal queries would error if no match exists, due to an invalid read within the query internals. This commit addresses the crash by allowing there to be no matches. PR Close #54353 | 09 February 2024, 14:59:51 UTC |
5890f05 | Hakeem | 08 February 2024, 13:01:35 UTC | docs(docs-infra): change deprecated modules' headers' style in the hover state (#54337) PR Close #54337 | 09 February 2024, 14:58:55 UTC |
fbaf989 | Joey Perrott | 08 February 2024, 22:31:48 UTC | fix(docs-infra): include manually defined api reference docs in adev (#54356) Include the manual defined api reference docs in adev PR Close #54356 | 09 February 2024, 14:58:28 UTC |
6b34513 | Angular Robot | 09 February 2024, 11:06:08 UTC | build: update cross-repo angular dependencies (#54186) See associated pull request for more information. PR Close #54186 | 09 February 2024, 14:57:46 UTC |
6196a36 | Paul Gschwendtner | 09 February 2024, 10:56:47 UTC | docs: release notes for the v17.2.0-rc.1 release | 09 February 2024, 11:01:19 UTC |
dab5fc3 | Kristiyan Kostadinov | 09 February 2024, 09:41:35 UTC | fix(core): expose model signal subcribe for type checking purposes (#54357) The `@internal` in the comment above `ModelSignal.subscribe` ended up marking the method as internal even though it wasn't meant to be. PR Close #54357 | 09 February 2024, 09:58:55 UTC |
153fc61 | Kristiyan Kostadinov | 08 February 2024, 17:49:40 UTC | build: reuse fake core in type checking tests (#54344) Currently we have two fake copies of `@angular/core` in the compiler tests which can be out of sync and cause inconsistent tests. These changes reuse a single copy instead. PR Close #54344 | 08 February 2024, 19:21:47 UTC |
35c617c | Matthieu Riegler | 07 February 2024, 23:01:53 UTC | refactor(devtools): show tooltip for hydration icon on directive forest (#54326) The MatTooltip was missing after migrating to standalone PR Close #54326 | 08 February 2024, 19:18:37 UTC |
b857aaf | Joey Perrott | 07 February 2024, 16:00:01 UTC | refactor: migrate router to prettier formatting (#54318) Migrate formatting to prettier for router from clang-format PR Close #54318 | 08 February 2024, 19:17:14 UTC |
d02fcb1 | Jessica Janiuk | 08 February 2024, 18:40:48 UTC | docs: release notes for the v17.2.0-rc.0 release | 08 February 2024, 18:43:03 UTC |
00746d8 | Jessica Janiuk | 08 February 2024, 18:40:48 UTC | release: bump the next branch to v17.3.0-next.0 | 08 February 2024, 18:43:03 UTC |
c47bf63 | Jessica Janiuk | 08 February 2024, 18:18:45 UTC | docs: release notes for the v17.1.3 release | 08 February 2024, 18:20:12 UTC |
8dea3b5 | cexbrayat | 08 February 2024, 11:41:41 UTC | test: tidy up signal signal input/query/model signature tests (#54334) This updates some tests to use the public imports from `@angular/core` now that they are available, and cleans up useless imports and inaccurate names. PR Close #54334 | 08 February 2024, 16:49:15 UTC |
898a532 | Andrew Scott | 08 February 2024, 00:30:41 UTC | fix(core): Fix possible infinite loop with `markForCheck` by partially reverting #54074 (#54329) In some situations, calling `markForCheck` can result in an infinite loop in seemingly valid scenarios. When a transplanted view is inserted before its declaration, it gets refreshed in the retry loop of `detectChanges`. At this point, the `Dirty` flag has been cleared from all parents. Calling `markForCheck` marks the insertion tree up to the root `Dirty`. If the declaration is checked again as a result (i.e. because it has default change detection) and is reachable because its parent was marked `Dirty`, this can cause an infinite loop. The declaration is refreshed again, so the insertion is marked for refresh (again). We enter an infinite loop if the insertion tree always calls `markForCheck` for some reason (i.e. `{{createReplayObservable() | async}}`). While the case above does fall into an infinite loop, it also truly is a problem in the application. While it's not an infinite synchronous loop, the declaration and insertion are infinitely dirty and will be refreshed on every change detection round. Usually `markForCheck` does not have this problem because the `Dirty` flag is not cleared until the very end of change detection. However, if the view did not already have the `Dirty` flag set, it is never cleared because we never entered view refresh. One solution to this problem could be to clear the `Dirty` flag even after skipping view refresh but traversing to children. PR Close #54329 | 08 February 2024, 16:45:20 UTC |
adfc3f0 | Kristiyan Kostadinov | 08 February 2024, 15:46:20 UTC | refactor(core): temporarily mark subscribe methods as deprecated (#54342) The `subscribe` methods on `ModelSignal` and `OutputEmitter` were marked as `@internal` which will break when the TCB needs to reference them. These changes make them `@deprecated` temporarily so we can address the properly later. PR Close #54342 | 08 February 2024, 16:33:41 UTC |
38b01a3 | cexbrayat | 08 February 2024, 13:22:01 UTC | fix(compiler-cli): interpolatedSignalNotInvoked diagnostic for model signals (#54338) The new `model()` signal introduces a `ModelSignal` type that needs to be handled by the interpolatedSignalNotInvoked diagnostic to catch issues like: ``` <div>{{ myModel }}</div> ``` PR Close #54338 | 08 February 2024, 16:28:20 UTC |
03c3b3e | ascorbic | 07 February 2024, 08:52:06 UTC | feat(common): add Netlify image loader (#54311) Add an image loader for Netlify Image CDN. It is slightly different in implementation from existing loaders, because it allows absolute URLs Fixes #54303 PR Close #54311 | 08 February 2024, 16:17:57 UTC |
9c2bad9 | Kristiyan Kostadinov | 08 February 2024, 11:37:39 UTC | refactor(compiler-cli): avoid naming conflict with built-in global variable (#54333) The import of `module` can conflict with the native global variable called `module` and can break some internal tests. These switch to only importing the function we need. PR Close #54333 | 08 February 2024, 14:59:54 UTC |
44f65f2 | Kristiyan Kostadinov | 07 February 2024, 23:32:45 UTC | refactor(compiler-cli): work around internal test failure (#54327) Fixes an internal test failure due to `FatalDiagnosticError` extending the native `Error`. PR Close #54327 | 08 February 2024, 14:59:24 UTC |
ca239e8 | Pawel Kozlowski | 07 February 2024, 18:20:55 UTC | refactor(core): share refresh logic for cd and signal queries (#54322) Introducing a tiny utility method to remove some code duplication between the change change detection and signal based queries. PR Close #54322 | 07 February 2024, 22:22:06 UTC |
a3e51d9 | Ben Hong | 07 February 2024, 21:02:12 UTC | docs: enable version picker (#54161) PR Close #54161 | 07 February 2024, 22:21:05 UTC |
38c0084 | Paul Gschwendtner | 06 February 2024, 14:23:00 UTC | test: verify signal-based queries in CLI integration test (#54314) Adds usages of signal-based queries into the signal integration test to verify queries can be used in production, and testing environments as expected (i.e. the transform works as expected). PR Close #54314 | 07 February 2024, 18:56:04 UTC |
a08863e | Paul Gschwendtner | 07 February 2024, 12:40:58 UTC | refactor(compiler-cli): ensure `FatalDiagnosticError` extends `Error` (#54309) This helps with the Angular CLI currently swallowing fatal diagnostic errors in ways that are extremely difficult to debug due to workers executing Angular compiler logic. The worker logic, via piscina, is currently not forwarding such Angular errors because those don't extend `Error.` https://github.com/piscinajs/piscina/blob/a7042ea27d129f3cad75c422f5aa92f0663854ee/src/worker.ts#L175 Even with access to these errors by manually forwarding errors, via patching of the Angular CLI, there is no stack trace due to us not using `Error` as base class for fatal diagnostic errors. This commit improves this for future debugging and also better reporting of such errors to our users- if we would accidentally leak one. PR Close #54309 | 07 February 2024, 16:39:21 UTC |
8e237a0 | Paul Gschwendtner | 07 February 2024, 12:39:00 UTC | fix(compiler-cli): properly catch fatal diagnostics in type checking (#54309) An identical addition to: 760b1f3d0b857288980f2d9929147f331d657f7d. This commit expands the `try/catch`-es: - to properly NOT throw and just convert the diagnostic. - to be in place for all top-level instances. Notably, this logic cannot reside in the template type checker directly as otherwise we would risk multiple duplicate diagnostics. PR Close #54309 | 07 February 2024, 16:39:20 UTC |
e921e10 | Kristiyan Kostadinov | 07 February 2024, 07:53:39 UTC | refactor(core): correctly distinguish getter functions from writable signals (#54252) Fixes that `ɵunwrapWritableSignal` inferring getter functions as not matching the interface of `WritableSignal` instead of preserving them. PR Close #54252 | 07 February 2024, 16:36:15 UTC |
a4a76c3 | Kristiyan Kostadinov | 06 February 2024, 22:55:59 UTC | refactor(core): throw if required model is changed via update too early (#54252) Adds an assertion that will throw if `ModelSignal.update` is accessed before an initial value is set. PR Close #54252 | 07 February 2024, 16:36:14 UTC |
ac9c544 | Kristiyan Kostadinov | 06 February 2024, 22:11:34 UTC | refactor(core): assert writable signal in two-way property instruction (#54252) Asserts that the value is a `WritableSignal`, rather than a `Signal`, in the `twoWayProperty` instruction. PR Close #54252 | 07 February 2024, 16:36:14 UTC |
243b94c | Kristiyan Kostadinov | 06 February 2024, 22:00:30 UTC | refactor(compiler-cli): fix regression in two-way bindings to inputs with different getter/setter types (#54252) In a previous commit the TCB was changed to cast the assignment to an input in order to widen its type to allow `WritableSignal`. This ended up breaking existing inputs whose setter has a wider type than its getter. These changes switch to unwrapping the value on the binding side. PR Close #54252 | 07 February 2024, 16:36:13 UTC |
551c579 | Kristiyan Kostadinov | 06 February 2024, 13:08:04 UTC | refactor(core): address PR feedback (#54252) Addresses the feedback from #54252. PR Close #54252 | 07 February 2024, 16:36:12 UTC |
a17f6cb | Kristiyan Kostadinov | 06 February 2024, 12:28:27 UTC | refactor(compiler-cli): rework TCB for two-way bindings (#54252) Reworks the TCB for two-way bindings to make them simpler and to avoid regressions for two-way bindings to generic inputs. The new TCB looks as follows: ``` var _t1: Dir; var _t2 = _t1.input; (_t1 as typeof _t2 | WritableSignal<typeof _t2>) = expression; ``` PR Close #54252 | 07 February 2024, 16:36:11 UTC |
372e1ff | Kristiyan Kostadinov | 05 February 2024, 18:58:57 UTC | refactor(compiler-cli): account for model inputs in language service (#54252) Updates the code that resolves a node from the TCB to an input in order to fix the language service. PR Close #54252 | 07 February 2024, 16:36:10 UTC |
702ab28 | Kristiyan Kostadinov | 05 February 2024, 18:18:10 UTC | feat(core): add support for model inputs (#54252) Adds support for model inputs in the framework. `model()` returns a writable signal that implicitly defines a input/output pair that can be used either in two-way bindings to keep two values in sync or by binding individually to the input and output. When the value of the `model` changes, it will emit an event with the current value. Furthermore, these changes expand two-way bindings to accept `WritableSignal`. This will make it easier to transition existing code to signals in a backwards-compatible way. Example: ```ts @Directive({ selector: 'counter', standalone: true, host: { '(click)': 'increment()', } }) export class Counter { value = model(0); increment(): void { this.value.update(current => current + 1); } } @Component({ template: `<counter [(value)]="count"/> The current count is: {{count()}}`, }) class App { count = signal(0); } ``` PR Close #54252 | 07 February 2024, 16:36:09 UTC |
d006aa3 | Kristiyan Kostadinov | 05 February 2024, 10:34:17 UTC | refactor(compiler-cli): add tests for model inputs (#54252) Adds tests in the compiler to verify the compiled output and template type checking behavior of model inputs. PR Close #54252 | 07 February 2024, 16:36:08 UTC |
67b977e | Kristiyan Kostadinov | 05 February 2024, 09:41:48 UTC | refactor(compiler-cli): allow writable signals in two-way bindings (#54252) Updates the TCB generation logic to allow for `WritableSignal` to be assigned in two-way bindings. PR Close #54252 | 07 February 2024, 16:36:07 UTC |