
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
@hocuspocus/provider
Advanced tools
The client-side provider for Hocuspocus. Connects to a Hocuspocus server over WebSockets and syncs one or more Y.js documents — including awareness (presence), authentication, and stateless messaging.
Building a React app? Use
@hocuspocus/provider-reactinstead — it wraps the provider in components and hooks so React handles the lifecycle for you (including StrictMode double-mounts).
npm install @hocuspocus/provider yjs
import * as Y from "yjs"
import { HocuspocusProvider } from "@hocuspocus/provider"
const ydoc = new Y.Doc()
const provider = new HocuspocusProvider({
url: "ws://127.0.0.1:1234",
name: "example-document",
document: ydoc,
})
Changes to ydoc are now synced to every other client connected to the same name.
Pass a token — it's forwarded to the server's onAuthenticate hook:
new HocuspocusProvider({
url: "wss://collab.example.com",
name: "example-document",
document: ydoc,
token: "super-secret-token",
})
Create a HocuspocusProviderWebsocket once, then reuse it for multiple documents:
import {
HocuspocusProvider,
HocuspocusProviderWebsocket,
} from "@hocuspocus/provider"
const socket = new HocuspocusProviderWebsocket({ url: "ws://127.0.0.1:1234" })
const doc1 = new HocuspocusProvider({ websocketProvider: socket, name: "doc-1" })
const doc2 = new HocuspocusProvider({ websocketProvider: socket, name: "doc-2" })
Call provider.destroy() to disconnect a single document. Call socket.destroy() to tear down the shared connection.
Full configuration, events, and awareness reference: tiptap.dev/docs/hocuspocus/provider.
MIT — see LICENSE.md.
y-websocket is a WebSocket provider for Yjs that enables real-time collaboration over WebSocket connections. It is similar to @hocuspocus/provider in that it facilitates the synchronization of Yjs documents across clients. However, @hocuspocus/provider offers additional features such as awareness states and a more flexible API for handling connections and events.
ShareDB is a real-time database backend based on Operational Transformation (OT) that allows for collaborative editing. While it provides similar real-time collaboration capabilities, it uses a different algorithm (OT vs. CRDT) and is not specifically designed to work with Yjs. ShareDB is more focused on providing a backend for real-time applications, whereas @hocuspocus/provider is tailored for use with Yjs and CRDTs.
Automerge is a library for building collaborative applications using CRDTs. Like @hocuspocus/provider, it enables real-time collaboration, but it is a more general-purpose CRDT library that does not include built-in networking capabilities. Developers need to implement their own networking layer to synchronize changes between clients.
FAQs
hocuspocus provider
The npm package @hocuspocus/provider receives a total of 929,528 weekly downloads. As such, @hocuspocus/provider popularity was classified as popular.
We found that @hocuspocus/provider demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.