sort by:
Revision Author Date Message Commit Date
4876ed9 refactor(zone.js): rename types to drop the `_` prefix convention (#53443) Now that we have real ES modules, there's no need for the prefix convention. PR Close #53443 16 March 2024, 01:11:33 UTC
d90b684 refactor(zone.js): move `Zone` global declaration and assignment to `zone.ts` (#53443) Global state is to be managed in `zone.ts` rather than `zone-impl.ts`. PR Close #53443 16 March 2024, 01:11:33 UTC
1a4d783 refactor(zone.js): clear `zone.ts` file (#53443) All its content has been copied to `zone-impl.ts`, so this file will become a wrapper for those symbols. PR Close #53443 16 March 2024, 01:11:33 UTC
6c7e1e6 refactor(zone.js): export Zone initialization function instead of invoking it as an IIFE (#53443) This removes the top-level side effects from this file. Indenting is left as-is to minimize changes. PR Close #53443 16 March 2024, 01:11:33 UTC
17c59eb refactor(zone.js): rename `Zone` class to `ZoneImpl` (#53443) This removes a name collision on `Zone` with the interface. Otherwise putting the `interface Zone {}` and `class Zone {}` in the same scope when the IIFE is removed will cause a conflict. PR Close #53443 16 March 2024, 01:11:33 UTC
4823356 refactor(zone.js): moves `global` constant outside IIFE (#53443) The IIFE will be removed shortly to support exporting symbols inside it. PR Close #53443 16 March 2024, 01:11:33 UTC
4feec72 refactor(zone.js): export previously global types from `zone-impl.ts`. (#53443) This allows the types to be directly imported when used. PR Close #53443 16 March 2024, 01:11:33 UTC
76d8c73 refactor(zone.js): remove `declare global` from `zone-impl.ts` (#53443) This drops global declarations from this file (as they will be limited to `zone.ts`. It also deletes the `/** @internal */` annotation on `AmbientZone` which is no longer necessary since it isn't in the `declare global` and deletes the global Zone declaration which is also unnecessary. PR Close #53443 16 March 2024, 01:11:32 UTC
a760470 refactor(zone.js): copy `zone.ts` to `zone-impl.ts` (#53443) This is just a straight copy, no code is altered. The new `zone-impl.ts` file will contain the actual definitions exported directly without any global declarations or top-level side effects. The existing `zone.ts` will remain as an entry point with those globals and side-effects. PR Close #53443 16 March 2024, 01:11:32 UTC
5a63a47 test(compiler-cli): add unit tests for `output()` JIT transform (#54841) We are already testing the JIT transforms via integration tests, but this commit adds dedicated unit tests for the transform behavior for proper test coverage (planned follow-up). PR Close #54841 15 March 2024, 22:14:32 UTC
c3da797 docs(docs-infra): bump xterm to 5.4.0 to fix a layout issue on Firefox. (#54897) With 5.4.0 `xterm` has migrated to scoped packages. We're now using `@xterm/xterm`. Fixes #54894 PR Close #54897 15 March 2024, 22:13:39 UTC
879bd80 fix(compiler): capture data bindings for content projection purposes in blocks (#54876) Fixes a regression in the template pipeline where data bindings weren't being captured for content projection purposes. Fixes #54872. PR Close #54876 15 March 2024, 22:11:19 UTC
b961075 refactor(compiler-cli): move DelegatingPerfRecorder initialization into constructor (#54834) Move the initialization of class field `DelegatingPerfRecorder` into the constructor. This fixes the error : `TypeError: Cannot read properties of undefined (reading 'eventCount')` This is blocking the roll-out of public class. PR Close #54834 15 March 2024, 22:10:46 UTC
d01576b refactor(compiler-cli): properly preserve file overview comments (#54819) This commit updates the logic for preserving file overview comments to be more reliable and less dependent on previous transforms. Previously, with the old import manager, we had a utility called `addImport` that always separated import statements and non-import statements. This meant that the non-emitted statement from Tsickle for the synthetic file-overview comments no longer lived at the beginning of the file. `addImports` tried to overcome this by adding another new non-emitted statement *before* all imports. This then was later used by the transform (or was assumed!) to attach the synthetic file overview comments if the original tsickle AST Node is no longer at the top. This logic can be improved, because the import manager shouldn't need to bother about this fileoverview non-emitted statement, and the logic for re-attaching the fileoverview comment should be local. This commit fixes this and makes it a local transform. PR Close #54819 15 March 2024, 22:09:41 UTC
de75fe0 test(compiler-cli): add tests to verify import generation in TCB files/blocks (#54819) This commit adds some unit tests verifying the import generation in TCB files and inline blocks. We don't seem to have any unit tests for these in general. This commit adds some, verifying some characteristics we would like to guarantee. PR Close #54819 15 March 2024, 22:09:41 UTC
0e9c075 refactor(compiler-cli): rename `ImportManagerV2` to `ImportManager` (#54819) To ease review and to allow for both instances to co-exist, `ImportManagerV2` was introduced. This commit renames it to `ImportManager` now that we deleted the older one. PR Close #54819 15 March 2024, 22:09:41 UTC
922f950 refactor(compiler-cli): delete old unused `ImportManager` (#54819) This commit deletes the older and now unused `ImportManager`. PR Close #54819 15 March 2024, 22:09:40 UTC
bec0179 test(compiler-cli): enable incremental re-use type checking with signal inputs (#54819) Enables the incremental type-checking test that we never enabled when we landed signal inputs. Now that we fixed incremental re-use by re-using the existing user imports for inline type check blocks, the test is passing and can be enabled. PR Close #54819 15 March 2024, 22:09:40 UTC
94bc3af refactor(compiler-cli): switch jit transforms to use new import manager (#54819) Switches the JIT transforms to use the new import manager. PR Close #54819 15 March 2024, 22:09:40 UTC
dc80046 refactor(compiler-cli): update type check generation code to use new import manager (#54819) Updates the type-check block generation code (also for inline type check blocks) to use the new import manager. This is now a requirement because the translator utilities from the reference emit environment expect an import manager that follows the new contract established via `ImportGenerator<TFile, TExpression>`. For type check files, we can simply print new imports as we don't expect existing imports to be updated. That is because type check files do not have any _original_ source files (or in practice— those are empty). For type check blocks inline, or constructors, imports _may_ be re-used. This is great as it helps fixing some incrementality bugs that we were seeing in the type check code. That is, sometimes the type check block code may generate imports conditionally for e.g. `TemplateRef`, or animations. Those then **prevent** incremental re-use if TCB code switches between those continously. We tried to account for that with signal inputs by always pre-generating such imports. This fixed the issue for type-check files, but for inline type check blocks this is different as we would introduce new imports in user code that would then be changed back in subsequential edit iterations. See: https://github.com/angular/angular/pull/53521#pullrequestreview-1778130879. In practice, the assumption was that we would be fine since user code is most likely containing imports to `@angular/core` already. That is a true assumption, but unfortunately it doesn't help with incremental re-use because TypeScript's structural change detection does not dedupe and expects 1:1 exact imports from their old source files. https://github.com/microsoft/TypeScript/pull/56845 To improve incremental re-use for the type check integration, we should re-use original source file imports when possible. This commit enables this. To update imports and execute inline operations, we are now uisng `magic-string` (which is then bundled) as it simplifies the string manipulatuons. PR Close #54819 15 March 2024, 22:09:40 UTC
6288f1c refactor(compiler-cli): use new import manager for ngtsc transforms (#54819) This commit switches ngtsc's JS and DTS transform to use the new import manager. This is a drop-in replacement as we've updated the translator helpers in the previous commit to align with the new API suggested by the `ImportManagerV2` (to be renamed then). PR Close #54819 15 March 2024, 22:09:40 UTC
0482b6b refactor(compiler-cli): update `ImportGenerator` abstraction for new manager (#54819) `ImportGenerator` is the abstraction used by the translator functions to insert imports for `ExternalExpr` in an AST-agnostic way. This was built specifically for the linker which does not use any of the complex import managers- but rather re-uses `ngImport` or uses `ngImport.Bla`. This commit also switches the linker AST-agnostic generator to follow the new signatures. This was rather trivial. PR Close #54819 15 March 2024, 22:09:40 UTC
9a56bd5 refactor(compiler-cli): introduce new implementation of `ImportManager` (#54819) This commit introduces a new implementation of `ImportManager` that has numerous benefits: - It allows efficient re-use of original source file imports. * either fully re-using original imports if matching * updating existing import declarations to include new symbols. - It allows efficient re-use of previous generated imports. - The manager can be used for schematics and migrations. The implementation is a rework of the import manager that we originally built for schematics in Angular Material, but this commit improved it to be more flexible, more readable, and "correct". In follow-ups we can use this for schematics/migrations. PR Close #54819 15 March 2024, 22:09:40 UTC
5901b0c Revert "fix(router): Routed components never inherit `RouterOutlet` `EnvironmentInjector` (#54265)" (#54895) This reverts commit da906fdafcbb302fa280a162d1c1f04369be2efa. This change causes some test failures in google3. PR Close #54895 15 March 2024, 22:08:45 UTC
3691570 build: update dependency google-closure-compiler to v20231112 (#54893) See associated pull request for more information. PR Close #54893 15 March 2024, 18:31:22 UTC
406448a build: update dependency archiver to v7 (#54892) See associated pull request for more information. PR Close #54892 15 March 2024, 18:18:34 UTC
9574eda build: lock file maintenance (#54890) See associated pull request for more information. PR Close #54890 15 March 2024, 18:01:45 UTC
e56c86f build: update actions/cache digest to ab5e6d0 (#54886) See associated pull request for more information. PR Close #54886 15 March 2024, 17:28:14 UTC
d3309d7 build: update dependency @octokit/graphql to v8 (#54888) See associated pull request for more information. PR Close #54888 15 March 2024, 17:24:51 UTC
dbe2e38 build: update dependency lighthouse to v11 (#54292) See associated pull request for more information. PR Close #54292 15 March 2024, 17:22:55 UTC
8cee78d build: update all non-major dependencies (#54616) See associated pull request for more information. PR Close #54616 15 March 2024, 17:21:28 UTC
97da5f7 build: update io_bazel_rules_sass digest to 79bd239 (#54887) See associated pull request for more information. PR Close #54887 15 March 2024, 17:16:23 UTC
0472a92 build: update cross-repo angular dependencies (#54883) See associated pull request for more information. PR Close #54883 15 March 2024, 17:06:43 UTC
e473b70 docs: update events (#54749) Generated `events.json` with the latest events retrieved from the Firebase DB. PR Close #54749 15 March 2024, 16:38:14 UTC
70e2431 build: update dependency puppeteer-core to v22 (#54298) See associated pull request for more information. PR Close #54298 15 March 2024, 16:31:25 UTC
17199b9 build: update peter-evans/create-or-update-comment action to v4 (#54299) See associated pull request for more information. PR Close #54299 15 March 2024, 16:30:51 UTC
1f8a30d build: update eslint dependencies (#50993) See associated pull request for more information. PR Close #50993 15 March 2024, 16:30:11 UTC
da906fd fix(router): Routed components never inherit `RouterOutlet` `EnvironmentInjector` (#54265) This commit ensures components in the route config predictably always get their providers from the hierarchy available to routes rather than sometimes being dependent on where they are inserted. fixes #53369 BREAKING CHANGE: Providers available to the routed components always come from the injector heirarchy of the routes and never inherit from the `RouterOutlet`. This means that providers available only to the component that defines the `RouterOutlet` will no longer be available to route components in any circumstances. This was already the case whenever routes defined providers, either through lazy loading an `NgModule` or through explicit `providers` on the route config. PR Close #54265 14 March 2024, 19:33:13 UTC
2b80258 feat(router): Allow Route.redirectTo to be a function which returns a string or UrlTree (#52606) This commit updates the logic around `Route.redirectTo` to enable using a function to create the redirect. This function can return a string, ands acts the same as previous string redirects, or a `UrlTree`, which will act as an absolute redirect. To be useful, the redirect function needs access to the params and data. Today, developers can access these in their redirect strings, for example `{path: ':id', redirectTo: '/user/:id'}`. Unfortunately, developers only have access to params and data on the _current route_ today in the redirect strings. The params and data in the `RedirectFn` give developers access to anything from the matched parent routes as well. This is done as the same way as param and data aggregation later on (https://github.com/angular/angular/blob/897f014785578d87bc655ea6ae9e113653960f50/packages/router/src/router_state.ts#L236-L278). In order to accomplish this, we inherit params and data while matching, after the `ActivatedRouteSnapshot` is created for the matched route rather than waiting until the end. The `RedirectFunction` does not return the full `ActivatedRouteSnapshot` interface. Some things are not accurately known at the route matching phase. For example, resolvers are not run until later, so any resolved title would not be populated. The same goes for lazy loaded components. The is also true for all the snapshots up to the root, so properties that include parents (root, parent, pathFromRoot) are also excluded. And naturally, the full route matching hasn't yet happened so firstChild and children are not available either. fixes #13373 resolves #28661 (though not for the redirect string - you would return a `UrlTree` from the function) BREAKING CHANGE: This change allows `Route.redirectTo` to be a function in addition to the previous string. Code which expects `redirectTo` to only be a string on `Route` objects will need to be adjusted. PR Close #52606 14 March 2024, 18:19:01 UTC
b71a323 docs: update Angular CLI help [main] (#54861) Updated Angular CLI help contents. PR Close #54861 14 March 2024, 15:55:42 UTC
77a397b release: cut the v18.0.0-next.0 release 14 March 2024, 15:44:29 UTC
700c052 fix(core): Update ApplicationRef.tick loop to only throw in dev mode (#54848) This commit updates the loop in ApplicationRef.tick to only throw in dev mode. In addition, it reduces the reruns to 10 from 100 in order to reduce the impact on production applications that encounter this error. That is, the loop will bail out much earlier and prevent prolonged unresponsiveness. PR Close #54848 13 March 2024, 22:35:34 UTC
1b19d2d docs: release notes for the v17.3.0 release 13 March 2024, 21:09:11 UTC
2d47329 build: update symbol goldens (#54843) fix goldens after recent commit PR Close #54843 13 March 2024, 18:36:06 UTC
0dd441d refactor(core): Remove cancelation funtion from scheduler return value (#54578) Canceling a scheduled callback is not used. PR Close #54578 13 March 2024, 18:09:56 UTC
10c5cdb fix(core): ensure change detection runs in a reasonable timeframe with zone coalescing (#54578) Zone event and run coalescing now races `requestAnimationFrame` and `setTimeout`. There are tradeoffs to both functions and racing the two gives us the benefits of both. This is explained in more detail in the jsdoc comment. This change also aligns the timing of zone coalescing with what will be used for zoneless. BREAKING CHANGE: The exact timing of change detection execution when using event or run coalescing with `NgZone` is now the first of either `setTimeout` or `requestAnimationFrame`. Code which relies on this timing (usually by accident) will need to be adjusted. If a callback needs to execute after change detection, we recommend `afterNextRender` instead of something like `setTimeout`. fixes #54544 fixes #44314 fixes #39854 (unverified but seems likely) PR Close #54578 13 March 2024, 18:09:55 UTC
8cad4e8 fix(core): `ComponentFixture` `autoDetect` respects `OnPush` flag of host view (#54824) This is a follow-up to #53718 that applies the same logic to the `autoDetect` feature of the fixture's host view. This now unifies the logic between `ApplicationRef` and `ComponentFixture` autodetect. BREAKING CHANGE: The `ComponentFixture` `autoDetect` feature will no longer refresh the component's host view when the component is `OnPush` and not marked dirty. This exposes existing issues in components which claim to be `OnPush` but do not correctly call `markForCheck` when they need to be refreshed. If this change causes test failures, the easiest fix is to change the component to `ChangeDetectionStrategy.Default`. PR Close #54824 13 March 2024, 15:32:03 UTC
edc1740 refactor(core): restructure logic in `isCssClassMatching` function (#54800) The logic in `isCssClassMatching` is only interested in two areas in the attributes: implicit attributes and the `AttributeMarker.Classes` area, with the first area only of interest for projection matching, not directive matching. This commit splits these two searches to make this more apparent. PR Close #54800 12 March 2024, 21:05:16 UTC
e6ee6d2 fix(core): exclude class attribute intended for projection matching from directive matching (#54800) This commit resolves a regression that was introduced when the compiler switched from `TemplateDefinitionBuilder` (TDB) to the template pipeline (TP) compiler. The TP compiler has changed the output of ```html if (false) { <div class="test"></div> } ``` from ```ts defineComponent({ consts: [['class', 'test'], [AttributeMarker.Classes, 'test']], template: function(rf) { if (rf & 1) { ɵɵtemplate(0, App_Conditional_0_Template, 2, 0, "div", 0) } } }); ``` to ```ts defineComponent({ consts: [[AttributeMarker.Classes, 'test']], template: function(rf) { if (rf & 1) { ɵɵtemplate(0, App_Conditional_0_Template, 2, 0, "div", 0) } } }); ``` The last argument to the `ɵɵtemplate` instruction (0 in both compilation outputs) corresponds with the index in `consts` of the element's attribute's, and we observe how TP has allocated only a single attribute array for the `div`, where there used to be two `consts` entries with TDB. Consequently, the `ɵɵtemplate` instruction is now effectively referencing a different attributes array, where the distinction between the `"class"` attribute vs. the `AttributeMarker.Classes` distinction affects the behavior: TP's emit causes the runtime to incorrectly match a directive with `selector: '.foo'` to be instantiated on the `ɵɵtemplate` instruction as if it corresponds with a structural directive! Instead of changing TP to align with TDB's emit, this commit updates the runtime instead. This uncovered an inconsistency in selector matching for class names, where there used to be two paths dealing with class matching: 1. The first check was commented to be a special-case for class matching, implemented in `isCssClassMatching`. 2. The second path was part of the main selector matching algorithm, where `findAttrIndexInNode` was being used to find the start position in `tNode.attrs` to match the selector's value against. The second path only considers `AttributeMarker.Classes` values if matching for content projection, OR of the `TNode` is not an inline template. The special-case in path 1 however does not make that distinction, so it would consider the `AttributeMarker.Classes` binding as a selector match, incorrectly causing a directive to match on the `ɵɵtemplate` itself. The second path was also buggy for class bindings, as the return value of `classIndexOf` was incorrectly negated: it considered a matching class attribute as non-matching and vice-versa. This bug was not observable because of another issue, where the class-handling in part 2 was never relevant because of the special-case in part 1. This commit separates path 1 entirely from path 2 and removes the buggy class-matching logic in part 2, as that is entirely handled by path 1 anyway. `isCssClassMatching` is updated to exclude class bindings from being matched for inline templates. Fixes #54798 PR Close #54800 12 March 2024, 21:05:16 UTC
0f7bbd0 docs: fix missing security guide in navigation (#54830) The paths for the security guide were flipped in the original PR. As a result, it looked for a markdown file in the best-practices directory when it should have looked for it in the guide directory instead. PR Close #54830 12 March 2024, 20:12:58 UTC
456f18b refactor(core): add internal API to enable i18n hydration (#54784) Add an internal API to enable and use i18n hydration for testing and development. This helps ensure that we don't accidentally break the current behavior until we are completely ready to roll out i18n support. PR Close #54784 12 March 2024, 18:38:59 UTC
db2f9a9 refactor(compiler-cli): cleanup unused code (#54775) The initializer api no longer needs to take care of `ɵoutput`. PR Close #54775 12 March 2024, 18:31:39 UTC
4ff94aa docs: improve in-depth guides information architecture (#54365) PR Close #54365 12 March 2024, 17:25:31 UTC
6a07c0c fix(docs-infra): remove the prerender directory from adev (#54820) Remove the prerender directory as it is entirely unused and unneeded PR Close #54820 12 March 2024, 17:24:04 UTC
1294b9a refactor(core): report subscription errors for `OutputEmitterRef` to `ErrorHandler` (#54821) Currently if an `(output)` listener fails, it will be handled gracefully by Angular and reported to the `ErrorHandler`. For programmatic subscriptions with `OutputEmitterRef`, this is not the case. Instead, as soon as any subscription is failing, all other subsequent subscription callbacks are not firing anymore. This commit intends to make this more consistent by gracefully reporting errors from `OutputEmitterRef#emit` to `ErrorHandler`, allowing for listener execution to continue. PR Close #54821 12 March 2024, 17:21:48 UTC
8735af0 feat(router): Add ability to return `UrlTree` with `NavigationBehaviorOptions` from guards (#45023) Returning `UrlTree` from a guard was a convenient new feature added to the `Router`. However, it does not have feature-parity with the old `router.navigate(...); return false;` pattern. The most common use-case for this feature is to redirect to a new page _without_ updating the URL from the initially attempted navigation. For example, rendering a 404 page when the user does not have access privelages to a route. Fixes #17004 Fixes #27148 BREAKING CHANGE: Guards can now return `RedirectCommand` for redirects in addition to `UrlTree`. Code which expects only `boolean` or `UrlTree` values in `Route` types will need to be adjusted. PR Close #45023 12 March 2024, 16:19:14 UTC
87cae55 docs: typo in output documentation (#54773) PR Close #54773 12 March 2024, 16:15:04 UTC
bea7f33 docs: update Angular CLI help [main] (#54815) Updated Angular CLI help contents. PR Close #54815 12 March 2024, 16:13:55 UTC
018f826 fix(core): ensure all initializer functions run in an injection context (#54761) Ensures that all of the functions intended to be run in initializers are in an injection context. This is a stop-gap until we have a compiler diagnostic for it. PR Close #54761 12 March 2024, 16:08:06 UTC
47f79e7 refactor(core): assert presence of the track function (#54814) This commits assert that the repeater instruction gets a reference to a tracking function. This change will allow us to better track occurences of https://github.com/angular/angular/issues/53628 - in certain situations a reference to a tracking function might be undefiened. We are not fixing the underlying issue here, just getting better visibility. PR Close #54814 11 March 2024, 23:33:01 UTC
142825d perf(core): speed up retrieval of `DestroyRef` in `EventEmitter` (#54748) Speeds up the retrieval of `DestroyRef` in `EventEmitter` because `try/catch` is expensive if there is no injection context. We saw a script time regression in Cloud. The goldens had to be updated because `getInjectImplementation` is now referenced. `inject` also references the underlying field, but directly. This is super minimal overhead of a function exposing the internal field. PR Close #54748 11 March 2024, 23:31:03 UTC
f0a2600 docs: use the right path for first-app images (#54694) PR Close #54694 11 March 2024, 23:30:28 UTC
6ea208e refactor(compiler-cli): move defer resolver compilation into compiler package (#54759) Moves the logic that creates the defer resolver function into `@angular/compiler` for consistency with the rest of the compilation APIs. Also renames some of the symbols to make it clearer what they're used for. PR Close #54759 11 March 2024, 22:52:42 UTC
9b424d7 fix(compiler-cli): preserve original reference to non-deferrable dependency (#54759) Fixes an issue where we were outputting the reference to non-deferrable dependencies as strings, rather than going through the reference emitter. This caused some issues internally because the reference wasn't maintained in the generated JS. PR Close #54759 11 March 2024, 22:52:41 UTC
83932aa refactor(compiler): rework defer block analysis (#54759) Currently we have the `deferrableDeclToImportDecl`, `deferBlocks`, `deferrableTypes` and `deferBlockDepsEmitMode` fields on the `R3ComponentMetadata` which is incorrect, because the interface is used both for JIT and AOT mode even though the information for those fields is AOT-specific. It will be problematic for partial compilation since the runtime will have a reference to the dependency loading function, but will not be able to provide any of the other information. These changes make the following refactors: 1. It changes the defer-related information in `R3ComponentMetadata` to include only references to dependency functions which can be provided both in JIT and AOT. 2. Moves the AOT-specific defer analysis into the `ComponentResolutionData`. 3. Moves the construction the defer dependency function into the compilation phase of the `ComponentDecoratorHandler`. 4. Drops support for defer blocks from the `TemplateDefinitionBuilder`. This allows us to clean up some TDB-specific code and shouldn't have an effect on users since the TDB isn't used anymore. PR Close #54759 11 March 2024, 22:52:41 UTC
64f870c fix(core): `ApplicationRef.tick` should respect OnPush for host bindings (#53718) (#53718) This commit updates `ApplicationRef.tick` to use `detectChangesInternal` for root views rather than go through the `ChangeDetectorRef.detectChanges` API which refreshes the host view without first looking at whether the view is `OnPush` and not dirty. The current behavior would hide errors in `OnPush` components that do not correctly get marked for check and would break when migrating to zoneless change detection because `markForCheck` was never called so change detection was never scheduled. The error would be surprising and blamed on switching to zoneless when in reality the issue already exists and is a problem with the component not calling `markForCheck`. However, this error is hidden today because `ApplicationRef.tick` refresh host bindings unconditionally. BREAKING CHANGE: `OnPush` views at the root of the application need to be marked dirty for their host bindings to refresh. Previously, the host bindings were refreshed for all root views without respecting the `OnPush` change detection strategy. PR Close #53718 PR Close #53718 11 March 2024, 20:46:11 UTC
d714e99 docs: bump to 2024 for copyright text (#54822) Bump copyright text to 2024 PR Close #54822 11 March 2024, 20:39:38 UTC
eaff724 fix(core): prevent infinite loops in clobbered elements check (#54425) This commit updates HTML sanitization logic to avoid infinite loops in case clobbered elements contain fields like `nextSibling` or `parentNode`. Those fields are used for DOM traversal and this update makes sure that those calls return valid results. Also this commit fixes an issue when clobbering `nodeName` causes JS exceptions. PR Close #54425 11 March 2024, 19:46:16 UTC
280a3a2 refactor(core): add `i18nNodes` in preparation for i18n hydration (#54750) An i18n message effectively acts as a dynamic template: two elements with contiguous instruction indices won't necessarily be contiguous in the DOM. For that reason, we need to maintain a mapping from instruction index to a physical DOM node in order to hydrate views with i18n, pointing to where hydration for that view should begin. PR Close #54750 11 March 2024, 18:12:43 UTC
837016c build: remove AIO related extensions (#54698) With AIO being deprecated those extensions can be removed. PR Close #54698 11 March 2024, 18:04:38 UTC
5ae2bf4 fix(compiler): handle two-way bindings to signal-based template variables in instruction generation (#54714) Updates the instruction generation for two-way bindings to only emit the `twoWayBindingSet` call when writing to template variables. Since template variables are constants, it's only allowed to write to them when they're signals. Non-signal values are flagged during template type checking. Fixes #54670. PR Close #54714 11 March 2024, 18:01:43 UTC
ffb9b44 fix(compiler-cli): flag two-way bindings to non-signal values in templates (#54714) We have a diagnostic that reports writes to template variables which worked both for regular event bindings and two-way bindings, however the latter was broken by #54154 because two-way bindings no longer had a `PropertyWrite` AST. These changes fix the diagnostic and expand it to allow two-way bindings to template variables that are signals. PR Close #54714 11 March 2024, 18:01:42 UTC
fd17b4e refactor(compiler-cli): move illegal template assignment check into template semantics checker (#54714) Moves the check which ensures that there are no writes to template variables into the `TemplateSemanticsChecker` to prepare for the upcoming changes. PR Close #54714 11 March 2024, 18:01:42 UTC
6235095 refactor(compiler-cli): move signal identification function (#54714) Moves the function that identifies signals into a separate file so that it can be reused outside of extended diagnostics. PR Close #54714 11 March 2024, 18:01:42 UTC
f86088f refactor(compiler-cli): introduce template semantics checker (#54714) Introduces a new `TemplateSemanticsChecker` that will be used to flag semantic errors in the user's template. Currently we do some of this in the type check block, but the problem is that it doesn't have access to the template type checker which prevents us from properly checking cases like #54670. This pass is also distinct from the extended template checks, because we don't want users to be able to turn the checks off and we want them to run even if `strictTemplates` are disabled. PR Close #54714 11 March 2024, 18:01:42 UTC
09a2f3d docs: adding signal inputs and model to ADEV. (#54753) Those docs are a copy from AIO. PR Close #54753 11 March 2024, 18:00:49 UTC
55c647b docs: fix typo in tutorial (#54817) PR Close #54817 11 March 2024, 17:59:49 UTC
1c9abb9 build: Unplug AIO from CI (#54765) The time has come to unplug AIO from the CI. Farewell and thanks for your services 🫡 PR Close #54765 11 March 2024, 17:59:07 UTC
81ccf5d fix(compiler): not catching for loop empty tracking expressions (#54772) Fixes that the template parser wasn't catching empty expressions in the `track` parameter of for loops. Fixes #54763. PR Close #54772 11 March 2024, 16:17:39 UTC
5b927c0 build: update to TypeScript 5.4 stable (#54743) Updates the repo to the stable version of TypeScript 5.4. PR Close #54743 11 March 2024, 16:16:55 UTC
d269c88 refactor(core): avoid additional closure for queued microtask callback (#54801) The `runCallbackOnce` closure is declared not to have any parameters itself, so it is compatible as `queueMicrotask` callback without the extra closure. This reduces the call stack by a frame and avoids the extra closure allocation. PR Close #54801 11 March 2024, 15:59:55 UTC
fa315d4 refactor(core): properly type `withBody` and `withHead` testing helpers (#54801) This commit addresses a typing mismatch, where these functions were declared to return whichever value their callback returned, but this was inaccurate: it's always a test callback function with `done` argument. PR Close #54801 11 March 2024, 15:59:55 UTC
0bcaa0e test(core): ensure async tests are awaited properly (#54801) The assertion in `packages/core/test/acceptance/after_render_hook_spec.ts:165` was prone to flakes, where Jasmine could frequently report an error: ``` Error: 'expect' was used when there was no current spec, this could be because an asynchronous test timed out at Env.expect (node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1945:15) at expect (node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8267:18) at file:///packages/core/test/acceptance/after_render_hook_spec.ts:165:12 ``` This happens because `wrapTestFn` checks for an exact type of `Promise`, which may have been patched by zone.js such that the `instanceof` condition is dependent on whether zone.js has patched the `Promise` constructor. PR Close #54801 11 March 2024, 15:59:55 UTC
484ae23 build: remove non-exisiting target from `test:ci` (#54791) This target doesn't exist any more. PR Close #54791 11 March 2024, 14:06:50 UTC
54340a9 refactor(compiler): Delete `TemplateDefinitionBuilder` acceptance test expectations (#54757) Many acceptance tests define goldens for both `TemplateDefinitionBuilder` and Template Pipeline. All such tests have had the TDB golden files removed, and the corresponding expectations adjusted. PR Close #54757 09 March 2024, 00:51:01 UTC
ef32b53 refactor(compiler): Delete `TemplateDefinitionBuilder` and helpers (#54757) `TemplateDefinitionBuilder` is the legacy template compiler, and was replaced by Template Pipeline as the default in v17.3. This PR attempts to delete `TemplateDefinitionBuilder`, `ExpressionConverter`, and various helpers (i18n context, style builder, property visitors, etc). Consider this a first pass: a lot of code has not yet been deleted (e.g. old TDB-specific test cases), and I'm sure I have missed additional helper code. PR Close #54757 09 March 2024, 00:51:01 UTC
37d1f71 Revert "fix(core): `ApplicationRef.tick` should respect OnPush for host bindings (#53718)" (#54774) This reverts commit d888da460696ee74bb4c10a19ac49e3fa1948399. 08 March 2024, 13:57:15 UTC
fb189c6 Revert "refactor(compiler): rework defer block analysis (#54700)" (#54758) This reverts commit eee620aa0013cdb6e860f402d2064c50ada46d4e. 08 March 2024, 00:20:09 UTC
8180c39 build: fix size failure (#54756) Fixes a broken size CI check. PR Close #54756 08 March 2024, 00:13:43 UTC
115ee88 fix(router): Navigations triggered by cancellation events should cancel previous navigation (#54710) There is an edge case where synchronous navigations caused in response to navigation events can result in a previous navigation not being unsubscribed from. b/328219996 PR Close #54710 07 March 2024, 21:07:08 UTC
2787c50 refactor(core): render hooks should always run on node attach or detach (#54083) This commit ensures that render hooks are rerun when a node is attached or detached. We do not necessarily need to run change detection but DOM did change so render hooks should execute. PR Close #54083 07 March 2024, 20:59:10 UTC
d4247af refactor(core): Skip refresh views if render hooks are the only notification source (#54083) Do not refresh views if the only thing that notified the scheduler was registration of a new render hook. PR Close #54083 07 March 2024, 20:59:10 UTC
53e7439 refactor(core): registering `afterRender` hooks notify scheduler (#54083) This commit updates the `afterRender` and `afterNextRender` hooks to notify the scheduler (which subsequently schedules change detection) when created. This makes the hooks similar to `requestAnimationFrame`, which requests that the browser schedule a rendering operation. This reqeust is not conditional. Even if there was nothing to repaint, the `requestAnimationFrame` callback will execute. In Angular, this is useful because callers of `afterNextRender` don't necessarily have any way of knowing whether a change detection is even scheduled. For example, the anchor scrolling with the Angular Router needs to wait for rendering to complete before attempting to scroll because rendering can affect the size of the page. However, if the user is already on the page that the navigation is targeting, such as navigating to an anchor on the page, there is nothing new for the Router to render so a render might not even be scheduled. Related to https://github.com/angular/angular/issues/53985, which could use `afterNextRender` instead of `setTimeout` to ensure the scrolling happens in the same frame as the page rendering, but would not necessarily work without this change (as described above). Note that the scrolling _cannot_ use a microtask to ensure scrolling happens in the same frame because `NgZone` will ensure microtasks flush before change detection, so it would cause the scroll to happen before rendering. PR Close #54083 07 March 2024, 20:59:09 UTC
43ab781 refactor(core): refactor i18n node creation to prepare for hydration (#54722) Adds a `locateOrCreateNode` helper and uses it for all DOM operations in preparation for supporting hydration. PR Close #54722 07 March 2024, 20:41:43 UTC
eee620a refactor(compiler): rework defer block analysis (#54700) Currently we have the `deferrableDeclToImportDecl`, `deferBlocks`, `deferrableTypes` and `deferBlockDepsEmitMode` fields on the `R3ComponentMetadata` which is incorrect, because the interface is used both for JIT and AOT mode even though the information for those fields is AOT-specific. It will be problematic for partial compilation since the runtime will have a reference to the dependency loading function, but will not be able to provide any of the other information. These changes make the following refactors: 1. It changes the defer-related information in `R3ComponentMetadata` to include only references to dependency functions which can be provided both in JIT and AOT. 2. Moves the AOT-specific defer analysis into the `ComponentResolutionData`. 3. Moves the construction the defer dependency function into the compilation phase of the `ComponentDecoratorHandler`. 4. Drops support for defer blocks from the `TemplateDefinitionBuilder`. This allows us to clean up some TDB-specific code and shouldn't have an effect on users since the TDB isn't used anymore. PR Close #54700 07 March 2024, 20:40:44 UTC
d888da4 fix(core): `ApplicationRef.tick` should respect OnPush for host bindings (#53718) This commit updates `ApplicationRef.tick` to use `detectChangesInternal` for root views rather than go through the `ChangeDetectorRef.detectChanges` API which refreshes the host view without first looking at whether the view is `OnPush` and not dirty. The current behavior would hide errors in `OnPush` components that do not correctly get marked for check and would break when migrating to zoneless change detection because `markForCheck` was never called so change detection was never scheduled. The error would be surprising and blamed on switching to zoneless when in reality the issue already exists and is a problem with the component not calling `markForCheck`. However, this error is hidden today because `ApplicationRef.tick` refresh host bindings unconditionally. BREAKING CHANGE: `OnPush` views at the root of the application need to be marked dirty for their host bindings to refresh. Previously, the host bindings were refreshed for all root views without respecting the `OnPush` change detection strategy. PR Close #53718 07 March 2024, 19:13:03 UTC
8bf842d docs: update content readme link (#53763) PR Close #53763 07 March 2024, 19:06:55 UTC
30dccd4 docs: readme from blossom (#53763) PR Close #53763 07 March 2024, 19:06:55 UTC
4f808ad docs: update events (#54721) Generated `events.json` with the latest events retrieved from the Firebase DB. PR Close #54721 07 March 2024, 19:05:36 UTC
e0c1f1e refactor(core): don't hydrate detached nodes (#54723) In preparation for hydration support, make sure that we don't attempt to hydrate detached nodes and instead, always newly create them. PR Close #54723 07 March 2024, 19:01:29 UTC
back to top