@jupyter-notebook/docmanager-extension 7.1.0-rc.1 → 7.1.1

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.
Files changed (2) hide show
  1. package/lib/index.js +6 -1
  2. package/package.json +7 -7
package/lib/index.js CHANGED
@@ -23,7 +23,7 @@ const opener = {
23
23
  constructor() {
24
24
  this._opened = new Signal(this);
25
25
  }
26
- open(widget, options) {
26
+ async open(widget, options) {
27
27
  var _a, _b, _c;
28
28
  const widgetName = (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : '';
29
29
  const ref = options === null || options === void 0 ? void 0 : options.ref;
@@ -35,6 +35,11 @@ const opener = {
35
35
  let route = 'edit';
36
36
  if ((widgetName === 'default' && ext === '.ipynb') ||
37
37
  widgetName.includes('Notebook')) {
38
+ // make sure to save the notebook before opening it in a new tab
39
+ // so the kernel info is saved (if created from the New dropdown)
40
+ if (widget.context.sessionContext.kernelPreference.name) {
41
+ await widget.context.save();
42
+ }
38
43
  route = 'notebooks';
39
44
  }
40
45
  // append ?factory only if it's not the default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter-notebook/docmanager-extension",
3
- "version": "7.1.0-rc.1",
3
+ "version": "7.1.1",
4
4
  "description": "Jupyter Notebook - Document Manager Extension",
5
5
  "homepage": "https://github.com/jupyter/notebook",
6
6
  "bugs": {
@@ -38,12 +38,12 @@
38
38
  "watch": "tsc -b --watch"
39
39
  },
40
40
  "dependencies": {
41
- "@jupyter-notebook/application": "^7.1.0-rc.1",
42
- "@jupyterlab/application": "~4.1.0",
43
- "@jupyterlab/coreutils": "~6.1.0",
44
- "@jupyterlab/docmanager": "~4.1.0",
45
- "@jupyterlab/docregistry": "~4.1.0",
46
- "@jupyterlab/services": "~7.1.0",
41
+ "@jupyter-notebook/application": "^7.1.1",
42
+ "@jupyterlab/application": "~4.1.2",
43
+ "@jupyterlab/coreutils": "~6.1.2",
44
+ "@jupyterlab/docmanager": "~4.1.2",
45
+ "@jupyterlab/docregistry": "~4.1.2",
46
+ "@jupyterlab/services": "~7.1.2",
47
47
  "@lumino/algorithm": "^2.0.1",
48
48
  "@lumino/signaling": "^2.1.2"
49
49
  },