New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@wordpress/sync

Package Overview
Dependencies
Maintainers
23
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/sync

Sync Data.

Source
npmnpm
Version
1.38.1-next.v.0
Version published
Weekly downloads
49K
-5.8%
Maintainers
23
Weekly downloads
 
Created
Source

Sync

Sync data between multiple peers and persist in a local database.

Installation

Install the module

npm install @wordpress/sync --save

API

AwarenessState

Abstract class to manage awareness and allow external code to subscribe to state updates.

Type

  • AwarenessState

CRDT_DOC_META_PERSISTENCE_KEY

CRDT documents can hold meta information in a map. This map exists only in memory and is not synced or persisted. This key can be used to indicate that a (temporary) document has been loaded from persistence.

CRDT_RECORD_MAP_KEY

Root-level key for the map that holds the entity record data.

CRDT_RECORD_METADATA_MAP_KEY

Root-level key for the map that holds entity record metadata. This map should only contain metadata that is not represented by the entity record itself.

CRDT_RECORD_METADATA_SAVED_AT_KEY

Y.Map key representing the timestamp of the last save operation.

CRDT_RECORD_METADATA_SAVED_BY_KEY

Y.Map key representing the Y.Doc client ID of the user who performed the last save operation.

createSyncManager

The sync manager orchestrates the lifecycle of syncing entity records. It creates Yjs documents, connects to providers, creates awareness instances, and coordinates with the core-data store.

Delta

Deltas are used to calculate incremental Y.Text updates.

LOCAL_EDITOR_ORIGIN

Origin string for CRDT document changes originating from the local editor.

LOCAL_SYNC_MANAGER_ORIGIN

Origin string for CRDT document changes originating from the sync manager.

WORDPRESS_META_KEY_FOR_CRDT_DOC_PERSISTENCE

WordPress meta key used to persist the CRDT document for an entity.

Y

Exported copy of Yjs so that consumers of this package don't need to install it.

Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main contributor guide.



Code is Poetry.

Keywords

wordpress

FAQs

Package last updated on 23 Jan 2026

Did you know?

Socket

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.

Install

Related posts