-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove deprecated middleware actions #311
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I resolved the merge conflicts by updating this to reflect the "afterSubmit" -> "afterWrite" rename in #314. |
nateps
approved these changes
Nov 20, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 💅
alecgibson
added a commit
to alecgibson/DefinitelyTyped
that referenced
this pull request
Jan 14, 2021
This change adds support for the [`suppressPublish`][1] and [`maxSubmitRetries`][2] options. We also mark `disableDocAction` and `disableSpaceDelimitedActions` as deprecated, because these were [removed][3]. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L33 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L34 [3]: share/sharedb#311
8 tasks
alecgibson
added a commit
to alecgibson/DefinitelyTyped
that referenced
this pull request
Jan 14, 2021
This change adds support for the [`suppressPublish`][1] and [`maxSubmitRetries`][2] options. We also mark `disableDocAction` and `disableSpaceDelimitedActions` as deprecated, because these were [removed][3]. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L33 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L34 [3]: share/sharedb#311
alecgibson
added a commit
to alecgibson/DefinitelyTyped
that referenced
this pull request
Jan 20, 2021
This change adds support for the [`suppressPublish`][1] and [`maxSubmitRetries`][2] options. We also mark `disableDocAction` and `disableSpaceDelimitedActions` as deprecated, because these were [removed][3]. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L33 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L34 [3]: share/sharedb#311
typescript-bot
pushed a commit
to DefinitelyTyped/DefinitelyTyped
that referenced
this pull request
Jan 20, 2021
* [sharedb] Server event support This change makes the default `sharedb` class extend `EventEmitter`, like it does [in the library][1]. We also add support for the [`error`][2] and [`timing`][3] events. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L21 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L91 [3]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L220 * [sharedb] Add MilestoneDB support The `Backend` options allow specifying a [`milestoneDb`][1], which is an instance of [`MilestoneDB`][2]. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L28 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/milestone-db/index.js#L7 * [sharedb] Update Backend options This change adds support for the [`suppressPublish`][1] and [`maxSubmitRetries`][2] options. We also mark `disableDocAction` and `disableSpaceDelimitedActions` as deprecated, because these were [removed][3]. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L33 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L34 [3]: share/sharedb#311 * [sharedb] Update Doc definitions This change makes multiple fixes to the `Doc` definition: - Add [`subscribed`][1], [`preventCompose`][2] and [`paused`][3] properties - Add [`unsubscribe()`][4] - Allow a callback in [`destroy()`][5] - Remove the error argument from [`whenNothingPending()`][6], since that method will never call the callback with an error - Add [`hasPending()`][7], [`hasWritePending()`][8], [`pause()`][9], [`resume()`][10] and [`flush()`][11] methods [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L73 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L104 [3]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L109 [4]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L424 [5]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L113 [6]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L221 [7]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L232 [8]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L243 [9]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L901 [10]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L906 [11]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L500 * [sharedb] Snapshots ShareDB allows clients to fetch snapshots through: - [`fetchSnapshot`][1] - [`fetchSnapshotByTimestamp`][2] [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/connection.js#L660 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/connection.js#L688 * [sharedb] Generic Doc and Snapshot The `Doc` and `Snapshot` types are both data wrappers around a potentially well-structured object. This change makes these types optionally generic (defaulting to `any` if no type is provided), allowing clients to enforce stricter type checking on these types if they wish. * [sharedb] Update middleware hooks The `afterSubmit` hook was [replaced with `afterWrite`][1]. [1]: share/sharedb#314 * [sharedb] Logger method overrides ShareDB exposes a special [`Logger`][1], which can be used to override ShareDB's internal logging calls, which default to using the `console`. There are two logger instances that can be configured: - [server-side][2] - [client-side][3] [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/logger/logger.js#L7 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/index.js#L8 [3]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/index.js#L6 * [sharedb] Presence support ShareDB supports "presence", which is accessed through [`getPresence`][1] and [`getDocPresence`][2], both of which return an instance of [`Presence`][3]. This functionality is hidden behind a [feature flag][4], which is also included in this change. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/connection.js#L751 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/connection.js#L758 [3]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/presence/presence.js#L8 [4]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L35 * [sharedb] Update authors * Review markups - Fix bad merge: `disableDocAction` is the deprecated field. - Make `Doc` callbacks optional - Rename `ReceivePresence` to a more obvious name
kaznovac
pushed a commit
to kaznovac/DefinitelyTyped
that referenced
this pull request
Mar 2, 2021
* [sharedb] Server event support This change makes the default `sharedb` class extend `EventEmitter`, like it does [in the library][1]. We also add support for the [`error`][2] and [`timing`][3] events. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L21 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L91 [3]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L220 * [sharedb] Add MilestoneDB support The `Backend` options allow specifying a [`milestoneDb`][1], which is an instance of [`MilestoneDB`][2]. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L28 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/milestone-db/index.js#L7 * [sharedb] Update Backend options This change adds support for the [`suppressPublish`][1] and [`maxSubmitRetries`][2] options. We also mark `disableDocAction` and `disableSpaceDelimitedActions` as deprecated, because these were [removed][3]. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L33 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L34 [3]: share/sharedb#311 * [sharedb] Update Doc definitions This change makes multiple fixes to the `Doc` definition: - Add [`subscribed`][1], [`preventCompose`][2] and [`paused`][3] properties - Add [`unsubscribe()`][4] - Allow a callback in [`destroy()`][5] - Remove the error argument from [`whenNothingPending()`][6], since that method will never call the callback with an error - Add [`hasPending()`][7], [`hasWritePending()`][8], [`pause()`][9], [`resume()`][10] and [`flush()`][11] methods [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L73 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L104 [3]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L109 [4]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L424 [5]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L113 [6]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L221 [7]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L232 [8]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L243 [9]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L901 [10]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L906 [11]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/doc.js#L500 * [sharedb] Snapshots ShareDB allows clients to fetch snapshots through: - [`fetchSnapshot`][1] - [`fetchSnapshotByTimestamp`][2] [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/connection.js#L660 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/connection.js#L688 * [sharedb] Generic Doc and Snapshot The `Doc` and `Snapshot` types are both data wrappers around a potentially well-structured object. This change makes these types optionally generic (defaulting to `any` if no type is provided), allowing clients to enforce stricter type checking on these types if they wish. * [sharedb] Update middleware hooks The `afterSubmit` hook was [replaced with `afterWrite`][1]. [1]: share/sharedb#314 * [sharedb] Logger method overrides ShareDB exposes a special [`Logger`][1], which can be used to override ShareDB's internal logging calls, which default to using the `console`. There are two logger instances that can be configured: - [server-side][2] - [client-side][3] [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/logger/logger.js#L7 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/index.js#L8 [3]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/index.js#L6 * [sharedb] Presence support ShareDB supports "presence", which is accessed through [`getPresence`][1] and [`getDocPresence`][2], both of which return an instance of [`Presence`][3]. This functionality is hidden behind a [feature flag][4], which is also included in this change. [1]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/connection.js#L751 [2]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/connection.js#L758 [3]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/client/presence/presence.js#L8 [4]: https://github.com/share/sharedb/blob/30badb22192eb04e43f983772058fb129598de51/lib/backend.js#L35 * [sharedb] Update authors * Review markups - Fix bad merge: `disableDocAction` is the deprecated field. - Make `Doc` callbacks optional - Rename `ReceivePresence` to a more obvious name
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #310
We previously deprecated the
doc
andafter submit
middleware actions in favour of
readSnapshots
andafterSubmit
respectively.
In preparation for the breaking v1.0 release, this change removes these
deprecated middlewares and their associated shims.