forked from share/sharedb
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Updated email agent fork #4
Open
distracteddev
wants to merge
93
commits into
email-agent-fork
Choose a base branch
from
updated-email-agent-fork
base: email-agent-fork
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
The `Connection`'s `createFetchQuery` and `createSubscribeQuery` take an optional existing result array as `options.results`. It should be an array of Doc instances: https://github.com/share/sharedb/blob/1cca122c63329665ebfdeceb1984921badb0cf4d/lib/client/connection.js#L563-L567 This PR updates the docs to indicate the specific type, instead of `Object[]`.
Fix typos in query docs
📝 Remove `id` from `getOpsBulk()` documentation
Co-authored-by: Curran Kelleher <[email protected]>
[Docs] Indicate create*Query options.results is a Doc[]
Node.js 18 [has been released][1], and will be the next LTS version, so we add this to our test matrix. Node.js 12 has also been [end-of-lifed][2], and is dropped from the test matrix. [1]: https://nodejs.org/en/blog/announcements/v18-release-announce/ [2]: https://nodejs.org/en/about/releases/
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.3 to 1.13.4. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](sparklemotion/nokogiri@v1.13.3...v1.13.4) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
…iri-1.13.4 Bump nokogiri from 1.13.3 to 1.13.4 in /docs
💥 Update Node.js test matrix
The Node.js v14 `npm install` script keeps stalling. This change increases our timeout to try and let it pass.
The older version of `npm` can have issues installing packages directly from Github over SSH. This change updates our `package.json` to explicitly fetch over HTTPS.
This reverts commit e71c91b.
This reverts commit 16d7431.
It's best practice to specify a version when depending directly on a repo.
This change updates our presence documentation to highlight that disconnections can be seen with a `null` value.
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.4 to 1.13.7. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](sparklemotion/nokogiri@v1.13.4...v1.13.7) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
📌 Pin `json0` dev dependency
…iri-1.13.7 Bump nokogiri from 1.13.4 to 1.13.7 in /docs
📝 Update presence documentation
Bumps [tzinfo](https://github.com/tzinfo/tzinfo) from 1.2.9 to 1.2.10. - [Release notes](https://github.com/tzinfo/tzinfo/releases) - [Changelog](https://github.com/tzinfo/tzinfo/blob/master/CHANGES.md) - [Commits](tzinfo/tzinfo@v1.2.9...v1.2.10) --- updated-dependencies: - dependency-name: tzinfo dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
…o-1.2.10 Bump tzinfo from 1.2.9 to 1.2.10 in /docs
At the moment we can only specify one channel the specific query, would be able to listen to, as per docs: ```javascript backend.use('query', (context, next) => { // Set our query to only listen for changes on our user-specific channel context.channel = userChannel(context) next() }) ``` However let's imagine the situation where the user wants to query all the posts, the where posted by him and all his friends. Now we would need new query every for friend separately to make sure the proper scalability is preserved and we do not receive all the changes to posts collection. This change allows to listen for multiple channels, so if we want to query all user friends posts. We can do it by this: ```javascript backend.use('query', (context, next) => { // Set our query to only listen for changes on our user-specific channel context.channels = [userChannel(context), friendChannel(context))] next() }) ``` Now this query would only listen to all the changes that were made to the user posts and his friends.
…ption ✨ Add multi channel query subscription.
✨ Allow middleware to mutate submitted ops
Upgrade dependencies in examples
At the moment we sometimes get some flaky Milestone Mongo test [failures][1]. This potentially happens because milestone snapshots are saved as a [fire-and-forget request][2], which means that we technically make no guarantee about the order that snapshots are written to the database. Since this is the case, the affected tests may write the v4 snapshot before the others, and then fail assertions about earlier snapshots. This change tweaks these tests to count the snapshots instead, which should be more robust to this race condition. [1]: https://github.com/share/sharedb-milestone-mongo/actions/runs/4545270938/jobs/8012439274 [2]: https://github.com/share/sharedb/blob/404cde5568bf88d8de12186a90ba6bc168920e23/lib/submit-request.js#L223
✅ Try to fix flaky Milestone DB tests
Vite example
According to the Node.js [release schedule][1]: - v14 will be end-of-lifed on 30 April - v20 has been released This change drops v14 from our test matrix, and adds v20. [1]: https://nodejs.dev/en/about/releases/
💥 Drop Node.js 14 and add Node.js 20
In our docs, we recommend using [`reconnecting-websocket`][1] to handle websocket reconnection. However, [by default][2] that library will [buffer][3] messages when its underlying socket is closed, which can lead to [undefined behaviour][4] when ShareDB reconnects, since it works under the assumption that all messages sent as the socket is closing have been lost (eg pushing inflight ops back onto the pending queue, etc.). This change updates our documentation and our examples to set `{maxEnqueuedMessages: 0}`, which disables this buffering, and should help to avoid ShareDB reaching undefined states when reconnecting using this library. [1]: https://www.npmjs.com/package/reconnecting-websocket [2]: https://github.com/pladaria/reconnecting-websocket/blob/05a2f7cb0e31f15dff5ff35ad53d07b1bec5e197/reconnecting-websocket.ts#L46 [3]: https://github.com/pladaria/reconnecting-websocket/blob/05a2f7cb0e31f15dff5ff35ad53d07b1bec5e197/reconnecting-websocket.ts#L260 [4]: share#605
At the moment, it's possible for messages to be sent before the client- server handshake. Sending messages before the handshake has happened has undefined behaviour, and can result in errors such as in: share#605 We can't just ignore these messages, because old clients might potentially be on v1.0 of the client-server protocol, in which the server informs the client when it's ready, but not the other way around, so it's impossible to know when a client should be considered "ready", and its messages acceptable. Instead, we add a warning for clients on v1.1 who have sent a message before their handshake. In order to aid with debugging, we keep track of the first message received, and log it when the handshake is received (which means that v1.0 clients will never get such a warning).
🔊 Warn when messages are sent before the v1.1 handshake
📝 Update docs around `reconnecting-websocket`
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.
Merge email-agent fork with upstream master.