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

@jupyterlab/filebrowser

Package Overview
Dependencies
Maintainers
10
Versions
396
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyterlab/filebrowser - npm Package Compare versions

Comparing version 4.2.0-beta.1 to 4.2.0-beta.2

4

lib/browser.d.ts

@@ -164,4 +164,4 @@ import { Contents } from '@jupyterlab/services';

*
* @param driveName: the name of the drive
* @param localPath: the local path on the drive.
* @param driveName the name of the drive
* @param localPath the local path on the drive.
*

@@ -168,0 +168,0 @@ * @returns the full drive path

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

*
* @param driveName: the name of the drive
* @param localPath: the local path on the drive.
* @param driveName the name of the drive
* @param localPath the local path on the drive.
*

@@ -360,0 +360,0 @@ * @returns the full drive path

@@ -12,3 +12,3 @@ import { ITranslator } from '@jupyterlab/translation';

*
* @param model - The file browser view model.
* @param options Constructor options.
*/

@@ -15,0 +15,0 @@ constructor(options: BreadCrumbs.IOptions);

@@ -47,3 +47,3 @@ // Copyright (c) Jupyter Development Team.

*
* @param model - The file browser view model.
* @param options Constructor options.
*/

@@ -50,0 +50,0 @@ constructor(options) {

@@ -0,1 +1,2 @@

import { Time } from '@jupyterlab/coreutils';
import { DocumentRegistry } from '@jupyterlab/docregistry';

@@ -16,3 +17,3 @@ import { Contents } from '@jupyterlab/services';

*
* @param model - The file browser view model.
* @param options The constructor options
*/

@@ -194,2 +195,5 @@ constructor(options: DirListing.IOptions);

protected onAfterShow(msg: Message): void;
private _updateModifiedSize;
protected updateModified(items: Contents.IModel[], nodes: HTMLElement[]): void;
protected updateNodes(items: Contents.IModel[], nodes: HTMLElement[]): void;
/**

@@ -374,2 +378,4 @@ * A handler invoked on an `'update-request'` message.

private _focusIndex;
private _modifiedWidth;
private _modifiedStyle;
}

@@ -464,2 +470,12 @@ /**

/**
* Update an item's last modified date.
*
* @param modified - Element containing the file's last modified date.
*
* @param modifiedDate - String representation of the last modified date.
*
* @param modifiedStyle - The date style for the modified column: narrow, short, or long
*/
updateItemModified?(modified: HTMLElement, modifiedDate: string, modifiedStyle: Time.HumanStyle): void;
/**
* Update an item node to reflect the current state of a model.

@@ -471,5 +487,7 @@ *

*
* @param modifiedStyle - The date style for the modified column: narrow, short, or long
*
* @param fileType - The file type of the item, if applicable.
*/
updateItemNode(node: HTMLElement, model: Contents.IModel, fileType?: DocumentRegistry.IFileType, translator?: ITranslator, hiddenColumns?: Set<DirListing.ToggleableColumn>, selected?: boolean): void;
updateItemNode(node: HTMLElement, model: Contents.IModel, fileType?: DocumentRegistry.IFileType, translator?: ITranslator, hiddenColumns?: Set<DirListing.ToggleableColumn>, selected?: boolean, modifiedStyle?: Time.HumanStyle): void;
/**

@@ -558,2 +576,12 @@ * Get the node containing the file name.

/**
* Update an item's last modified date.
*
* @param modified - Element containing the file's last modified date.
*
* @param modifiedDate - String representation of the last modified date.
*
* @param modifiedStyle - The date style for the modified column: narrow, short, or long
*/
updateItemModified(modified: HTMLElement, modifiedDate: string, modifiedStyle: Time.HumanStyle): void;
/**
* Update an item node to reflect the current state of a model.

@@ -568,3 +596,3 @@ *

*/
updateItemNode(node: HTMLElement, model: Contents.IModel, fileType?: DocumentRegistry.IFileType, translator?: ITranslator, hiddenColumns?: Set<DirListing.ToggleableColumn>, selected?: boolean): void;
updateItemNode(node: HTMLElement, model: Contents.IModel, fileType?: DocumentRegistry.IFileType, translator?: ITranslator, hiddenColumns?: Set<DirListing.ToggleableColumn>, selected?: boolean, modifiedStyle?: Time.HumanStyle): void;
/**

@@ -571,0 +599,0 @@ * Get the node containing the file name.

@@ -115,7 +115,7 @@ import { IChangedArgs } from '@jupyterlab/coreutils';

*
* @param path - The path to the file or directory.
* @param path The path to the file or directory.
*
* @returns A promise with the contents of the directory.
*/
cd(newValue?: string): Promise<void>;
cd(path?: string): Promise<void>;
/**

@@ -122,0 +122,0 @@ * Download a file.

@@ -204,16 +204,16 @@ // Copyright (c) Jupyter Development Team.

*
* @param path - The path to the file or directory.
* @param path The path to the file or directory.
*
* @returns A promise with the contents of the directory.
*/
async cd(newValue = '.') {
if (newValue !== '.') {
newValue = this.manager.services.contents.resolvePath(this._model.path, newValue);
async cd(path = '.') {
if (path !== '.') {
path = this.manager.services.contents.resolvePath(this._model.path, path);
}
else {
newValue = this._pendingPath || this._model.path;
path = this._pendingPath || this._model.path;
}
if (this._pending) {
// Collapse requests to the same directory.
if (newValue === this._pendingPath) {
if (path === this._pendingPath) {
return this._pending;

@@ -226,4 +226,4 @@ }

const options = { content: true };
this._pendingPath = newValue;
if (oldValue !== newValue) {
this._pendingPath = path;
if (oldValue !== path) {
this._sessions.length = 0;

@@ -233,3 +233,3 @@ }

this._pending = services.contents
.get(newValue, options)
.get(path, options)
.then(contents => {

@@ -242,7 +242,7 @@ if (this.isDisposed) {

this._pending = null;
if (oldValue !== newValue) {
if (oldValue !== path) {
// If there is a state database and a unique key, save the new path.
// We don't need to wait on the save to continue.
if (this._state && this._key) {
void this._state.save(this._key, { path: newValue });
void this._state.save(this._key, { path });
}

@@ -252,3 +252,3 @@ this._pathChanged.emit({

oldValue,
newValue
newValue: path
});

@@ -262,5 +262,3 @@ }

this._pending = null;
if (error.response &&
error.response.status === 404 &&
newValue !== '/') {
if (error.response && error.response.status === 404 && path !== '/') {
error.message = this._trans.__('Directory not found: "%1"', this._model.path);

@@ -267,0 +265,0 @@ console.error(error);

@@ -16,3 +16,3 @@ // Copyright (c) Jupyter Development Team.

*
* @param props: the props for the component.
* @param props the props for the component.
*

@@ -19,0 +19,0 @@ * @returns a tsx component for the file upload status.

{
"name": "@jupyterlab/filebrowser",
"version": "4.2.0-beta.1",
"version": "4.2.0-beta.2",
"description": "JupyterLab - FileBrowser Widget",

@@ -37,3 +37,2 @@ "homepage": "https://github.com/jupyterlab/jupyterlab",

"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
"docs": "typedoc src",
"test": "jest",

@@ -46,11 +45,11 @@ "test:cov": "jest --collect-coverage",

"dependencies": {
"@jupyterlab/apputils": "^4.3.0-beta.1",
"@jupyterlab/coreutils": "^6.2.0-beta.1",
"@jupyterlab/docmanager": "^4.2.0-beta.1",
"@jupyterlab/docregistry": "^4.2.0-beta.1",
"@jupyterlab/services": "^7.2.0-beta.1",
"@jupyterlab/statedb": "^4.2.0-beta.1",
"@jupyterlab/statusbar": "^4.2.0-beta.1",
"@jupyterlab/translation": "^4.2.0-beta.1",
"@jupyterlab/ui-components": "^4.2.0-beta.1",
"@jupyterlab/apputils": "^4.3.0-beta.2",
"@jupyterlab/coreutils": "^6.2.0-beta.2",
"@jupyterlab/docmanager": "^4.2.0-beta.2",
"@jupyterlab/docregistry": "^4.2.0-beta.2",
"@jupyterlab/services": "^7.2.0-beta.2",
"@jupyterlab/statedb": "^4.2.0-beta.2",
"@jupyterlab/statusbar": "^4.2.0-beta.2",
"@jupyterlab/translation": "^4.2.0-beta.2",
"@jupyterlab/ui-components": "^4.2.0-beta.2",
"@lumino/algorithm": "^2.0.1",

@@ -69,7 +68,6 @@ "@lumino/coreutils": "^2.1.2",

"devDependencies": {
"@jupyterlab/testing": "^4.2.0-beta.1",
"@jupyterlab/testing": "^4.2.0-beta.2",
"@types/jest": "^29.2.0",
"jest": "^29.2.0",
"rimraf": "~5.0.5",
"typedoc": "~0.24.7",
"typescript": "~5.1.6"

@@ -76,0 +74,0 @@ },

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

*
* @param driveName: the name of the drive
* @param localPath: the local path on the drive.
* @param driveName the name of the drive
* @param localPath the local path on the drive.
*

@@ -420,0 +420,0 @@ * @returns the full drive path

@@ -67,3 +67,3 @@ // Copyright (c) Jupyter Development Team.

*
* @param model - The file browser view model.
* @param options Constructor options.
*/

@@ -70,0 +70,0 @@ constructor(options: BreadCrumbs.IOptions) {

@@ -237,18 +237,15 @@ // Copyright (c) Jupyter Development Team.

*
* @param path - The path to the file or directory.
* @param path The path to the file or directory.
*
* @returns A promise with the contents of the directory.
*/
async cd(newValue = '.'): Promise<void> {
if (newValue !== '.') {
newValue = this.manager.services.contents.resolvePath(
this._model.path,
newValue
);
async cd(path = '.'): Promise<void> {
if (path !== '.') {
path = this.manager.services.contents.resolvePath(this._model.path, path);
} else {
newValue = this._pendingPath || this._model.path;
path = this._pendingPath || this._model.path;
}
if (this._pending) {
// Collapse requests to the same directory.
if (newValue === this._pendingPath) {
if (path === this._pendingPath) {
return this._pending;

@@ -261,4 +258,4 @@ }

const options: Contents.IFetchOptions = { content: true };
this._pendingPath = newValue;
if (oldValue !== newValue) {
this._pendingPath = path;
if (oldValue !== path) {
this._sessions.length = 0;

@@ -268,3 +265,3 @@ }

this._pending = services.contents
.get(newValue, options)
.get(path, options)
.then(contents => {

@@ -277,7 +274,7 @@ if (this.isDisposed) {

this._pending = null;
if (oldValue !== newValue) {
if (oldValue !== path) {
// If there is a state database and a unique key, save the new path.
// We don't need to wait on the save to continue.
if (this._state && this._key) {
void this._state.save(this._key, { path: newValue });
void this._state.save(this._key, { path });
}

@@ -288,3 +285,3 @@

oldValue,
newValue
newValue: path
});

@@ -298,7 +295,3 @@ }

this._pending = null;
if (
error.response &&
error.response.status === 404 &&
newValue !== '/'
) {
if (error.response && error.response.status === 404 && path !== '/') {
error.message = this._trans.__(

@@ -305,0 +298,0 @@ 'Directory not found: "%1"',

Sorry, the diff of this file is too big to display

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 too big to display

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