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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
## vNEXT (not yet published)

## v3.2.1

### `@liveblocks/react-ui`

- Improve Markdown lists in `AiChat`: better spacing and support for arbitrary
starting numbers in ordered lists. (e.g. `3.` instead of `1.`)

### `@liveblocks/react`

- Fix `useSyncStatus` returning incorrect synchronization status for Y.js
provider. We now compare the hash of local and remote snapshot to check for
synchronization differences between local and remote Y.js document.

### `@liveblocks/yjs`

- Fix `LiveblocksYjsProvider.getStatus()` returning incorrect synchronization
status for Y.js provider.

## v3.2.0

### `@liveblocks/react-ui`
Expand Down
44 changes: 40 additions & 4 deletions docs/pages/platform/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,46 @@ plug(Plug.Parsers, ...)

## Testing locally [#testing-locally]

Running webhooks locally can be difficult, but one way to do this is to use a
tool such as [`localtunnel`](https://www.npmjs.com/package/localtunnel) or
[`ngrok`](https://www.npmjs.com/package/ngrok) which allow you to temporarily
host your localhost server online.
Running webhooks locally can be difficult, but there are several tools that
allow you to temporarily host your localhost server online.

### Using svix-cli

The [`svix-cli`](https://github.com/svix/svix-webhooks/tree/main/svix-cli)
provides a `listen` command that creates a publicly accessible URL for testing
webhooks without requiring any account setup or network configuration changes.

If your project is running on `localhost:3000`, you can run the following
command to generate a temporary URL:

```bash
svix listen http://localhost:3000/api/liveblocks-webhook
```

This will output a unique URL that forwards all POST requests to your local
endpoint:

```
Webhook Relay is now listening at:
https://play.svix.com/in/c_tSdQhb4Q5PTF5m2juiWu8qFREqE/

All requests on this endpoint will be forwarded to your local URL:
http://localhost:3000/api/liveblocks-webhook

View logs and debug information at:
https://play.svix.com/view/c_tSdQhb4Q5PTF5m2juiWu8qFREqE/
```

The generated URL can be placed directly into the Liveblocks webhooks dashboard
for testing. This approach is particularly useful in enterprise environments
where tools like `localtunnel` or `ngrok` may be blocked by security policies.

### Using localtunnel or ngrok

Alternatively, you can use tools such as
[`localtunnel`](https://www.npmjs.com/package/localtunnel) or
[`ngrok`](https://www.npmjs.com/package/ngrok) which also allow you to
temporarily host your localhost server online.

If your project is running on `localhost:3000`, you can run the following
command to generate a temporary URL that’s available while your localhost server
Expand Down
37 changes: 34 additions & 3 deletions guides/pages/how-to-test-webhooks-on-localhost.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,40 @@ the following URL:

## Testing webhooks locally

Tools such as `localtunnel` and `ngrok` allow you to temporarily place your
localhost server online, by providing you with a temporary URL. Let’s take a
look at these two options.
There are several tools that allow you to temporarily place your localhost
server online, by providing you with a temporary URL. Let’s take a look at
these options.

### svix-cli

The [`svix-cli`](https://github.com/svix/svix-webhooks/tree/main/svix-cli)
provides a `listen` command that creates a publicly accessible URL for testing
webhooks. This approach is particularly useful in enterprise environments where
other tunneling tools may be blocked by security policies.

The `listen` command acts as a proxy, forwarding any requests to your local URL
without requiring account setup or network configuration changes.

If your project is running on `localhost:3000`, you can run the following
command to generate your URL:

```bash
svix listen http://localhost:3000/api/liveblocks-webhook
```

The `svix-cli` will provide you with a unique URL and forward any POST requests
it receives to your local endpoint. To use this, copy the generated URL
directly into the Liveblocks webhooks dashboard.

```shell
# The svix-cli generates a URL like this:
https://play.svix.com/in/c_tSdQhb4Q5PTF5m2juiWu8qFREqE/

# Use this URL directly in the webhooks dashboard
```

You now have a URL that can be used in the webhooks dashboard, along with a
debug interface to view logs and request details.

### localtunnel

Expand Down
111 changes: 62 additions & 49 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions packages/liveblocks-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liveblocks/client",
"version": "3.2.0",
"version": "3.2.1",
"description": "A client that lets you interact with Liveblocks servers. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
"license": "Apache-2.0",
"type": "module",
Expand Down Expand Up @@ -34,7 +34,7 @@
"test:watch": "jest --silent --verbose --color=always --passWithNoTests --watch"
},
"dependencies": {
"@liveblocks/core": "3.2.0"
"@liveblocks/core": "3.2.1"
},
"devDependencies": {
"@liveblocks/eslint-config": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/liveblocks-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liveblocks/core",
"version": "3.2.0",
"version": "3.2.1",
"description": "Private internals for Liveblocks. DO NOT import directly from this package!",
"type": "module",
"main": "./dist/index.cjs",
Expand Down
1 change: 1 addition & 0 deletions packages/liveblocks-core/src/protocol/ServerMsg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export type YDocUpdateServerMsg = {
readonly stateVector: string | null; // server's state vector, sent in response to fetch
readonly guid?: string; // an optional guid to identify which subdoc this update to
readonly v2?: boolean; // whether this is a v2 update
readonly remoteSnapshotHash: string; // The hash of snapshot of server's document. Used to detect if the client has the latest version of the document.
};

/**
Expand Down
Loading
Loading