Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hocuspocus/provider

Package Overview
Dependencies
Maintainers
6
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hocuspocus/provider - npm Package Compare versions

Comparing version 2.13.0 to 2.13.1

5

dist/packages/provider/src/HocuspocusProvider.d.ts

@@ -92,3 +92,3 @@ import * as mutex from 'lib0/mutex';

boundBroadcastChannelSubscriber: (data: ArrayBuffer) => void;
boundPageUnload: () => void;
boundPageHide: () => void;
boundOnOpen: (event: Event) => Promise<void>;

@@ -107,6 +107,7 @@ boundOnClose: (event: CloseEvent) => void;

get hasUnsyncedChanges(): boolean;
private resetUnsyncedChanges;
incrementUnsyncedChanges(): void;
decrementUnsyncedChanges(): void;
forceSync(): void;
pageUnload(): void;
pageHide(): void;
registerEventListeners(): void;

@@ -113,0 +114,0 @@ sendStateless(payload: string): void;

4

package.json
{
"name": "@hocuspocus/provider",
"version": "2.13.0",
"version": "2.13.1",
"description": "hocuspocus provider",

@@ -32,3 +32,3 @@ "homepage": "https://hocuspocus.dev",

"dependencies": {
"@hocuspocus/common": "^2.13.0",
"@hocuspocus/common": "^2.13.1",
"@lifeomic/attempt": "^3.0.2",

@@ -35,0 +35,0 @@ "lib0": "^0.2.87",

@@ -234,3 +234,3 @@ import { awarenessStatesToArray } from '@hocuspocus/common'

boundPageUnload = this.pageUnload.bind(this)
boundPageHide = this.pageHide.bind(this)

@@ -286,2 +286,7 @@ boundOnOpen = this.onOpen.bind(this)

private resetUnsyncedChanges() {
this.unsyncedChanges = 1
this.emit('unsyncedChanges', this.unsyncedChanges)
}
incrementUnsyncedChanges() {

@@ -301,8 +306,10 @@ this.unsyncedChanges += 1

forceSync() {
this.resetUnsyncedChanges()
this.send(SyncStepOneMessage, { document: this.document, documentName: this.configuration.name })
}
pageUnload() {
pageHide() {
if (this.awareness) {
removeAwarenessStates(this.awareness, [this.document.clientID], 'window unload')
removeAwarenessStates(this.awareness, [this.document.clientID], 'page hide')
}

@@ -316,3 +323,3 @@ }

window.addEventListener('unload', this.boundPageUnload)
window.addEventListener('pagehide', this.boundPageHide)
}

@@ -371,3 +378,3 @@

// not needed, but provides backward compatibility with e.g. lexicla/yjs
// not needed, but provides backward compatibility with e.g. lexical/yjs
async connect() {

@@ -428,3 +435,4 @@ if (this.configuration.broadcast) {

startSync() {
this.incrementUnsyncedChanges()
this.resetUnsyncedChanges()
this.send(SyncStepOneMessage, { document: this.document, documentName: this.configuration.name })

@@ -519,3 +527,3 @@

window.removeEventListener('unload', this.boundPageUnload)
window.removeEventListener('pagehide', this.boundPageHide)
}

@@ -522,0 +530,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc