From 641429038be7da185d74256969f90e7f0c29845a Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 16 Dec 2022 15:06:16 -0800 Subject: [PATCH 1/2] Switch to standard imports --- extensions/microsoft-authentication/src/AADHelper.ts | 2 +- extensions/npm/src/preferred-pm.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/microsoft-authentication/src/AADHelper.ts b/extensions/microsoft-authentication/src/AADHelper.ts index 3609ca4bf4782..8bb4b52b2fd13 100644 --- a/extensions/microsoft-authentication/src/AADHelper.ts +++ b/extensions/microsoft-authentication/src/AADHelper.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as querystring from 'querystring'; -import path = require('path'); +import * as path from 'path'; import Logger from './logger'; import { isSupportedEnvironment } from './utils'; import { generateCodeChallenge, generateCodeVerifier, randomUUID } from './cryptoUtils'; diff --git a/extensions/npm/src/preferred-pm.ts b/extensions/npm/src/preferred-pm.ts index 58be79acfdb0a..f69933d10f1c3 100644 --- a/extensions/npm/src/preferred-pm.ts +++ b/extensions/npm/src/preferred-pm.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import findWorkspaceRoot = require('../node_modules/find-yarn-workspace-root'); -import findUp = require('find-up'); +import * as findUp from 'find-up'; import * as path from 'path'; -import whichPM = require('which-pm'); +import * as whichPM from 'which-pm'; import { Uri, workspace } from 'vscode'; interface PreferredProperties { From 615a9180cc3360556eb8c3ccd5f4532667e57662 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 16 Dec 2022 15:07:35 -0800 Subject: [PATCH 2/2] Add one more case --- extensions/github/src/pushErrorHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/github/src/pushErrorHandler.ts b/extensions/github/src/pushErrorHandler.ts index 7c3da24e8e047..6d4b4112811ec 100644 --- a/extensions/github/src/pushErrorHandler.ts +++ b/extensions/github/src/pushErrorHandler.ts @@ -7,7 +7,7 @@ import { TextDecoder } from 'util'; import { commands, env, ProgressLocation, Uri, window, workspace, QuickPickOptions, FileType, l10n } from 'vscode'; import { getOctokit } from './auth'; import { GitErrorCodes, PushErrorHandler, Remote, Repository } from './typings/git'; -import path = require('path'); +import * as path from 'path'; type Awaited = T extends PromiseLike ? Awaited : T;