@jupyter/docprovider 3.1.0-alpha.0 → 3.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ydrive.js +3 -1
- package/package.json +2 -2
package/lib/ydrive.js
CHANGED
|
@@ -46,6 +46,7 @@ export class YDrive extends Drive {
|
|
|
46
46
|
const key = `${options.format}:${options.contentType}:${options.path}`;
|
|
47
47
|
this._providers.set(key, provider);
|
|
48
48
|
sharedModel.changed.connect(async (_, change) => {
|
|
49
|
+
var _a;
|
|
49
50
|
if (!change.stateChange) {
|
|
50
51
|
return;
|
|
51
52
|
}
|
|
@@ -60,7 +61,8 @@ export class YDrive extends Drive {
|
|
|
60
61
|
// A change in hash signifies that a save occurred on the server-side
|
|
61
62
|
// (e.g. a collaborator performed the save) - we want to notify the
|
|
62
63
|
// observers about this change so that they can store the new hash value.
|
|
63
|
-
const
|
|
64
|
+
const newPath = (_a = sharedModel.state.path) !== null && _a !== void 0 ? _a : options.path;
|
|
65
|
+
const model = await this.get(newPath, { content: false });
|
|
64
66
|
this._ydriveFileChanged.emit({
|
|
65
67
|
type: 'save',
|
|
66
68
|
newValue: { ...model, hash: hashChange.newValue },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter/docprovider",
|
|
3
|
-
"version": "3.1.0-
|
|
3
|
+
"version": "3.1.0-rc.0",
|
|
4
4
|
"description": "JupyterLab - Document Provider",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyter-collaboration",
|
|
6
6
|
"bugs": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"watch": "tsc -b --watch"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@jupyter/collaborative-drive": "^3.1.0-
|
|
44
|
+
"@jupyter/collaborative-drive": "^3.1.0-rc.0",
|
|
45
45
|
"@jupyter/ydoc": "^2.0.0 || ^3.0.0",
|
|
46
46
|
"@jupyterlab/apputils": "^4.2.0",
|
|
47
47
|
"@jupyterlab/cells": "^4.2.0",
|