angular/packages
Andrew Scott 06be8034bb fix(core): Microtask scheduling should be used after any application synchronization
Previously, Angular would switch from the macrotask to a microtask
scheduler _only_ when the scheduler was the trigger for the
synchronization. This microtask scheduling is to ensure patterns such as
`Promise.resolve().then(() => updateAppStateAgain())` _during_
synchronization are caught and synchronized again within the same event
loop (guaranteeing that they aren't split across multiple browser paints).

The microtask scheduler should be used after any tick, not just from
those than run within the scheduler to always account for the promises
within synchronization. This is encountered most frequently during
bootstrap, which triggers the tick directly.

In this change we exempt `TestBed.tick` and
`ComponentFixture.detectChanges` from this behavior. Doing so would affect
the timing of stability and tests are quite sensitive to this (e.g.
`fixture.whenStable`). It is somewhat unfortunate that we have "special" test-only
behavior. However, it is important to acknowledge that this only affects
the test-only APIs as well. Any code in the application under test that
triggers `ApplicationRef.tick` directly would still use the microtask
scheduling behavior.

fixes #65444
2025-12-16 13:34:48 -08:00
..
animations build: format md files 2025-11-06 10:03:05 -08:00
benchpress build: update cross-repo angular dependencies 2025-11-26 15:50:56 -05:00
common refactor(common): remove redundant providedIn: 'root' from injection tokens 2025-12-12 08:05:30 -08:00
compiler refactor(compiler): remove unnecessary sanitization for safe attributes 2025-12-15 14:13:38 -08:00
compiler-cli refactor(compiler): remove unnecessary sanitization for safe attributes 2025-12-15 14:13:38 -08:00
core fix(core): Microtask scheduling should be used after any application synchronization 2025-12-16 13:34:48 -08:00
docs/di build: format md files 2025-11-06 10:03:05 -08:00
elements refactor(core): mark VERSION as @__PURE__ for better tree-shaking 2025-11-10 12:04:04 -08:00
examples build: enable angular formatting on all html files 2025-12-08 10:19:45 -08:00
forms refactor(forms): rename field to fieldTree in FieldContext and ValidationError 2025-12-16 10:26:22 -08:00
language-service docs(language-service): add link to hydration guide in built-in names documentation 2025-12-11 17:06:35 -08:00
localize build: remove API doc generation for localize/init and add mnemonic to API rendering rule. 2025-12-15 11:41:43 -08:00
misc/angular-in-memory-web-api build: update cross-repo angular dependencies 2025-11-26 15:50:56 -05:00
platform-browser refactor(platform-browser): remove unused platformIsServer flag from renderer 2025-12-16 10:25:10 -08:00
platform-browser-dynamic refactor(core): mark VERSION as @__PURE__ for better tree-shaking 2025-11-10 12:04:04 -08:00
platform-server build: update repository to use node 22.21.1 in bazel 2025-12-09 09:19:13 -08:00
private/testing build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
router refactor(core): correct all typeof ngDevMode comparison patterns introduced by #63875 2025-12-08 10:30:01 -08:00
service-worker refactor(core): correct all typeof ngDevMode comparison patterns introduced by #63875 2025-12-08 10:30:01 -08:00
ssr/docs build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
upgrade refactor(upgrade): deprecate VERSION export 2025-12-09 09:26:02 -08:00
zone.js ci: reformat files 2025-12-16 09:24:36 -08:00
BUILD.bazel build(forms): expose signal forms compat package 2025-11-14 09:23:36 -08:00
circular-deps-test.conf.js docs(docs-infra): lift circular imports (#63186) 2025-08-19 07:58:45 +00:00
empty.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
goog.d.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
license-banner.txt docs: update website URL in license banners (#64183) 2025-10-02 07:56:58 -07:00
package.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00
README.md build: format md files 2025-11-06 10:03:05 -08:00
system.d.ts refactor: update packages/core:{core,src} to ts_project (#61275) 2025-05-14 12:01:51 +00:00
tsconfig-build.json Revert "refactor(compiler-cli): remove deep imports from compiler-cli (#64732)" 2025-11-06 13:09:01 -08:00
tsconfig-legacy-saucelabs.json feat(core): support TypeScript 5.5 (#56096) 2024-05-29 15:33:33 +02:00
tsconfig-test.json
tsconfig.json feat(compiler-cli): enable type checking of host bindings by default (#63654) 2025-09-09 14:34:29 -07:00
tsec-exemption.json
types.d.ts build: move private testing helpers outside platform-browser/testing (#61472) 2025-05-20 10:00:43 +00:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT