Proper fix for missing node types in web build

Using `path` in web for these cases is ok (but not ideal) because webpack shims it out
This commit is contained in:
Matt Bierner
2025-10-14 12:14:28 -07:00
parent 6699439de0
commit 98ad0f55db
5 changed files with 26 additions and 6 deletions

View File

@@ -3,10 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'path';
import * as picomatch from 'picomatch';
import * as vscode from 'vscode';
import { TextDocumentEdit } from 'vscode-languageclient';
import { Utils } from 'vscode-uri';
import { MdLanguageClient } from '../client/client';
import { Delayer } from '../util/async';
import { noopToken } from '../util/cancellation';
@@ -137,7 +137,7 @@ class UpdateLinksOnFileRenameHandler extends Disposable {
const choice = await vscode.window.showInformationMessage(
newResources.length === 1
? vscode.l10n.t("Update Markdown links for '{0}'?", path.basename(newResources[0].fsPath))
? vscode.l10n.t("Update Markdown links for '{0}'?", Utils.basename(newResources[0]))
: this._getConfirmMessage(vscode.l10n.t("Update Markdown links for the following {0} files?", newResources.length), newResources), {
modal: true,
}, rejectItem, acceptItem, alwaysItem, neverItem);
@@ -197,7 +197,7 @@ class UpdateLinksOnFileRenameHandler extends Disposable {
const paths = [start];
paths.push('');
paths.push(...resourcesToConfirm.slice(0, MAX_CONFIRM_FILES).map(r => path.basename(r.fsPath)));
paths.push(...resourcesToConfirm.slice(0, MAX_CONFIRM_FILES).map(r => Utils.basename(r)));
if (resourcesToConfirm.length > MAX_CONFIRM_FILES) {
if (resourcesToConfirm.length - MAX_CONFIRM_FILES === 1) {