Releases: partykit/partykit
partykit@0.0.9
Patch Changes
c5a8357
Thanks @jevakallio! - Trigger a new release
partykit@0.0.8
Patch Changes
-
#329
9a55f69
Thanks @threepointone! - change naming of /server exportsThis changes the naming of our exported types from
partykit/server
. The motivation here was aesthetic/simplification. Most of the exports los theParty
prefix; i.e.PartyServer
becomesServer
,PartyConnection
becomesConnection
, 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 byParty.*
.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 packagesThis 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
Patch Changes
-
#323
2ca369a
Thanks @threepointone! - useWebSocketa hook version of our reconnecting websocket
partykit@0.0.7
Patch Changes
-
#274
30fabc9
Thanks @threepointone! - don't compile node builtins that the platform supportsWe support some node builtins, so we shouldn't try to compile them into the bundle.
partykit@0.0.6
Patch Changes
- #314
d9a1871
Thanks @threepointone! - trigger a release
partykit@0.0.4
Patch Changes
-
#307
ad3ea55
Thanks @threepointone! - fix: route sub party requests correctlysigh. we were always fetching from the main party. This fix routest he request to the correct sub party.
create-partykit@0.0.3
Patch Changes
- #314
d9a1871
Thanks @threepointone! - trigger a release
partykit@0.0.3
Patch Changes
-
#296
57f71c9
Thanks @jevakallio! - Addpartykit token generate
to create API tokens -
#305
8e087cc
Thanks @jevakallio! - Fix edge case bugs inpartykit init
-
#299
2209de9
Thanks @threepointone! - fix: call oBC/oBR on sub partiesWe 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 toparty/:id
. I also massaged out some differences between the platform/cli facade. -
#300
6bd4609
Thanks @threepointone! - add new lines when hitting return indev
fairly common behaviour with other CLIs, just adding it to ours as well.
-
#293
53eb0b5
Thanks @threepointone! -partykit init
: add partykit to existing projectsThe 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, apartykit.json
file, and an entry point. If it's not run inside an existing project, it defers to runningnpm create partykit
instead. -
#303
6b773ae
Thanks @jevakallio! - Improve type documentation
y-partykit@0.0.1
Patch Changes
-
#251
049bcac
Thanks @threepointone! - small tweaks toinit
- replace
process.env.PARTYKIT_HOST
with justPARTYKIT_HOST
- add a
tsconfig.json
- add partykit to devDependencies in
init
- strip protocol from host (partysocket, y-partykit)
- replace
-
#27
1f384a0
Thanks @threepointone! - feat: y-partykit persistence supportThis adds persistence support for y-partykit (based on the work at y-workers). It... just works haha. Pass
persist:true
toonConnect
to store it. This still bumps into DO's 128 kb limit, but we'll fix that asap. -
#18
f255e12
Thanks @threepointone! - y-partykit: callback/persistence configurationThis 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, usageThis 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 valuesSo, 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 confignow 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 forgc
It's better to default to
gc: true
with partykit, so memory is better used in partykit servers. We should also ensuregc
andpersist
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 libsWe'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 withif (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-websocketThis 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 limitsBy 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 ofconn
to PartykitConenection -
#226
9a4b594
Thanks @threepointone! - configureparty
iny-partykit
This adds a
party
parameter to the options bag forYPartyKitProvider
-
#22
825bb02
Thanks @threepointone! - y-partykit: export YPartyKitProvider -
#54
244de6a
Thanks @threepointone! - fix: don't crash in some secure contextsThis 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 cutThis 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 YpartyKitProvideravailable as
provider.id
-
#31
984a9ec
Thanks @threepointone! - [y-partykit] fix: write state to storage on connection closewe'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 optiony-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...
partysocket@0.0.2
Patch Changes
-
#251
049bcac
Thanks @threepointone! - small tweaks toinit
- replace
process.env.PARTYKIT_HOST
with justPARTYKIT_HOST
- add a
tsconfig.json
- add partykit to devDependencies in
init
- strip protocol from host (partysocket, y-partykit)
- replace
-
#208
de4e507
Thanks @jevakallio! - Allow connecting directly to a multiparty using aparty
field on partysocket -
#215
cc88615
Thanks @threepointone! - fix: make PartySocket work inside cloudflare/partykitThe 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! - partysocketpartysocket 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 contextsThis 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 withoptions.id
This adds an
id
config fornew 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 optiony-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.