https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
2548712 build: add atscott to unavailable users (#47102) PR Close #47102 10 August 2022, 17:45:38 UTC
f4fa4af docs: clarify providers' injection in lazy loaded modules (#47094) Addresses https://github.com/angular/angular/issues/47059 I try to keep the edit as concise as possible because adding any further explanation would bring to much deeper info compared to the topic of the page Removed some convoluted info and replaced with a link to a page that should focus on the specific aspect of the matter. Conditional is obliged because IMHO that page should have a dedicated paragraph explaining various ways of populating different injectors with providers, and maybe integrating the interesting parts from the recent created page about standalone app. PR Close #47094 10 August 2022, 17:45:04 UTC
439d77e fix(router): Fix route recognition behavior with some versions of rxjs (#47098) (#47112) Some versions of rxjs cause the algorithm used in the Router to not recognize Route configs correctly. This commit updates the algorithm to be compatible in the same way as other code locations internally. Context: https://github.com/angular/angular/commit/1160b8194f78141b40d1d4885ec182d033ff2659 fixes #47089 Note: This does not have a test because I was unable to identify the version of rxjs that would cause a failure here. PR Close #47098 PR Close #47112 10 August 2022, 17:43:50 UTC
036f740 build: update github/codeql-action action to v2.1.18 (#47015) See associated pull request for more information. PR Close #47015 09 August 2022, 17:56:00 UTC
e10aa88 docs: add antoniocardenas to GDE resources (#47033) PR Close #47033 09 August 2022, 17:02:12 UTC
38d23af docs: change "zone" to "ngZone" in an example (#47079) Change requesting "this.zone" to "this.ngZone" in the Plotly example, as it corresponds to the name declared in the constructor. PR Close #47079 09 August 2022, 17:01:27 UTC
923a744 build: update eslint dependencies to v5.33.0 (#47087) See associated pull request for more information. PR Close #47087 09 August 2022, 17:00:11 UTC
874d78b docs: add more documentation about lint messages (#47019) Adds suggestions for how to resolve the most common messages produced by the documentation linter. Adds links to the Proselint and other style tests to the new documentation. Updates pullapprove and navigation. PR Close #47019 08 August 2022, 18:34:56 UTC
8d18969 docs: updated reference link to NativeScript/Angular documentation (#47063) PR Close #47063 08 August 2022, 18:34:21 UTC
2106b74 refactor: improve disabled attribute warning (#47041) Users using the "disabled" property binding on reactive form controls would want to know how to dynamically update the disabled state of a form control when they get a console warning. PR Close #47041 08 August 2022, 18:33:53 UTC
5ff715c fix(core): check if transplanted views are attached to change detector (#46974) Prevents change detection on views transplanted in OnPush components that have been detached from change detection. PR Close #46974 08 August 2022, 18:33:29 UTC
30c9e80 docs: fix dependecy injection documentation page typos (#47057) PR Close #47057 08 August 2022, 18:33:05 UTC
0392feb fix(docs-infra): fix nav css on tutorial tour of heroes (#47064) Fix the navigation button to work properly by the css style applied when the button is active, on tutorial Tour of Heroes. PR Close #47064 08 August 2022, 18:32:40 UTC
6d215d3 refactor(core): remove unused module tracking (#47066) We used to track all modules in a top-level constant called `autoRegisterModuleById` which was used by `getRegisteredNgModuleType`. As of #45024 the constant isn't being used anymore so we can remove it. PR Close #47066 08 August 2022, 18:32:17 UTC
e46972a docs: fix text formatting for paragraph in Hierarchical injectors (#47067) Paragraph of text is not wrapped into `p` tag due to missing empty line after the `div` block. The fix is just add an empty line. PR Close #47067 08 August 2022, 18:31:44 UTC
2e42bb9 docs: update link to the TypeScript handbook (#47075) Closes #47070 PR Close #47075 08 August 2022, 18:31:19 UTC
d14235c ci: invalidate circleci caches to prune nested `node_modules` (#46707) Yarn 1.x. is known to not prune nested unused node modules. This throws off Bazel when the dependency tree changes but there are leftover unused nested node module folders. This causes CI failures currently after the dependency tree updates. Invalidating the cache fixes this issue. Long-term a switch to Yarn 2.x+, pnpm will fix this. PR Close #46707 08 August 2022, 16:23:56 UTC
befd650 build: update all non-major dependencies (#46707) See associated pull request for more information. PR Close #46707 08 August 2022, 16:23:56 UTC
fd2abeb docs: fix link in dependency injection guide (#47055) PR Close #47055 08 August 2022, 16:23:06 UTC
387f4a7 docs: update dependency injection content (#44466) Refactored the DI section to improve doc quality, reduce cognitive load and drive consistency. - Added an overview with prerequisites and doc cards that point to rest of the DI content - Added introduction topic with topic purpose, value proposition and "fail fast" - Broke apart complex concepts into simpler tasks - Unified tone and language for each topic - Added new content based on SME feedback - Deleted obsolete content PR Close #44466 05 August 2022, 17:06:14 UTC
8f32c09 build: update io_bazel_rules_sass digest to 697e5a0 (#47046) See associated pull request for more information. PR Close #47046 05 August 2022, 16:57:45 UTC
04b3497 build: update `ngsw-config.json` after redirect changes (#47048) Looks like the `ngsw-config.json` file needs to be updated after a new redirect being added in: https://github.com/angular/angular/pull/46820. PR Close #47048 05 August 2022, 16:56:57 UTC
d0e3ad5 refactor(docs-infra): update `safevalues` and account for API changes (#47048) Updates `safevalues` to unblock https://github.com/angular/angular/pull/46707. As part of this commit the necessary refactorings due to API changes are also made. PR Close #47048 05 August 2022, 16:56:57 UTC
c7fed38 refactor(router): Cherry-pick Router services to be providedIn: 'root' (#47052) Recent refactoring in the Router made services available via `providedIn: 'root'`. However, some of these changes were not merged to the patch branch. This commit updates the remaining services needed to create the `Router` without `RouterModule` and adds a test to ensure it works. PR Close #47052 05 August 2022, 16:36:11 UTC
1d39ab6 build: update io_bazel_rules_sass digest to 70ffe01 (#47023) See associated pull request for more information. PR Close #47023 04 August 2022, 20:08:42 UTC
fce4ea1 docs: add yarn build fail workaround on windows (#47037) PR Close #47037 04 August 2022, 20:08:19 UTC
2a833e6 ci: fix Renovate post-upgrade task command (#47040) Since Renovate runs from the project directory, it cannot find the `sync-deps` yarn script inside `aio/tools/examples/shared/`: [example failure][1] Update the post-upgrade task command to run inside that directory instead of the project root. [1]: https://github.com/angular/angular/pull/46707#issuecomment-1203335639 PR Close #47040 04 August 2022, 20:07:56 UTC
d0f4f1d docs: update Vale installation instructions (#47031) This update includes: * installation directions for the current version of the Vale VSCode extension (v. 0.15.0) * a workaround for if the current version of the extension doesn't work. PR Close #47031 04 August 2022, 00:35:31 UTC
3ee883e fix(docs-infra): do not require `@ngModule` tag on standalone types (#47024) This commit updates docs extraction logic to avoid requiring the `@ngModule` tag on standalone types, since they don't have to be present in any NgModule. PR Close #47024 03 August 2022, 18:04:56 UTC
b868f1c release: cut the v14.1.1 release 03 August 2022, 17:48:18 UTC
efb8e3e docs(core): Update inject error documentation (#47020) The inject function is also available when using EnvironmentInjector.runInContext. PR Close #47020 03 August 2022, 01:06:55 UTC
8085fe3 build: update eslint dependencies to v5.32.0 (#47016) See associated pull request for more information. PR Close #47016 02 August 2022, 18:59:42 UTC
9edfe4a build(docs-infra): ensure all boilerplate dependencies are in sync (#47009) All docs examples share the same `node_modules/` (symlinked into each example from `aio/tools/examples/shared/node_modules/`). However, each example type has a different `package.json`, which comes from `aio/tools/examples/shared/boilerplate/*`). In order to ensure that the dependencies in each example's `package.json` are the same as the ones in the symlinked `node_modules/` (i.e. the ones that CI tests are run with), we have a script (`yarn run sync-deps`) that can sync dependencies from `shared/package.json` into the boilerplate `package.json` files. Previously, this script had to be run manually, which was easy to forget/not know about and resulted in the boilerplate dependencies often being out-of-sync with the ones in `shared/package.json` (and by extension, the ones that were actually installed in `node_modules/`). This commit helps keep the boilerplate dependencies up-to-date in the following ways: - Adds the `sync-deps` script to the `postinstall` scripts. This ensures that dependencies remain in sync whenever someone manually updates dependencies in `shared/package.json`. - Runs the `sync-deps` script as a Renovate post-upgrade task. This ensures that the depenencies remain in sync whenever Renovate updates dependencies in `shared/package.json`. For more info on configuring post-upgrade tasks in Renovate, see: - [postUpgradeTasks][1] - [allowedPostUpgradeCommands][2] - [allowPostUpgradeCommandTemplating][3] NOTE: For the Renovate change to take effect, the [global config][4] in `angular/dev-infra` also needs to be updated. This will be done in a separate PR. [1]: https://docs.renovatebot.com/configuration-options/#postupgradetasks [2]: https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands [3]: https://docs.renovatebot.com/self-hosted-configuration/#allowpostupgradecommandtemplating [4]: https://github.com/angular/dev-infra/blob/22d3067021130271afcfd02d063828c5bdd9c2d7/.github/ng-renovate/runner-config.js PR Close #47009 02 August 2022, 18:58:51 UTC
79825d3 fix(router): Do not call preload method when not necessary (#47007) In Angular 14, we introduced the `loadComponent` API for a `Route` to allow lazy loading of a routed component in addition to the existing `loadChildren` which allows lazy loading of child routes. As a result, the `preload` method of the `PreloadingStrategy` needs to sometimes be called even when there is a `canLoad` guard on the `Route`. `CanLoad` guards block loading of child routes but _do not_ block loading of the component. This change updates the conditional checks in the internal preloader to skip calling the `PreloadingStrategy.preload` when there is only a `loadChildren` callback with a `canLoad` guard an no `loadComponent`. In this case, the callback passed to the `preload` method is already effectively a no-op so it's not necessary to call it at all. resolves #47003 PR Close #47007 02 August 2022, 16:38:28 UTC
4e9492c build: update dev-infra packages and account for build-tooling split from `ng-dev` (#46976) The dev-infra build tooling is now decoupled from `ng-dev`. This will make it easier to update `ng-dev` without necessarily needing to upgrade the whole build system, Bazel etc. This is useful when e.g. new release tool features have been added and should also be ported to active LTS branches. PR Close #46976 02 August 2022, 16:37:38 UTC
3f162f5 refactor(common): Align PathLocationStrategy constructor with default factory (#46929) When using the Angular Router, one of `APP_BASE_HREF` or a `<base>` in the header must be provided. When _not_ using the `RouterModule`, injecting the `LocationStrategy` will result in the `PathLocationStrategy` being provided with a default value used in place of `APP_BASE_HREF` that is `document?.location?.origin ?? ''`. It can be quite surprising and annoying that once you add `RouterModule` to the application, suddenly the `APP_BASE_HREF` must be specifically provide something new when it could use a sensible default instead. The current behavior (before this commit) is as follows: * When `RouterModule` is not provided (or the dev doesn't specifically provide `PathLocationStrategy`): use `DOCUMENT.location?.origin ?? ''`. Note that the base href in the dom and `APP_BASE_HREF` are not used. * When `RouterModule` _is_ provided: 1. APP_BASE_HREF if defined 2. Get base href from DOM 3. throw if neither of the two above are defined This commit updates this behavior to be aligned regardless of `RouterModule` usage. The order (by default) is now: 1. Developer provided `APP_BASE_HREF` 2. base href from the DOM 3. `location.origin` 4. If none of the above exist, use `''` This is slightly different than the behavior before. However, I believe it is more appropriate. For the case without `RouterModule`, it would likely be surprising that `APP_BASE_HREF` and the base href from the DOM are ignored by default. For the case with `RouterModule`, we now have a more sensible fallback/default when neither `APP_BASE_HREF` nor `<base>` are defined (instead of just throwing an error). PR Close #46929 01 August 2022, 21:21:14 UTC
b6445c4 docs: fix link to live example (#47011) Fixes #46975 PR Close #47011 01 August 2022, 21:20:37 UTC
d05d05e docs: fix link in routing (#46988) PR Close #46988 01 August 2022, 20:00:25 UTC
7a7452d build: update bazel setup to v5.5.3 (#47000) See associated pull request for more information. PR Close #47000 01 August 2022, 19:55:44 UTC
05f3f74 fix(router): Use correct return type for provideRoutes function (#46941) The provideRoutes function of the Router returns a Provider array and should not be typed as 'any' PR Close #46941 01 August 2022, 18:20:50 UTC
6307f35 refactor(router): Remove unused ANALYZE_FOR_ENTRY_COMPONENTS (#46942) `entryComponents` is a feature that is not used or necessary in Angular anymore. PR Close #46942 01 August 2022, 18:18:10 UTC
ce6ad5a docs: fix selector in Component Interaction guide (#46995) The selector for the `CountdownTimerComponent` is `app-countdown-timer` not `countdown-timer`. PR Close #46995 01 August 2022, 18:16:31 UTC
cbfd91b docs: fixed typos (#47008) Used my script: https://github.com/Uziel302/websites-spell-checker/blob/master/mdnversion PR Close #47008 01 August 2022, 18:15:55 UTC
8cd95d4 refactor(zone.js): remove leftover debugging code using `Error.stack` (#46989) Pull request #46672 added some debugging code to trace down the root cause of its bug, but parts of the debugging code has never been cleaned up and ended up landing as part of the PR. This commit removes the code as it might cause unexpected issues. Likely when e.g. `Error` is patched and would perform XHRs in testing, unveiling e.g. CORS issues. See #46989. PR Close #46989 01 August 2022, 16:52:30 UTC
ec00075 refactor(compiler-cli): remove unused error codes (#46847) A few codes were unused, or no longer used. PR Close #46847 01 August 2022, 16:50:12 UTC
a0a6353 fix(bazel): allow extendedDiagnostics option to be passed in through tsconfig (#46953) Adds the `extendedDiagnostics` field to the list of allowed options so that it is picked up from the user's tsconfig. PR Close #46953 01 August 2022, 16:49:14 UTC
8dcd3cd build: update eslint dependencies to v5.31.0 (#46968) See associated pull request for more information. PR Close #46968 01 August 2022, 16:46:41 UTC
677fe6a build: update io_bazel_rules_sass digest to 030f696 (#46947) See associated pull request for more information. PR Close #46947 01 August 2022, 16:40:03 UTC
5d8394c build: update dependency google-closure-compiler to v20220719 (#46926) See associated pull request for more information. PR Close #46926 01 August 2022, 16:39:26 UTC
acdb28d build: update cross-repo angular dependencies to 6d9c069 (#46905) See associated pull request for more information. PR Close #46905 01 August 2022, 16:38:35 UTC
c5a5165 docs: modify callout in TOH part 2 (#46964) PR Close #46964 01 August 2022, 16:30:04 UTC
71831c6 docs: fix typo in guide/structural-directives page (#46961) Fix typo [missing plural marker "element_s_"] on https://angular.io/guide/structural-directives. Original: >Structural directives are directives which change the DOM layout by adding and removing DOM element. Fix: >Structural directives are directives which change the DOM layout by adding and removing DOM element**s**. PR Close #46961 01 August 2022, 16:29:40 UTC
3511373 docs: initial upload of styles used by doc linter (#46897) Add the configuration and style files to support documentation linting. The `README.md` file includes instructions for installation and use of the lint tool. PR Close #46897 01 August 2022, 16:29:06 UTC
ff7c716 build: update doc approvers (#46939) Remove: TMDavis, who is no longer at Google Add: bob-watson who is now on the team PR Close #46939 22 July 2022, 15:39:34 UTC
6b779b1 docs: add missing period to the Security guide (#46900) PR Close #46900 22 July 2022, 15:37:30 UTC
1eb77a2 docs: add simona cotin to contributors (#46922) PR Close #46922 22 July 2022, 08:27:08 UTC
929d69e docs(router): remove incorrect deprecation text in `InitialNavigation` (#46916) Remove left over deprecation note. PR Close #46916 22 July 2022, 08:26:25 UTC
f5d764d refactor(router): Update internal INITIAL_NAVIGATION token to use an enum (#46925) This updates the internal use of INITIAL_NAVIGATION to do two things: 1. Explicitly provide `Enabled` as the default for the token factory 2. Use an enum instead of a string to reduce bundle size PR Close #46925 22 July 2022, 08:25:37 UTC
55f485b refactor(platform-server): include TransferState providers into ServerModule (#46899) This commit updates the code to include the TransferState providers (used for serialization) into the `ServerModule` instead of having the need to import the `ServerTransferStateModule` separately. The list of providers in the `ServerTransferStateModule` is now empty and importing it is a noop. This is not a breaking change, since the `ServerModule` must be included anyways to make server rendering work correctly. PR Close #46899 21 July 2022, 12:17:43 UTC
3606917 fix(core): improve the missing control flow directive message (#46903) Similarly to what has been done in #46846 for the extended diagnostics about missing control flow directive that was only mentioning that the `CommonModule` should be imported, this commit improves the validation done by the JiT compiler. Now that the control flow directives are available as standalone, the message mentions that directive itself can be imported. The message now also mentions which import should be used for the directive (as it can be tricky to figure out that `NgForOf` is the directive corresponding to `*ngFor`). PR Close #46903 21 July 2022, 08:27:32 UTC
0cbbd6a refactor(router): Update Router to be `providedIn: 'root'` (#46914) This commit updates the Router itself to be `providedIn: 'root'` with a factory function rather than provided in the `RouterModule`. PR Close #46914 20 July 2022, 19:21:05 UTC
a8e9247 refactor(platform-server): make `TransferState` standalone-friendly (#46879) This commit updates the `TransferState` to make it `providedIn: 'root'`. This makes the entire `BrowserTransferStateModule` module unnecessary, so it got deprecated as well. The `ServerTransferStateModule` is still retained, but the `renderApplication` function now also includes the necessary tokens to serialize the `TransferState` automatically, so when using the `renderApplication` function, there is no need to include `ServerTransferStateModule` as well. This change is a part of the ongoing efforts to update the shape of the FW APIs to make them standalone-friendly (so there is no need to import any NgModules). PR Close #46879 20 July 2022, 18:05:08 UTC
793326d release: cut the v14.1.0 release 20 July 2022, 17:44:59 UTC
10d46b4 refactor(bazel): remove `experimental_extended_template_diagnostics` flag (#46898) Extended diagnostics are enabled by default now and this flag doesn't do anything anymore but I missed it in a previous cleanup. PR Close #46898 20 July 2022, 15:50:45 UTC
b744bf6 refactor(compiler-cli): improve error for non-exported non-standalone (#46114) improve the error message for non-standalone components which are not exported from their module, and that are also imported directly as if they were standalone this change simply adds the suggestion to the developer to import the ngModule instead resolves #46004 PR Close #46114 20 July 2022, 15:50:01 UTC
2e5bd88 refactor(core): NgModuleRef should not implement EnvironmentInjector interface (#46896) This commit refactors the `NgModuleRef` implementation to drop functions required by the `EnvironmentInjector` interface. Previously the idea was that the `NgModuleRef` can act as an Injector to facilitate easier transition to standalone. However, from the mental model perspective, the `NgModuleRef` has the `injector` field, which is the correct injector reference and can be used is needed as an `EnvironmentInjector`. PR Close #46896 20 July 2022, 15:49:15 UTC
9b8ea9b Revert "fix(core): Fix `runInContext` for `NgModuleRef` injector (#46877)" (#46896) This reverts commit 14081dc48dfc9adbeac1c761ad9658b21f0ae775. PR Close #46896 20 July 2022, 15:49:15 UTC
eb91035 build: update cross-repo angular dependencies to cdaaa15 (#46853) See associated pull request for more information. PR Close #46853 20 July 2022, 15:48:45 UTC
17e2a2a docs: add info about request timeouts (#46882) * Adds a short note about how service workers report request timeouts * Updated heading levels to present a clearer hierarchy and cleaner local TOC * Removed documentation lint errors * Moves the service worker service timeout paragraph to a more logical topic in service-worker-devops * Removes line error from the more logical topic. * address feedback from PR review comments fixes #46445 PR Close #46882 20 July 2022, 15:48:00 UTC
b431b5c test: convert `source-map` core tests to use `async/await` instead of `fakeAsync` (#46888) The source map tests rely on asynchronous logic from the `source-map` package. The tests itself are written using `fakeAsync` but this unnecessarily complicates the interaction with the asynchronous source-map helpers/package. To fix this, we just make the tests use async/await as we don't intend to test fakeAsync in this `describe` block.. PR Close #46888 19 July 2022, 16:40:57 UTC
bc371da build: disable jasminewd2 types for sourcemap playground test (#46888) The sourcemap test in the e2e playground is now using async/await code. This results in errors now with the Bazel TS compilation because it detects that `expect` is returning a promise and should be awaited. This happens due to the jasminewd2 types. We should just use the actual jasmine types and not rely on the deprecated selenium control flow, using explicit async/await in the whole test. This also solves the issue with the source-map types being async/await now. PR Close #46888 19 July 2022, 16:40:57 UTC
36361b0 test: update source-map tests to account for `source-map` breaking change (#46888) The source-map package now requires the `SourceMapConsumer`/`SourceMapGenerator` classes to be instantiated asynchronously. This commit updates our tests to account for that. PR Close #46888 19 July 2022, 16:40:57 UTC
38f53a5 build: remove `source-map` package from `compiler-cli` bundling external list (#46888) The source-map package is no longer explicitly used in the `compiler-cli` package and therefore can be removed from the ESBuild bundling, denoting it as external. This should be a noop. PR Close #46888 19 July 2022, 16:40:56 UTC
8de3d09 build: update source-map package to latest version (#46888) The source-map package is updated as part #46707, but the minor version bump introduced breaking changes. This commit extracts the update so that we can handle it separately accounting for the breaking changes. Also removing the caret since this package apparently makes breaking changes in minor segment bumps. PR Close #46888 19 July 2022, 16:40:56 UTC
945a3ad fix(core): Fix `runInContext` for `NgModuleRef` injector (#46877) The `runInContext` for `NgModuleRef` was previously an infinite loop. PR Close #46877 19 July 2022, 16:37:32 UTC
88003e2 build: update github/codeql-action action to v2.1.16 (#46885) See associated pull request for more information. PR Close #46885 19 July 2022, 16:05:06 UTC
a4cba79 build: update eslint dependencies to v5.30.7 (#46884) See associated pull request for more information. PR Close #46884 19 July 2022, 16:04:37 UTC
6ca7a79 build: update babel dependencies to v7.18.9 (#46883) See associated pull request for more information. PR Close #46883 19 July 2022, 16:04:09 UTC
e95ee96 refactor(router): Update TitleStrategy to useFactory (#46876) The implementation of the `DefaultTitleStrategy` was modeled after the existing strategy patterns in the Router. These patterns were developed before the `providedIn` syntax for injectables. We can simplify the model a lot by providing the default in the factory of the abstract class. Note that the other strategy patterns aren't touched in this PR due to how long they've existed. Because they have been there for such a long time, it's possible there will need to be some adjustments to code if/when they are refactored to do the same. PR Close #46876 18 July 2022, 22:02:19 UTC
536ded2 fix(animations): make sure falsy values are added to _globalTimelineStyles (#46863) style values get added to the `_globalTimelineStyles` map in order to keep them so that they can be used across different timelines `_globalTimelineStyles` was previously a plain object but has been refactored to a map in #44482, as part of the update a check has been changed from a ternary operation to an or (||), causing falsy values (as 0) not to be added to the map anymore, apply the nullish coalescing operator (??) instead to make sure only `undefined` and `null` are filtered out also since this aspect was clearly not covered by tests, add a new test to ensure that such regression doesn't happen in the future resolves #46833 PR Close #46863 18 July 2022, 21:46:13 UTC
6b8e60c fix(compiler-cli): improve the missingControlFlowDirective message (#46846) The extended diagnostics about missing control flow directive was only mentioning that the `CommonModule` should be imported. Now that the control flow directives are available as standalone, the message mentions that directive itself can be imported. The message now also mentions which import should be used for the directive (as it can be tricky to figure out that `NgForOf` is the directive corresponding to `*ngFor`). PR Close #46846 18 July 2022, 19:56:08 UTC
5004b6e test: update tests to not run jasmine `done` function in sync-test zone from `describe` block There are some ZoneJS tests that fork the zone from the `describe` block for testing the zone patching. This does cause the Jasmine `done` function later in `it` specs to be invoked in the sync-test zone from the original `describe` block. The `done` implementation now has changed with the Karma Jasmine update and breaks because it now causes tasks to be scheduled. It is conceptually incorrect/invalid to take the describe sync zone and run test logic with that sync zone. ``` An error was thrown in afterAll error properties: Object({ originalStack: 'Error: Cannot call jasmine.execute().forceTask from within a sync test (syncTestZone for jasmine.describe#FileReader). at new ZoneAwareError (packages/zone.js/test/browser_test_rollup.umd.js:98:37) at e.onScheduleTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:158:196) at e.scheduleTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:14:7529) at t.scheduleTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:14:3539) at t.scheduleMicroTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:14:3791) at r.execute (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:166:4312) at queueRunnerFa ... at <Jasmine> ``` 18 July 2022, 17:19:30 UTC
6c08635 feat(zone.js): include jasmine `describe` block name when raising unexpected task error As mentioned in the previous commit that ensured that the Zone name is included in errors raised by the `SyncTestZoneSpec`, we can now include the Jasmine describe block descriptions in such errors. Errors can often happen when users accidentally try to set up Angular tests without an `it` block. Resulting in errors where it's not clear at all which describe block (of potentially a large repository) is involved: ``` An error was thrown in afterAll error properties: Object({ originalStack: 'Error: Cannot call XX from within a sync test. at new ZoneAwareError (packages/zone.js/test/browser_test_rollup.umd.js:98:37) at e.onScheduleTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:158:196) at e.scheduleTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:14:7529) at t.scheduleTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:14:3539) at t.scheduleMicroTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:14:3791) at r.execute (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:166:4372) at queueRunnerFa ... at <Jasmine> ``` We now include the describe block description in the error, so that it is easier to figure out the location of the culprit code. 18 July 2022, 17:19:30 UTC
f0add81 feat(zone.js): include zone name when sync-test zone reports tasks The sync-test zone is used in e.g. `describe` to raise an error when there is asynchronous code scheduled in describe blocks. This commit includes the zone name in such thrown errors to allow for us to include the jasmine describe name in the error. This will be wired up in the jasmine zonejs patches separately. 18 July 2022, 17:18:49 UTC
21e7584 test: fix `fake-async-test` spec to properly test prefixed animation frame functions In the fake async test for `zone.js` there is some logic to test various prefixes of the request animation frame functions. This logic does not have any effect currently, except for generating the same test at maximum three times. This commit fixes the test to actually test what it meant to do initially. 18 July 2022, 17:18:49 UTC
92c9661 test: update tests to account for `karma-jasmine` v5.0.0 Karma jasmine updated the `jasmine-core` dependency. Jasmine is now more strict when: * The done callback is invoked multiple times * The done callback is used, while a promise is also returned * The done callback is treated as error when e.g. a number is returned as first argument. This was the case with `requestAnimationFrame`. 18 July 2022, 17:18:49 UTC
a462f91 fix(core): do not invoke jasmine `done` callback multiple times with `waitForAsync` Currently tests written using `waitForAsync` would be prone to Jasmine warnings or errors (depending on the version) for tests incorrectly invoking asynchronous jasmine `done` callbacks multiple times. This can happen because the async test zone logic schedules the `done` callback to be called using `setTimeout`, but this could be invoked multiple times, causing multiple `done` invocations to be scheduled. Most of the issues have been resolved with #45025, but it does not solve the case of multiple tasks finished and callbacks being scheduled. Technically, the current logic is built in way that _should_ result in `_finishCallbackIfDone` and eventually the `done` callback to be invoked at maximium once. This is unfortunately not the case in some rather advanced/unexpected scenarios (like our AngularJS upgrade tests) where the scenario is the following (and microtasks from before the actual `waitForAsync` spec are still completing -- which is valid): ``` 1. A test `beforeEach` schedules a microtask in the ProxyZone. 2. An actual empty `it` spec executes in the AsyncTestZone` (using e.g. `waitForAsync`). 3. The `onInvoke` invokes `_finishCallbackIfDone` because the spec runs synchronously. 4. We wait the scheduled timeout (see below) to account for unhandled promises. 5. The microtask from (1) finishes and `onHasTask` is invoked. --> We register a second `_finishCallbackIfDone` even though we have scheduled a timeout. --> we execute the `done` callback twice because the async zone spec state is "stable" ``` 18 July 2022, 17:18:49 UTC
aa8d3ed build: update dependency karma-jasmine to v5 | datasource | package | from | to | | ---------- | ------------- | ----- | ----- | | npm | karma-jasmine | 4.0.2 | 5.1.0 | 18 July 2022, 17:18:49 UTC
2ca404d docs: fix code style (#46862) PR Close #46862 18 July 2022, 16:44:21 UTC
f9edb77 refactor(forms): simplify group builder function (#46844) Applies the same logic that we have in the `control` function. PR Close #46844 15 July 2022, 22:02:20 UTC
c195c3f refactor(core): annotate `ComponentMirror` object fields as readonly This commit updates the `inputs` and `outputs` objects of the `ComponentMirror` to mark their properties as readonly. 15 July 2022, 21:58:58 UTC
114011d refactor(core): move the code to avoid circular dependencies This commit refactors the code to move some functions around to avoid circular dependencies in TS imports. The newly added functions are now located in the `packages/core/src/render3/component.ts` file (instead of `packages/core/src/render3/component_ref.ts`), which is a better place for them anyway. 15 July 2022, 21:58:58 UTC
b515381 feat(core): add `reflectComponentType` function This commit introduces a new function that allows creating a object which exposes a number of getters to retrieve information about a given component. 15 July 2022, 21:58:58 UTC
e8e8e5f feat(core): add `createComponent` function This commit introduces a new function that allows creating a `ComponentRef` instance based on provided Component and a set of options. The function can be used to cover a number of use-cases where the `ComponentFactory` symbol was used previously. 15 July 2022, 21:58:58 UTC
08fb7bc Revert "Revert "build: update cross-repo angular dependencies to 84dd092 (#46848)" (#46849)" (#46852) This reverts commit b2a74469de7b29f8700b1673fd5302c30fc99afc. PR Close #46852 15 July 2022, 21:41:59 UTC
6d70927 Revert "build: update cross-repo angular dependencies to 84dd092 (#46848)" (#46849) This reverts commit 510f45957a4fa43fbdec10f62451ae4c4aa6fa23. PR Close #46849 15 July 2022, 17:52:46 UTC
571d7de build: update cross-repo angular dependencies to 84dd092 (#46848) See associated pull request for more information. PR Close #46848 15 July 2022, 16:00:34 UTC
b1ba642 docs(core): document that destroyAfterEach is true by default (#46845) PR Close #46845 15 July 2022, 15:50:36 UTC
6c104a2 build: Add Jessica and Andrew K to docs-infra (#46843) This adds two people to the docs-infra pullapprove group. PR Close #46843 15 July 2022, 15:46:06 UTC
5e09cd1 build: update cross-repo angular dependencies (#46834) See associated pull request for more information. PR Close #46834 14 July 2022, 22:35:09 UTC
back to top