Skip to content

Commit

Permalink
package lock and use insiders
Browse files Browse the repository at this point in the history
  • Loading branch information
ejizba committed Jul 31, 2020
1 parent f45d568 commit a106c32
Show file tree
Hide file tree
Showing 9 changed files with 612 additions and 247 deletions.
10 changes: 7 additions & 3 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as path from 'path';
import * as request from 'request';
import * as buffer from 'vinyl-buffer';
import * as source from 'vinyl-source-stream';
import { gulp_installAzureAccount, gulp_installVSCodeExtension, gulp_webpack } from 'vscode-azureextensiondev';
import { gulp_installVSCodeExtension, gulp_webpack } from 'vscode-azureextensiondev';

async function prepareForWebpack(): Promise<void> {
const mainJsPath: string = path.join(__dirname, 'main.js');
Expand Down Expand Up @@ -79,9 +79,13 @@ function installFuncCli() {
}

async function gulp_installPythonExtension() {
return gulp_installVSCodeExtension('ms-python', 'python');
return gulp_installVSCodeExtension('ms-python', 'python', true);
}

async function gulp_installInsidersAzureAccount(): Promise<void> {
return gulp_installVSCodeExtension('ms-vscode', 'azure-account', true);
}

exports['webpack-dev'] = gulp.series(prepareForWebpack, () => gulp_webpack('development'));
exports['webpack-prod'] = gulp.series(prepareForWebpack, () => gulp_webpack('production'));
exports.preTest = gulp.series(gulp_installAzureAccount, gulp_installPythonExtension, getFuncLink, installFuncCli);
exports.preTest = gulp.series(gulp_installInsidersAzureAccount, gulp_installPythonExtension, getFuncLink, installFuncCli);
832 changes: 596 additions & 236 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"icon": "resources/azure-functions.png",
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"engines": {
"vscode": "^1.40.0"
"vscode": "^1.48.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -1026,7 +1026,7 @@
"@types/ps-tree": "^1.1.0",
"@types/request": "2.0.7",
"@types/semver": "^5.5.0",
"@types/vscode": "1.40.0",
"@types/vscode": "1.47.0",
"@types/websocket": "^1.0.0",
"@types/xml2js": "^0.4.5",
"@types/xregexp": "^3.0.30",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/appSettings/getLocalSettingsFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { tryGetFunctionProjectRoot } from "../createNewProject/verifyIsProject";
*/
export async function getLocalSettingsFile(message: string, workspacePath?: string): Promise<string> {
// tslint:disable-next-line: strict-boolean-expressions
const folders: WorkspaceFolder[] = workspace.workspaceFolders || [];
const folders: readonly WorkspaceFolder[] = workspace.workspaceFolders || [];
if (workspacePath || folders.length === 1) {
workspacePath = workspacePath || folders[0].uri.fsPath;
const projectPath: string | undefined = await tryGetFunctionProjectRoot(workspacePath, true /* suppressPrompt */);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/createNewProject/OpenFolderStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class OpenFolderStep extends AzureWizardExecuteStep<IProjectWizardContext

public async execute(context: IProjectWizardContext): Promise<void> {
// tslint:disable-next-line:strict-boolean-expressions
const openFolders: WorkspaceFolder[] = workspace.workspaceFolders || [];
const openFolders: readonly WorkspaceFolder[] = workspace.workspaceFolders || [];
if (context.openBehavior === 'AddToWorkspace' && openFolders.length === 0) {
// no point in adding to an empty workspace
context.openBehavior = 'OpenInCurrentWindow';
Expand Down
2 changes: 1 addition & 1 deletion src/tree/AzureAccountTreeItemWithProjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class AzureAccountTreeItemWithProjects extends AzureAccountTreeItemBase {
this._projectDisposables = [];

// tslint:disable-next-line: strict-boolean-expressions
const folders: WorkspaceFolder[] = workspace.workspaceFolders || [];
const folders: readonly WorkspaceFolder[] = workspace.workspaceFolders || [];
for (const folder of folders) {
const projectPath: string | undefined = await tryGetFunctionProjectRoot(folder.uri.fsPath, true /* suppressPrompt */);
if (projectPath) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function selectWorkspaceItem(ui: IAzureUserInput, placeHolder: stri

export function getContainingWorkspace(fsPath: string): vscode.WorkspaceFolder | undefined {
// tslint:disable-next-line:strict-boolean-expressions
const openFolders: vscode.WorkspaceFolder[] = vscode.workspace.workspaceFolders || [];
const openFolders: readonly vscode.WorkspaceFolder[] = vscode.workspace.workspaceFolders || [];
return openFolders.find((f: vscode.WorkspaceFolder): boolean => {
return fsUtils.isPathEqual(f.uri.fsPath, fsPath) || fsUtils.isSubpath(f.uri.fsPath, fsPath);
});
Expand Down
2 changes: 1 addition & 1 deletion test/global.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export async function cleanTestWorkspace(): Promise<void> {
}

async function initTestWorkspacePath(): Promise<string> {
const workspaceFolders: vscode.WorkspaceFolder[] | undefined = vscode.workspace.workspaceFolders;
const workspaceFolders: readonly vscode.WorkspaceFolder[] | undefined = vscode.workspace.workspaceFolders;
if (!workspaceFolders) {
throw new Error("No workspace is open");
} else {
Expand Down
3 changes: 2 additions & 1 deletion test/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ async function main(): Promise<void> {
extensionTestsEnv: {
DEBUGTELEMETRY: 'v',
MOCHA_timeout: '20000'
}
},
version: 'insiders'
});
} catch (err) {
console.error('Failed to run tests');
Expand Down

0 comments on commit a106c32

Please sign in to comment.