Skip to content

Releases: partykit/partykit

partykit@0.0.9

08 Sep 20:19
841497a
Compare
Choose a tag to compare

Patch Changes

partykit@0.0.8

08 Sep 17:48
a77e59d
Compare
Choose a tag to compare

Patch Changes

  • #329 9a55f69 Thanks @threepointone! - change naming of /server exports

    This changes the naming of our exported types from partykit/server. The motivation here was aesthetic/simplification. Most of the exports los the Party prefix; i.e. PartyServer becomes Server, PartyConnection becomes Connection, and so on. If you look at the class example, this doesn't drastically change the code; the import becomes a lot shorter (import type * as Party from 'partykit/server' gets all the required types) and required types are taken by Party.*.

    I also did a run on all the docs/templates and the blog post, but lemme know if I missed anything!

  • #333 dc324d9 Thanks @threepointone! - fix: init doesn't install the right versions of packages

    This fix should pick up the latest versions of partykit /partysocket when installing. We were using the previous beta logic when every package was on the same version. This patch picks up the latest versions of both and uses it.

    (also sneaking in a quick types fix for usePartySocket)

  • #334 9e46880 Thanks @jevakallio! - Fix create-partykit crash issue by downgrading "ink" dependency to last known good version

partysocket@0.0.3

04 Sep 15:36
bd8323a
Compare
Choose a tag to compare

Patch Changes

partykit@0.0.7

04 Sep 15:36
bd8323a
Compare
Choose a tag to compare

Patch Changes

  • #274 30fabc9 Thanks @threepointone! - don't compile node builtins that the platform supports

    We support some node builtins, so we shouldn't try to compile them into the bundle.

partykit@0.0.6

01 Sep 23:53
8193b4e
Compare
Choose a tag to compare

Patch Changes

partykit@0.0.4

01 Sep 00:42
b2a8488
Compare
Choose a tag to compare

Patch Changes

  • #307 ad3ea55 Thanks @threepointone! - fix: route sub party requests correctly

    sigh. we were always fetching from the main party. This fix routest he request to the correct sub party.

create-partykit@0.0.3

01 Sep 23:53
8193b4e
Compare
Choose a tag to compare

Patch Changes

partykit@0.0.3

31 Aug 18:43
64b4be1
Compare
Choose a tag to compare

Patch Changes

  • #296 57f71c9 Thanks @jevakallio! - Add partykit token generate to create API tokens

  • #305 8e087cc Thanks @jevakallio! - Fix edge case bugs in partykit init

  • #299 2209de9 Thanks @threepointone! - fix: call oBC/oBR on sub parties

    We hadn't wired up onBeforeConnect/onBeforeRequest for multi parties. To fix this, I did a refactor where every request goes through a common codepath now. Additionally, this also means that /parties/main/:id is equivalent to party/:id. I also massaged out some differences between the platform/cli facade.

  • #300 6bd4609 Thanks @threepointone! - add new lines when hitting return in dev

    fairly common behaviour with other CLIs, just adding it to ours as well.

  • #293 53eb0b5 Thanks @threepointone! - partykit init: add partykit to existing projects

    The common usecase is to add partykit to an existing project, usually running on another stack/provider. This adds an init command that simply adds dependencies, a partykit.json file, and an entry point. If it's not run inside an existing project, it defers to running npm create partykit instead.

  • #303 6b773ae Thanks @jevakallio! - Improve type documentation

y-partykit@0.0.1

29 Aug 11:23
17e07c0
Compare
Choose a tag to compare

Patch Changes

  • #251 049bcac Thanks @threepointone! - small tweaks to init

    • replace process.env.PARTYKIT_HOST with just PARTYKIT_HOST
    • add a tsconfig.json
    • add partykit to devDependencies in init
    • strip protocol from host (partysocket, y-partykit)
  • #27 1f384a0 Thanks @threepointone! - feat: y-partykit persistence support

    This adds persistence support for y-partykit (based on the work at y-workers). It... just works haha. Pass persist:true to onConnect to store it. This still bumps into DO's 128 kb limit, but we'll fix that asap.

  • #62 1410f06 Thanks @mellson! - Node 16 compatibility.

  • #18 f255e12 Thanks @threepointone! - y-partykit: callback/persistence configuration

    This patch now properly forks y-websocket, and beings in functionality for passing configuration for callbacks/persistence (that was previously using process.env vars). We also fix builds/type generation for the package.

  • #17 bf2e66f Thanks @threepointone! - y-partykit: fix builds, usage

    This patch fixes y-partykit so it can actually be published and used in the platform.

  • #228 1d259bc Thanks @threepointone! - fix: properly sort chunking in y-partykit for big values

    So, out persistence layer has a 128kb limit on values, but y-partykit should/could be used for documents bigger than that. So we implemented a chunking strategy that break up values across multiple keys. When making keys for these, we didn't pad the generated indexes, which meant that for sufficiently large values, we might have assembled them back in the wrong order (because lexicographical sorting). This is a fix for that. It's a breaking change, but oddly I haven't heard from people who've faced the problem at all.

  • #28 f42b1e0 Thanks @threepointone! - better types for storage keys in y-partykit

  • #59 5edde06 Thanks @threepointone! - remove y-partykit's onCommand config

    now that we have onRequest, we don't need to set up a command channel within y-partykit itself, so let's remove the code for it.

  • #192 18035c2 Thanks @threepointone! - y-partykit: better default for gc

    It's better to default to gc: true with partykit, so memory is better used in partykit servers. We should also ensure gc and persist are never used together. So this PR adds a little logic to find a better default, and ensuring the 2 never clash.

  • #34 0fdf7a3 Thanks @threepointone! - y-partykit: remove vendored libs

    We'd previously vendored the libs used by y-partykit (yjs, lib0, etc) to workaround a bug in edge-runtime vercel/edge-runtime#243, but it makes using other libs that include those libs difficult. So instead this patch removes the vendoring, and applies the other workaround (which is to set minify:true). The tradeoff for this workaround is that any "dev mode" code (i.e. code wrapped with if (process.env.NODE_ENV !== 'production')) will be removed. This is temporary and we'll remove it once the bug is fixed by edge-runtime.

  • #88 4d448bb Thanks @threepointone! - y-partykit: wait for bindState to finish before connection fulfills

  • #211 fffe721 Thanks @threepointone! - update dependencies

  • #105 f576783 Thanks @threepointone! - fully fork y-websocket

    This fully forks y-websocket for y-partykit. Previously, we were still extending the client provider, but this now inlines that implementation so we can make our own changes/fixes as required.

  • #33 37986a8 Thanks @threepointone! - y-partykit: remove document size limits

    By chunking values, we can workaround DO's 128 kb value size limit. This patch implements that, and adds a couple of tests too.

  • #182 a7370aa Thanks @iojcde! - fix: change type of conn to PartykitConenection

  • #226 9a4b594 Thanks @threepointone! - configure party in y-partykit

    This adds a party parameter to the options bag for YPartyKitProvider

  • #22 825bb02 Thanks @threepointone! - y-partykit: export YPartyKitProvider

  • #54 244de6a Thanks @threepointone! - fix: don't crash in some secure contexts

    This uses a weaker implementation to generate conneciton IDs if crypto.randomUUID() isn't available in the browser (re: WICG/uuid#23) Fixes #53

  • #181 7bdfcf2 Thanks @iojcde! - feat: add support for headers in callback options

  • #16 13c4acf Thanks @threepointone! - y-partykit: first cut

    This lands a first implementation of yjs for partykit. It uses patch-package to create a modified build of y-websocket, and re-exports it for usage in a partykit server. This also lands a small example of lexical+y-partykit.

  • #285 53ba5ac Thanks @jevakallio! - Make YProvider work in workers runtime

  • #207 ac76dbc Thanks @threepointone! - expose connection id on YpartyKitProvider

    available as provider.id

  • #31 984a9ec Thanks @threepointone! - [y-partykit] fix: write state to storage on connection close

    we'd forgotten to implement writeState() so data wasn't being saved when everyone left a room. the fix is to implement, seems fine now.

  • #30 323fce1 Thanks @threepointone! - chore: update esbuild, edge-runtime, and co.

    of note, esbuild had breaking changes, had to rewrite the rebuild logic.

  • #35 7eb3b36 Thanks @threepointone! - y-partykit (feat): onCommand as a server configuration option

    y-partykit currently assumes all messages on the wire are yjs messages (usually all binary data), but we have usecases where we want to send arbitrary commands to the server and act on them (usually still with the context of a doc). So now y-party...

Read more

partysocket@0.0.2

29 Aug 11:23
17e07c0
Compare
Choose a tag to compare

Patch Changes

  • #251 049bcac Thanks @threepointone! - small tweaks to init

    • replace process.env.PARTYKIT_HOST with just PARTYKIT_HOST
    • add a tsconfig.json
    • add partykit to devDependencies in init
    • strip protocol from host (partysocket, y-partykit)
  • #208 de4e507 Thanks @jevakallio! - Allow connecting directly to a multiparty using a party field on partysocket

  • #215 cc88615 Thanks @threepointone! - fix: make PartySocket work inside cloudflare/partykit

    The implementation of ReconnectingWebSocket tests whether a WebSocket class is valid by the presence of a static field that's not available on CF's/PK's WebSocket class. It's a bit much anyway, so we just remove the test.

  • #239 e57200d Thanks @threepointone! - partysocket: warn if EventTarget is not available

  • #71 4273c76 Thanks @mellson! - Fix included files in published build.

  • #233 8981945 Thanks @turkerdev! - partysocket: check if crypto is defined

  • #211 fffe721 Thanks @threepointone! - update dependencies

  • #191 39cf5ce Thanks @jevakallio! - Improve PartySocket types and React hooks API:

    • Add websocket lifecycle event handlers to usePartyKit options to reduce need for effects in userland
    • Allow usePartySocket to provide startClosed option to initialize without opening connection
    • Fix types for PartySocket#removeEventListener
  • #220 e7e14a7 Thanks @threepointone! - expose .id on PartySocket

  • #21 f01ad2b Thanks @threepointone! - partysocket

    partysocket is a for of reconnecting-websocket (which appears to be abandoned), that adds a few missing features and fixes a few bugs.

  • #54 244de6a Thanks @threepointone! - fix: don't crash in some secure contexts

    This uses a weaker implementation to generate conneciton IDs if crypto.randomUUID() isn't available in the browser (re: WICG/uuid#23) Fixes #53

  • #69 9c3418d Thanks @mellson! - Makes partysocket compatible with both esm and cjs.

  • #160 2753bc8 Thanks @threepointone! - fix: configure _pk with PartySocket with options.id

    This adds an id config for new PartySocket() that's uses as the value of _pk, that becomes the connection id in the backend.

    Fixes #159

  • #183 acca510 Thanks @threepointone! - partysocket: export ReconnectingWebSocket class from root

  • #35 7eb3b36 Thanks @threepointone! - y-partykit (feat): onCommand as a server configuration option

    y-partykit currently assumes all messages on the wire are yjs messages (usually all binary data), but we have usecases where we want to send arbitrary commands to the server and act on them (usually still with the context of a doc). So now y-partykit accepts a handler for all string messages that we're calling 'commands' - onCommand(string, Y.Doc).

    Additionally, partysocket now also exports it's base websocket class as partysocket/ws

  • #63 2910f99 Thanks @mellson! - PartySocket commonjs compatibility and React hook test.