Skip to content
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

chore(deps): bump better-sse from 0.9.0 to 0.10.0 #316

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 16, 2023

Bumps better-sse from 0.9.0 to 0.10.0.

Release notes

Sourced from better-sse's releases.

v0.10.0

Better SSE Version 0.10.0

npm install better-sse@latest
yarn add better-sse@latest
pnpm add better-sse@latest

This release adds the ability to batch and send multiple events in a single transmission.

In addition, it adds the new EventBuffer class for users who still want to write out raw spec-compliant SSE fields into a text buffer that can be sent directly over the wire, but without all of the extra functionality that using a Session provides.

Changes

Event batching (#42)

You can now batch and send multiple events in a single transmission using the new Session#batch method, saving bandwidth and greatly improving performance in cases where you need to send multiple events at a time.

To do so, simply invoke the batch method and pass a callback that takes an EventBuffer as its first argument:

await session.batch(async (buffer) => {
  await buffer.iterate(<my huge event list>);
});

You can use the same helper methods as you would with a session itself (push, iterate and stream).

When your callback finishes execution - or resolves if it returns a promise - every event created with the buffer will be sent to the client all at once in a single network transmission.

See the API documentation for more.

New EventBuffer class

The new EventBuffer class allows you to write raw spec-compliant SSE fields into a text buffer that can be sent directly over the wire.

This is useful for users who do not need all the extra functionality that a Session provides and instead want fine-grained control over the individual event fields they want to send to the client.

This is an advanced use-case. For most users, you should still stick with using Session by default.

import { createEventBuffer } from "better-sse";
</tr></table>

... (truncated)

Changelog

Sourced from better-sse's changelog.

0.10.0 - 2023-09-28

Added

  • Added the Session#batch method that can be used to batch multiple events into a single transmission over the wire.
  • Added the EventBuffer class that can be used to write raw spec-compliant SSE fields into a text buffer that can be sent directly over the wire.

Deprecated

  • Deprecate the Session .event, .data, .id, .retry, .comment, .dispatch and .flush methods in favour of using event buffers instead.
Commits
  • 2c34275 Merge pull request #54 from MatthewWid/batching
  • be6e62f docs: bump version to 0.10.0. add latest changes to changelog
  • 397f04d feat: session event batching
  • e40374b docs: channel broadcast method tsdoc docs
  • f2ea897 Merge pull request #53 from MatthewWid/event-buffer
  • d8c87c8 docs: add event buffer changes to changelog
  • b44e90a docs: event buffer api docs and deprecate session buffer management methods
  • 08dd7f6 feat: event buffer stream and iterable support
  • 341314f feat!: move buffer modification functionality to separate EventBuffer class
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Oct 16, 2023
@vercel
Copy link

vercel bot commented Oct 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
revert-client ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2023 0:34am

Bumps [better-sse](https://github.com/MatthewWid/better-sse) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/MatthewWid/better-sse/releases)
- [Changelog](https://github.com/MatthewWid/better-sse/blob/master/CHANGELOG.md)
- [Commits](MatthewWid/better-sse@v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: better-sse
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@jatinsandilya jatinsandilya merged commit a124991 into main Dec 1, 2023
2 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/better-sse-0.10.0 branch December 1, 2023 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant