Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/bright-sockets-flow.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/fix-react-native-dispatchevent.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/selfish-bananas-clean.md

This file was deleted.

4 changes: 2 additions & 2 deletions fixtures/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"dependencies": {
"nanoid": "^5.1.6",
"partyserver": "^0.1.0",
"partysocket": "^1.1.10",
"partyserver": "^0.1.1",
"partysocket": "^1.1.11",
"react": "^19.2.3",
"react-dom": "^19.2.3"
},
Expand Down
9 changes: 9 additions & 0 deletions fixtures/chat/src/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ const me =

function App() {
const [messages, setMessages] = useState<Array<ChatMessage>>([]);
const [connected, setConnected] = useState(true);
const inputRef = useRef<HTMLInputElement>(null);
const socket = usePartySocket({
room: "abc",
party: "chat",
enabled: connected,
onOpen() {
console.log("Connected to the party!");
},
Expand All @@ -48,6 +50,13 @@ function App() {
<>
<h2 style={{ marginBottom: 10 }}>
<b>Hi {me}!</b>
<button
type="button"
onClick={() => setConnected((c) => !c)}
style={{ marginLeft: 10 }}
>
{connected ? "Disconnect" : "Connect"}
</button>
</h2>
<div>
{messages.map((message) => (
Expand Down
64 changes: 60 additions & 4 deletions fixtures/chat/src/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
@import "tailwindcss";
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}

/* @import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities"; */
body {
font-family: system-ui, -apple-system, sans-serif;
background: #fff;
color: #111;
padding: 20px;
max-width: 600px;
margin: 0 auto;
}

h2 {
display: flex;
align-items: center;
gap: 10px;
padding-bottom: 15px;
border-bottom: 1px solid #ddd;
margin-bottom: 15px;
}

button {
background: #111;
color: #fff;
border: none;
padding: 6px 12px;
font-size: 14px;
cursor: pointer;
}

button:hover {
background: #333;
}

.message {
padding: 8px 0;
border-bottom: 1px solid #eee;
}

.user {
color: #555;
}

form {
margin-top: 20px;
}

input[type="text"] {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
font-size: 16px;
}

input[type="text"]:focus {
outline: none;
border-color: #111;
}
4 changes: 2 additions & 2 deletions fixtures/globe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"dependencies": {
"cobe": "^0.6.5",
"partyserver": "^0.1.0",
"partysocket": "^1.1.10",
"partyserver": "^0.1.1",
"partysocket": "^1.1.11",
"react": "^19.2.3",
"react-dom": "^19.2.3"
},
Expand Down
4 changes: 2 additions & 2 deletions fixtures/hono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"hono": "^4.11.1",
"hono-party": "^1.0.0",
"partyserver": "^0.1.0",
"partysocket": "^1.1.10",
"partyserver": "^0.1.1",
"partysocket": "^1.1.11",
"react": "^19.2.3",
"react-dom": "^19.2.3"
},
Expand Down
2 changes: 1 addition & 1 deletion fixtures/monaco-yjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"monaco-editor": "^0.55.1",
"partysocket": "^1.1.10",
"partysocket": "^1.1.11",
"y-monaco": "^0.1.6"
}
}
2 changes: 1 addition & 1 deletion fixtures/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"types": "wrangler types env.d.ts --include-runtime false"
},
"dependencies": {
"partysocket": "^1.1.10"
"partysocket": "^1.1.11"
}
}
2 changes: 1 addition & 1 deletion fixtures/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
},
"dependencies": {
"nanoid": "^5.1.6",
"partysocket": "^1.1.10"
"partysocket": "^1.1.11"
}
}
2 changes: 1 addition & 1 deletion fixtures/tiptap-yjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@tiptap/extension-collaboration": "^3.14.0",
"@tiptap/react": "^3.14.0",
"@tiptap/starter-kit": "^3.14.0",
"partyserver": "^0.1.0",
"partyserver": "^0.1.1",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"tailwindcss": "^4.1.18",
Expand Down
4 changes: 2 additions & 2 deletions fixtures/tldraw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"start": "vite dev"
},
"dependencies": {
"partyserver": "^0.1.0",
"partysocket": "^1.1.10",
"partyserver": "^0.1.1",
"partysocket": "^1.1.11",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"tldraw": "^4.2.1"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/todo-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"dependencies": {
"nanoid": "^5.1.6",
"partyserver": "^0.1.0",
"partysocket": "^1.1.10",
"partyserver": "^0.1.1",
"partysocket": "^1.1.11",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"valibot": "^1.2.0"
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/partyserver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# partyflare

## 0.1.1

### Patch Changes

- [#312](https://github.com/cloudflare/partykit/pull/312) [`a936079`](https://github.com/cloudflare/partykit/commit/a936079c1fc045301d55061b872236ed8189506d) Thanks [@francescov1](https://github.com/francescov1)! - Check for hibernated websocket connections

## 0.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/partyserver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "partyserver",
"version": "0.1.0",
"version": "0.1.1",
"repository": {
"type": "git",
"url": "git://github.com/cloudflare/partykit.git"
Expand Down
12 changes: 12 additions & 0 deletions packages/partysocket/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# partysocket

## 1.1.11

### Patch Changes

- [#315](https://github.com/cloudflare/partykit/pull/315) [`2a2928b`](https://github.com/cloudflare/partykit/commit/2a2928b016c01dbcd6a2eb76b973d41bdd0ad1fc) Thanks [@threepointone](https://github.com/threepointone)! - Add `enabled` prop to `usePartySocket` and `useWebSocket` hooks for conditional connection control

- [#294](https://github.com/cloudflare/partykit/pull/294) [`8237982`](https://github.com/cloudflare/partykit/commit/8237982c1ed97b20b98c73d288ab62a927a83b0b) Thanks [@amondnet](https://github.com/amondnet)! - Fix React Native/Expo `dispatchEvent` TypeError

Added React Native environment detection to use Node-style event cloning. React Native/Expo environments have both `process` and `document` polyfilled but not `process.versions.node`, which caused browser-style event cloning to be selected incorrectly. Browser-style cloning produces events that fail `instanceof Event` checks in `event-target-polyfill`.

Fixes #257

## 1.1.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/partysocket/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "partysocket",
"version": "1.1.10",
"version": "1.1.11",
"description": "A better WebSocket that Just Works™",
"homepage": "https://docs.partykit.io/reference/partysocket-api",
"bugs": "https://github.com/cloudflare/partykit/issues",
Expand Down
Loading