migrate github-extension to ESM

This commit is contained in:
Johannes
2025-04-16 16:04:12 +02:00
parent c7f69b4b93
commit 493874c390
21 changed files with 217 additions and 278 deletions

View File

@@ -5,10 +5,12 @@
import { TextDecoder } from 'util';
import { commands, env, ProgressLocation, Uri, window, workspace, QuickPickOptions, FileType, l10n, Disposable, TextDocumentContentProvider } from 'vscode';
import TelemetryReporter from '@vscode/extension-telemetry';
import { getOctokit } from './auth';
import { GitErrorCodes, PushErrorHandler, Remote, Repository } from './typings/git';
import { getOctokit } from './auth.js';
import { GitErrorCodes, PushErrorHandler, Remote, Repository } from './typings/git.js';
import * as path from 'path';
import TelemetryReporter from '@vscode/extension-telemetry';
type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T;
@@ -100,7 +102,7 @@ export class GithubPushErrorHandler implements PushErrorHandler {
private disposables: Disposable[] = [];
private commandErrors = new CommandErrorOutputTextDocumentContentProvider();
constructor(private readonly telemetryReporter: TelemetryReporter) {
constructor(private readonly telemetryReporter: TelemetryReporter.default) {
this.disposables.push(workspace.registerTextDocumentContentProvider('github-output', this.commandErrors));
}