mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 (#8911)
* Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 * update distro * fix layering * update distro * fix tests
This commit is contained in:
@@ -83,7 +83,7 @@ export class BookTreeItem extends vscode.TreeItem {
|
||||
if (this.book.tableOfContents.sections[i].url) {
|
||||
// TODO: Currently only navigating to notebooks. Need to add logic for markdown.
|
||||
let pathToNotebook = path.join(this.book.root, 'content', this.book.tableOfContents.sections[i].url.concat('.ipynb'));
|
||||
// tslint:disable-next-line:no-sync
|
||||
// eslint-disable-next-line no-sync
|
||||
if (fs.existsSync(pathToNotebook)) {
|
||||
this._previousUri = pathToNotebook;
|
||||
return;
|
||||
@@ -99,7 +99,7 @@ export class BookTreeItem extends vscode.TreeItem {
|
||||
if (this.book.tableOfContents.sections[i].url) {
|
||||
// TODO: Currently only navigating to notebooks. Need to add logic for markdown.
|
||||
let pathToNotebook = path.join(this.book.root, 'content', this.book.tableOfContents.sections[i].url.concat('.ipynb'));
|
||||
// tslint:disable-next-line:no-sync
|
||||
// eslint-disable-next-line no-sync
|
||||
if (fs.existsSync(pathToNotebook)) {
|
||||
this._nextUri = pathToNotebook;
|
||||
return;
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { ApiWrapper } from './apiWrapper';
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -34,6 +32,3 @@ export function openNotebookError(resource: string, error: string): string { ret
|
||||
export function openMarkdownError(resource: string, error: string): string { return localize('openMarkdownError', "Open markdown {0} failed: {1}", resource, error); }
|
||||
export function openUntitledNotebookError(resource: string, error: string): string { return localize('openUntitledNotebookError', "Open untitled notebook {0} as untitled failed: {1}", resource, error); }
|
||||
export function openExternalLinkError(resource: string, error: string): string { return localize('openExternalLinkError', "Open link {0} failed: {1}", resource, error); }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as crypto from 'crypto';
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Deferred promise
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
export interface INotebook {
|
||||
|
||||
readonly cells: ICell[];
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export interface IServerInstance {
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { nb } from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { ServerConnection, SessionManager } from '@jupyterlab/services';
|
||||
|
||||
@@ -222,6 +222,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
||||
let pythonSourcePath = path.join(installPath, constants.pythonBundleVersion);
|
||||
if (await utils.exists(pythonSourcePath)) {
|
||||
try {
|
||||
// eslint-disable-next-line no-sync
|
||||
fs.removeSync(pythonSourcePath);
|
||||
} catch (err) {
|
||||
backgroundOperation.updateStatus(azdata.TaskStatus.InProgress, msgPythonUnpackError);
|
||||
@@ -676,7 +677,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
||||
}
|
||||
|
||||
let condaExePath = this.getCondaExePath();
|
||||
// tslint:disable-next-line:no-sync
|
||||
// eslint-disable-next-line no-sync
|
||||
return fs.existsSync(condaExePath);
|
||||
}
|
||||
|
||||
@@ -693,7 +694,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
||||
|
||||
let useExistingInstall = JupyterServerInstallation.getExistingPythonSetting(apiWrapper);
|
||||
let pythonExe = JupyterServerInstallation.getPythonExePath(pathSetting, useExistingInstall);
|
||||
// tslint:disable-next-line:no-sync
|
||||
// eslint-disable-next-line no-sync
|
||||
return fs.existsSync(pythonExe);
|
||||
}
|
||||
|
||||
@@ -724,7 +725,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
||||
let notebookConfig = apiWrapper.getConfiguration(constants.notebookConfigKey);
|
||||
if (notebookConfig) {
|
||||
let configPythonPath = notebookConfig[constants.pythonPathConfigKey];
|
||||
// tslint:disable-next-line:no-sync
|
||||
// eslint-disable-next-line no-sync
|
||||
if (configPythonPath && fs.existsSync(configPythonPath)) {
|
||||
path = configPythonPath;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { nb } from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
@@ -168,4 +166,3 @@ export class ServerInstanceFactory {
|
||||
return new PerFolderServerInstance(options);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as fs from 'fs-extra';
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { nb } from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { Contents } from '@jupyterlab/services';
|
||||
|
||||
@@ -12,7 +12,9 @@ import * as os from 'os';
|
||||
import * as uuid from 'uuid';
|
||||
import { BookTreeViewProvider } from '../../book/bookTreeView';
|
||||
import { BookTreeItem } from '../../book/bookTreeItem';
|
||||
import { promisify } from 'util';
|
||||
import { MockExtensionContext } from '../common/stubs';
|
||||
import { exists } from '../../common/utils';
|
||||
|
||||
export interface ExpectedBookItem {
|
||||
title: string;
|
||||
@@ -185,8 +187,8 @@ describe('BookTreeViewProviderTests', function() {
|
||||
|
||||
this.afterAll(async function () {
|
||||
console.log('Removing temporary files...');
|
||||
if (fs.existsSync(rootFolderPath)) {
|
||||
rimraf.sync(rootFolderPath);
|
||||
if (await exists(rootFolderPath)) {
|
||||
await promisify(rimraf)(rootFolderPath);
|
||||
}
|
||||
console.log('Successfully removed temporary files.');
|
||||
});
|
||||
@@ -228,8 +230,8 @@ describe('BookTreeViewProviderTests', function() {
|
||||
});
|
||||
|
||||
this.afterAll(async function () {
|
||||
if (fs.existsSync(rootFolderPath)) {
|
||||
rimraf.sync(rootFolderPath);
|
||||
if (await exists(rootFolderPath)) {
|
||||
await promisify(rimraf)(rootFolderPath);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -273,8 +275,8 @@ describe('BookTreeViewProviderTests', function() {
|
||||
});
|
||||
|
||||
this.afterAll(async function () {
|
||||
if (fs.existsSync(rootFolderPath)) {
|
||||
rimraf.sync(rootFolderPath);
|
||||
if (await exists(rootFolderPath)) {
|
||||
await promisify(rimraf)(rootFolderPath);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -327,12 +329,9 @@ describe('BookTreeViewProviderTests', function() {
|
||||
});
|
||||
|
||||
this.afterAll(async function () {
|
||||
if (fs.existsSync(rootFolderPath)) {
|
||||
rimraf.sync(rootFolderPath);
|
||||
if (await exists(rootFolderPath)) {
|
||||
await promisify(rimraf)(rootFolderPath);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
import { IServerInstance } from '../jupyter/common';
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// This code is originally from https://github.com/Microsoft/vscode/blob/master/src/vs/base/test/node/port.test.ts
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import * as net from 'net';
|
||||
import 'mocha';
|
||||
@@ -61,4 +59,3 @@ describe('Ports', () => {
|
||||
}, err => done(err));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as should from 'should';
|
||||
import 'mocha';
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export class MockExtensionContext implements vscode.ExtensionContext {
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import * as should from 'should';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as should from 'should';
|
||||
import 'mocha';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as should from 'should';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import { nb } from 'azdata';
|
||||
@@ -200,4 +198,3 @@ describe('Jupyter Future', function (): void {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as should from 'should';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import { nb } from 'azdata';
|
||||
|
||||
Reference in New Issue
Block a user