From bbd186a26cedeac091de76aa226f190aae286ce6 Mon Sep 17 00:00:00 2001 From: Nicholas Jamieson Date: Sun, 2 May 2021 14:52:51 +1000 Subject: [PATCH 1/4] docs: finalize breaking change --- docs_app/content/6-to-7-change-summary.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs_app/content/6-to-7-change-summary.md b/docs_app/content/6-to-7-change-summary.md index d255176035..8e2c2b8c65 100644 --- a/docs_app/content/6-to-7-change-summary.md +++ b/docs_app/content/6-to-7-change-summary.md @@ -258,6 +258,10 @@ This document contains a detailed list of changes between RxJS 6.x and RxJS 7.x, - Generic signatures have changed. Do not explicitly pass generics. +### finalize + +- `finalize` will now unsubscribe from its source _before_ it calls its callback. That means that `finalize` callbacks will run in the order in which they occur in the pipeline: `source.pipe(finalize(() => console.log(1)), finalize(() => console.log(2)))` will log `1` and then `2`. Previously, callbacks were called in the reverse order. + ### map - `thisArg` will now default to `undefined`. The previous default of `MapSubscriber` never made any sense. This will only affect code that calls map with a `function` and references `this` like so: `source.pipe(map(function () { console.log(this); }))`. There wasn't anything useful about doing this, so the breakage is expected to be very minimal. If anything we're no longer leaking an implementation detail. From addb4233864b6cc24e5023d51814829d891cb456 Mon Sep 17 00:00:00 2001 From: Nicholas Jamieson Date: Sun, 2 May 2021 14:54:57 +1000 Subject: [PATCH 2/4] docs: fix spelling --- docs_app/content/6-to-7-change-summary.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs_app/content/6-to-7-change-summary.md b/docs_app/content/6-to-7-change-summary.md index 8e2c2b8c65..e5885ef568 100644 --- a/docs_app/content/6-to-7-change-summary.md +++ b/docs_app/content/6-to-7-change-summary.md @@ -146,7 +146,7 @@ This document contains a detailed list of changes between RxJS 6.x and RxJS 7.x, ### animationFrames -- A new method for creating a stream of animation frames. Each event will carry with it a high-resolution timestamp, and an ellapsed time since observation was started. +- A new method for creating a stream of animation frames. Each event will carry with it a high-resolution timestamp, and an elapsed time since observation was started. ### config @@ -168,7 +168,7 @@ This document contains a detailed list of changes between RxJS 6.x and RxJS 7.x, ### firstValueFrom -- A better, more tree-shakable replacement for `toPromise()` (which is now deprecated). This function allows the user to convert any `Observable` in to a `Promise` that will resolve when the source observable emits its firsr value. If the source observable closes without emitting a value, the returned promise will reject with an `EmptyError`, or it will resolve with a configured `defaultValue`. +- A better, more tree-shakable replacement for `toPromise()` (which is now deprecated). This function allows the user to convert any `Observable` in to a `Promise` that will resolve when the source observable emits its first value. If the source observable closes without emitting a value, the returned promise will reject with an `EmptyError`, or it will resolve with a configured `defaultValue`. ### ObservableInput @@ -391,7 +391,7 @@ This document contains a detailed list of changes between RxJS 6.x and RxJS 7.x, ### AjaxResponse - Now includes `responseHeaders`. -- Now includes event `type` and `total` numbers for examinining upload and download progress (see `includeUploadProgess` and `includeDownloadProgress`). +- Now includes event `type` and `total` numbers for examining upload and download progress (see `includeUploadProgress` and `includeDownloadProgress`). ### includeUploadProgress From a4fa273cc194bc0e968ed819bca9fab36ac2b4ef Mon Sep 17 00:00:00 2001 From: Nicholas Jamieson Date: Sat, 1 May 2021 17:43:27 +1000 Subject: [PATCH 3/4] docs: audit(Time) breaking changes --- docs_app/content/6-to-7-change-summary.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs_app/content/6-to-7-change-summary.md b/docs_app/content/6-to-7-change-summary.md index e5885ef568..4a82ccd67f 100644 --- a/docs_app/content/6-to-7-change-summary.md +++ b/docs_app/content/6-to-7-change-summary.md @@ -201,6 +201,11 @@ This document contains a detailed list of changes between RxJS 6.x and RxJS 7.x, ### audit - The observable returned by the `audit` operator's duration selector must emit a next notification to end the duration. Complete notifications no longer end the duration. +- `audit` now emits the last value from the source when the source completes. Previously, `audit` would mirror the completion without emitting the value. + +### auditTime + +- `auditTime` now emits the last value from the source when the source completes, after the audit duration elapses. Previously, `auditTime` would mirror the completion without emitting the value and without waiting for the audit duration to elapse. ### buffer From 7e093887d6a42338c5b85aeb3274ca0934904370 Mon Sep 17 00:00:00 2001 From: Nicholas Jamieson Date: Sat, 1 May 2021 11:42:08 +1000 Subject: [PATCH 4/4] docs: mention tighter fromEvent types --- docs_app/content/6-to-7-change-summary.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs_app/content/6-to-7-change-summary.md b/docs_app/content/6-to-7-change-summary.md index 4a82ccd67f..f6d65fdf8a 100644 --- a/docs_app/content/6-to-7-change-summary.md +++ b/docs_app/content/6-to-7-change-summary.md @@ -42,6 +42,10 @@ This document contains a detailed list of changes between RxJS 6.x and RxJS 7.x, - Generic signatures have changed. Do not explicitly pass generics. +### fromEvent + +- The `fromEvent` signatures have been changed and there are now separate signatures for each type of target - DOM, Node, jQuery, etc. That means that an attempt to pass options - like `{ once: true }` - to a target that does not support an options argument will result in a TypeScript error. + ### GroupedObservable - No longer publicly exposes `_subscribe`