Socket
Socket
Sign inDemoInstall

@jupyter/ydoc

Package Overview
Dependencies
Maintainers
7
Versions
32
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.4 to 1.0.0

4

lib/api.d.ts

@@ -71,2 +71,6 @@ /**

/**
* Document version
*/
readonly version: string;
/**
* Document state

@@ -73,0 +77,0 @@ */

5

lib/ycell.d.ts

@@ -52,3 +52,3 @@ import type * as nbformat from '@jupyterlab/nbformat';

* @param ysource Cell source
* @param options { notebook?: The notebook the cell is attached to }
* @param options \{ notebook?: The notebook the cell is attached to \}
* @param ymetadata Cell metadata

@@ -259,3 +259,4 @@ */

* @param youtputs Code cell outputs
* @param options { notebook?: The notebook the cell is attached to }
* @param options \{ notebook?: The notebook the cell is attached to \}
* @param ymetadata Cell metadata
*/

@@ -262,0 +263,0 @@ constructor(ymodel: Y.Map<any>, ysource: Y.Text, youtputs: Y.Array<any>, options?: SharedCell.IOptions, ymetadata?: Y.Map<any>);

@@ -108,3 +108,3 @@ /* -----------------------------------------------------------------------------

* @param ysource Cell source
* @param options { notebook?: The notebook the cell is attached to }
* @param options \{ notebook?: The notebook the cell is attached to \}
* @param ymetadata Cell metadata

@@ -585,3 +585,4 @@ */

* @param youtputs Code cell outputs
* @param options { notebook?: The notebook the cell is attached to }
* @param options \{ notebook?: The notebook the cell is attached to \}
* @param ymetadata Cell metadata
*/

@@ -588,0 +589,0 @@ constructor(ymodel, ysource, youtputs, options = {}, ymetadata) {

@@ -9,8 +9,8 @@ import { JSONObject, JSONValue } from '@lumino/coreutils';

*/
export declare class YDocument<T extends DocumentChange> implements ISharedDocument {
export declare abstract class YDocument<T extends DocumentChange> implements ISharedDocument {
constructor(options?: YDocument.IOptions);
/**
* Creates a standalone YDocument
* Document version
*/
static create(): YDocument<DocumentChange>;
abstract readonly version: string;
/**

@@ -102,3 +102,9 @@ * YJS document.

}
declare namespace YDocument {
/**
* YDocument namespace
*/
export declare namespace YDocument {
/**
* YDocument constructor options
*/
interface IOptions {

@@ -111,2 +117,1 @@ /**

}
export {};

@@ -45,8 +45,2 @@ /* -----------------------------------------------------------------------------

/**
* Creates a standalone YDocument
*/
static create() {
return new YDocument();
}
/**
* YJS document.

@@ -53,0 +47,0 @@ */

@@ -17,2 +17,6 @@ import * as Y from 'yjs';

/**
* Document version
*/
readonly version: string;
/**
* Creates a standalone YFile

@@ -19,0 +23,0 @@ */

@@ -19,2 +19,6 @@ /* -----------------------------------------------------------------------------

/**
* Document version
*/
this.version = '1.0.0';
/**
* YJS file text.

@@ -21,0 +25,0 @@ */

@@ -29,2 +29,6 @@ import type * as nbformat from '@jupyterlab/nbformat';

/**
* Document version
*/
readonly version: string;
/**
* Creates a standalone YNotebook

@@ -31,0 +35,0 @@ *

@@ -33,2 +33,6 @@ /* -----------------------------------------------------------------------------

/**
* Document version
*/
this.version = '1.0.0';
/**
* YJS map for the notebook metadata

@@ -62,19 +66,21 @@ */

case 'update':
const newValue = ymetadata.get(key);
const oldValue = change.oldValue;
let equal = true;
if (typeof oldValue == 'object' && typeof newValue == 'object') {
equal = JSONExt.deepEqual(oldValue, newValue);
{
const newValue = 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;

@@ -81,0 +87,0 @@ }

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

@@ -43,6 +43,6 @@ "description": "Jupyter document structures for collaborative editing using YJS",

"dependencies": {
"@jupyterlab/nbformat": "^3.0.0 || ^4.0.0-alpha.15",
"@lumino/coreutils": "^1.11.0 || ^2.0.0-alpha.6",
"@lumino/disposable": "^1.10.0 || ^2.0.0-alpha.6",
"@lumino/signaling": "^1.10.0 || ^2.0.0-alpha.6",
"@jupyterlab/nbformat": "^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0",
"@lumino/coreutils": "^1.11.0 || ^2.0.0",
"@lumino/disposable": "^1.10.0 || ^2.0.0",
"@lumino/signaling": "^1.10.0 || ^2.0.0",
"y-protocols": "^1.0.5",

@@ -60,8 +60,7 @@ "yjs": "^13.5.40"

"jest": "^29.0.0",
"prettier": "^2.6.0",
"process": "0.11.10",
"rimraf": "^3.0.0",
"prettier": "^2.8.4",
"rimraf": "^4.4.0",
"tsc-esm-fix": "^2.20.0",
"typedoc": "^0.23.21",
"typescript": "^4.8.0",
"tsc-esm-fix": "^2.20.0"
"typescript": "^4.9.5"
},

@@ -68,0 +67,0 @@ "publishConfig": {

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 not supported yet

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