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

@jupyter/ydoc

Package Overview
Dependencies
Maintainers
7
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyter/ydoc - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

5

lib/api.d.ts

@@ -59,4 +59,7 @@ /**

* document are bundled into a single event.
*
* @param f Transaction to execute
* @param undoable Whether to track the change in the action history or not (default `true`)
*/
transact(f: () => void): void;
transact(f: () => void, undoable?: boolean): void;
}

@@ -63,0 +66,0 @@ /**

3

lib/ycell.d.ts

@@ -204,2 +204,5 @@ import type * as nbformat from '@jupyterlab/nbformat';

* document are bundled into a single event.
*
* @param f Transaction to execute
* @param undoable Whether to track the change in the action history or not (default `true`)
*/

@@ -206,0 +209,0 @@ transact(f: () => void, undoable?: boolean): void;

@@ -375,17 +375,19 @@ /* -----------------------------------------------------------------------------

}
this._ymetadata.delete(key);
const jupyter = this.getMetadata('jupyter');
if (key === 'collapsed' && jupyter) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { outputs_hidden, ...others } = jupyter;
if (Object.keys(others).length === 0) {
this._ymetadata.delete('jupyter');
this.transact(() => {
this._ymetadata.delete(key);
const jupyter = this.getMetadata('jupyter');
if (key === 'collapsed' && jupyter) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { outputs_hidden, ...others } = jupyter;
if (Object.keys(others).length === 0) {
this._ymetadata.delete('jupyter');
}
else {
this._ymetadata.set('jupyter', others);
}
}
else {
this._ymetadata.set('jupyter', others);
else if (key === 'jupyter') {
this._ymetadata.delete('collapsed');
}
}
else if (key === 'jupyter') {
this._ymetadata.delete('collapsed');
}
}, false);
}

@@ -443,3 +445,3 @@ getMetadata(key) {

}
});
}, false);
}

@@ -460,3 +462,3 @@ else {

}
});
}, false);
}

@@ -479,9 +481,12 @@ }

* document are bundled into a single event.
*
* @param f Transaction to execute
* @param undoable Whether to track the change in the action history or not (default `true`)
*/
transact(f, undoable = true) {
this.notebook && undoable
? this.notebook.transact(f)
: this.ymodel.doc == null
!this.notebook || this.notebook.disableDocumentWideUndoRedo
? this.ymodel.doc == null
? f()
: this.ymodel.doc.transact(f, this);
: this.ymodel.doc.transact(f, undoable ? this : null)
: this.notebook.transact(f, undoable);
}

@@ -520,19 +525,21 @@ /**

case 'update':
const newValue = this._ymetadata.get(key);
const oldValue = change.oldValue;
let equal = true;
if (typeof oldValue == 'object' && typeof newValue == 'object') {
equal = JSONExt.deepEqual(oldValue, newValue);
{
const newValue = this._ymetadata.get(key);
const oldValue = change.oldValue;
let equal = true;
if (typeof oldValue == 'object' && typeof newValue == 'object') {
equal = JSONExt.deepEqual(oldValue, newValue);
}
else {
equal = oldValue === newValue;
}
if (!equal) {
this._metadataChanged.emit({
key,
type: 'change',
oldValue,
newValue
});
}
}
else {
equal = oldValue === newValue;
}
if (!equal) {
this._metadataChanged.emit({
key,
type: 'change',
oldValue,
newValue
});
}
break;

@@ -608,3 +615,3 @@ }

this.ymodel.set('execution_count', count);
});
}, false);
}

@@ -716,3 +723,3 @@ }

}
});
}, false);
}

@@ -719,0 +726,0 @@ /**

{
"name": "@jupyter/ydoc",
"version": "0.3.3",
"version": "0.3.4",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Jupyter document structures for collaborative editing using YJS",

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