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

@jupyterlab/docregistry

Package Overview
Dependencies
Maintainers
10
Versions
378
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyterlab/docregistry - npm Package Compare versions

Comparing version 4.2.0-alpha.0 to 4.2.0-alpha.1

22

lib/registry.js

@@ -582,7 +582,21 @@ // Copyright (c) Jupyter Development Team.

getFileTypeForModel(model) {
let ft = null;
if (model.name || model.path) {
const name = model.name || PathExt.basename(model.path);
const fts = this.getFileTypesForPath(name);
if (fts.length > 0) {
ft = fts[0];
}
}
switch (model.type) {
case 'directory':
if (ft !== null && ft.contentType === 'directory') {
return ft;
}
return (find(this._fileTypes, ft => ft.contentType === 'directory') ||
DocumentRegistry.getDefaultDirectoryFileType(this.translator));
case 'notebook':
if (ft !== null && ft.contentType === 'notebook') {
return ft;
}
return (find(this._fileTypes, ft => ft.contentType === 'notebook') ||

@@ -592,8 +606,4 @@ DocumentRegistry.getDefaultNotebookFileType(this.translator));

// Find the best matching extension.
if (model.name || model.path) {
const name = model.name || PathExt.basename(model.path);
const fts = this.getFileTypesForPath(name);
if (fts.length > 0) {
return fts[0];
}
if (ft !== null) {
return ft;
}

@@ -600,0 +610,0 @@ return (this.getFileType('text') ||

{
"name": "@jupyterlab/docregistry",
"version": "4.2.0-alpha.0",
"version": "4.2.0-alpha.1",
"description": "JupyterLab - Document Registry",

@@ -45,12 +45,12 @@ "homepage": "https://github.com/jupyterlab/jupyterlab",

"dependencies": {
"@jupyter/ydoc": "^1.1.1",
"@jupyterlab/apputils": "^4.3.0-alpha.0",
"@jupyterlab/codeeditor": "^4.2.0-alpha.0",
"@jupyterlab/coreutils": "^6.2.0-alpha.0",
"@jupyterlab/observables": "^5.2.0-alpha.0",
"@jupyterlab/rendermime": "^4.2.0-alpha.0",
"@jupyterlab/rendermime-interfaces": "^3.10.0-alpha.0",
"@jupyterlab/services": "^7.2.0-alpha.0",
"@jupyterlab/translation": "^4.2.0-alpha.0",
"@jupyterlab/ui-components": "^4.2.0-alpha.0",
"@jupyter/ydoc": "^2.0.1",
"@jupyterlab/apputils": "^4.3.0-alpha.1",
"@jupyterlab/codeeditor": "^4.2.0-alpha.1",
"@jupyterlab/coreutils": "^6.2.0-alpha.1",
"@jupyterlab/observables": "^5.2.0-alpha.1",
"@jupyterlab/rendermime": "^4.2.0-alpha.1",
"@jupyterlab/rendermime-interfaces": "^3.10.0-alpha.1",
"@jupyterlab/services": "^7.2.0-alpha.1",
"@jupyterlab/translation": "^4.2.0-alpha.1",
"@jupyterlab/ui-components": "^4.2.0-alpha.1",
"@lumino/algorithm": "^2.0.1",

@@ -66,3 +66,3 @@ "@lumino/coreutils": "^2.1.2",

"devDependencies": {
"@jupyterlab/testing": "^4.2.0-alpha.0",
"@jupyterlab/testing": "^4.2.0-alpha.1",
"@types/jest": "^29.2.0",

@@ -69,0 +69,0 @@ "jest": "^29.2.0",

@@ -667,4 +667,15 @@ // Copyright (c) Jupyter Development Team.

): DocumentRegistry.IFileType {
let ft: DocumentRegistry.IFileType | null = null;
if (model.name || model.path) {
const name = model.name || PathExt.basename(model.path!);
const fts = this.getFileTypesForPath(name);
if (fts.length > 0) {
ft = fts[0];
}
}
switch (model.type) {
case 'directory':
if (ft !== null && ft.contentType === 'directory') {
return ft;
}
return (

@@ -675,2 +686,5 @@ find(this._fileTypes, ft => ft.contentType === 'directory') ||

case 'notebook':
if (ft !== null && ft.contentType === 'notebook') {
return ft;
}
return (

@@ -682,8 +696,4 @@ find(this._fileTypes, ft => ft.contentType === 'notebook') ||

// Find the best matching extension.
if (model.name || model.path) {
const name = model.name || PathExt.basename(model.path!);
const fts = this.getFileTypesForPath(name);
if (fts.length > 0) {
return fts[0];
}
if (ft !== null) {
return ft;
}

@@ -690,0 +700,0 @@ return (

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