From 62974a184a27b10ae38de569cda04b4127b52b49 Mon Sep 17 00:00:00 2001 From: Nathan Turinski Date: Thu, 26 Oct 2023 14:49:33 -0700 Subject: [PATCH] Add comment --- auth/package-lock.json | 11 +++++++++++ auth/package.json | 1 + auth/src/VSCodeAzureSubscriptionProvider.ts | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/auth/package-lock.json b/auth/package-lock.json index 2807e78bfa..16b5b791da 100644 --- a/auth/package-lock.json +++ b/auth/package-lock.json @@ -20,6 +20,7 @@ "@types/html-to-text": "^8.1.0", "@types/mocha": "^7.0.2", "@types/node": "^18.18.7", + "@types/node-fetch": "2.6.7", "@types/semver": "^7.3.9", "@types/uuid": "^9.0.1", "@types/vscode": "1.76.0", @@ -441,6 +442,16 @@ "undici-types": "~5.26.4" } }, + "node_modules/@types/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-lX17GZVpJ/fuCjguZ5b3TjEbSENxmEk1B2z02yoXSK9WMEWRivhdSY73wWMn6bpcCDAOh6qAdktpKHIlkDk2lg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.0" + } + }, "node_modules/@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", diff --git a/auth/package.json b/auth/package.json index 984d5c383b..db4012ab5c 100644 --- a/auth/package.json +++ b/auth/package.json @@ -37,6 +37,7 @@ "@types/html-to-text": "^8.1.0", "@types/mocha": "^7.0.2", "@types/node": "^18.18.7", + "@types/node-fetch": "2.6.7", "@types/semver": "^7.3.9", "@types/uuid": "^9.0.1", "@types/vscode": "1.76.0", diff --git a/auth/src/VSCodeAzureSubscriptionProvider.ts b/auth/src/VSCodeAzureSubscriptionProvider.ts index 5f0a371d02..62ff2c242a 100644 --- a/auth/src/VSCodeAzureSubscriptionProvider.ts +++ b/auth/src/VSCodeAzureSubscriptionProvider.ts @@ -5,7 +5,7 @@ import type { SubscriptionClient, TenantIdDescription } from '@azure/arm-subscriptions'; // Keep this as `import type` to avoid actually loading the package before necessary import type { TokenCredential } from '@azure/core-auth'; // Keep this as `import type` to avoid actually loading the package (at all, this one is dev-only) -import fetch from 'node-fetch'; +import fetch from 'node-fetch'; // have to explicitly use node-fetch v2.6.7 otherwise when @azure/client-core makes a streaming request, it fails on windows import * as vscode from 'vscode'; import type { AzureAuthentication } from './AzureAuthentication'; import type { AzureSubscription, SubscriptionId, TenantId } from './AzureSubscription';