Skip to content

Commit 72d1f24

Browse files
committed
Updates VS Code req & dependencies
1 parent 8f0ee9b commit 72d1f24

File tree

14 files changed

+308
-299
lines changed

14 files changed

+308
-299
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"engines": {
77
"node": ">= 22.12.0",
88
"pnpm": ">= 10.0.0",
9-
"vscode": "^1.82.0"
9+
"vscode": "^1.92.0"
1010
},
1111
"license": "SEE LICENSE IN LICENSE",
1212
"publisher": "eamodio",
@@ -20210,13 +20210,13 @@
2021020210
"@twbs/fantasticon": "3.0.0",
2021120211
"@types/eslint__js": "8.42.3",
2021220212
"@types/mocha": "10.0.10",
20213-
"@types/node": "18.15.13",
20213+
"@types/node": "20.14.15",
2021420214
"@types/react": "17.0.83",
2021520215
"@types/react-dom": "17.0.25",
2021620216
"@types/slug": "5.0.9",
2021720217
"@types/sortablejs": "1.15.8",
20218-
"@types/vscode": "1.82.0",
20219-
"@typescript-eslint/parser": "8.24.0",
20218+
"@types/vscode": "1.92.0",
20219+
"@typescript-eslint/parser": "8.24.1",
2022020220
"@vscode/test-cli": "^0.0.10",
2022120221
"@vscode/test-electron": "2.4.1",
2022220222
"@vscode/test-web": "0.0.66",
@@ -20229,12 +20229,12 @@
2022920229
"css-loader": "7.1.2",
2023020230
"css-minimizer-webpack-plugin": "7.0.0",
2023120231
"cssnano-preset-advanced": "7.0.6",
20232-
"esbuild": "0.24.2",
20232+
"esbuild": "0.25.0",
2023320233
"esbuild-loader": "4.3.0",
2023420234
"esbuild-node-externals": "1.18.0",
2023520235
"esbuild-sass-plugin": "3.3.1",
2023620236
"eslint": "9.20.1",
20237-
"eslint-import-resolver-oxc": "0.10.1",
20237+
"eslint-import-resolver-oxc": "0.11.0",
2023820238
"eslint-plugin-anti-trojan-source": "1.1.1",
2023920239
"eslint-plugin-import-x": "4.6.1",
2024020240
"eslint-plugin-lit": "1.15.0",
@@ -20261,15 +20261,15 @@
2026120261
"terser-webpack-plugin": "5.3.11",
2026220262
"ts-loader": "9.5.2",
2026320263
"typescript": "5.8.1-rc",
20264-
"typescript-eslint": "8.24.0",
20264+
"typescript-eslint": "8.24.1",
2026520265
"webpack": "5.98.0",
2026620266
"webpack-bundle-analyzer": "4.10.2",
2026720267
"webpack-cli": "6.0.1",
2026820268
"webpack-node-externals": "3.0.0",
2026920269
"webpack-require-from": "1.8.6"
2027020270
},
2027120271
"resolutions": {
20272-
"esbuild": "0.24.2",
20272+
"esbuild": "0.25.0",
2027320273
"iconv-lite": "0.6.3",
2027420274
"node-fetch": "2.7.0",
2027520275
"semver-regex": "4.0.5"

pnpm-lock.yaml

Lines changed: 258 additions & 251 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/esbuild.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async function buildExtension(target, mode) {
9090
sourcemap: mode !== 'production',
9191
// splitting: target !== 'webworker',
9292
// chunkNames: 'feature-[name]-[hash]',
93-
target: ['es2022', 'chrome102', 'node16.14.2'],
93+
target: ['es2023', 'chrome124', 'node20.14.0'],
9494
treeShaking: true,
9595
tsconfig: target === 'webworker' ? 'tsconfig.browser.json' : 'tsconfig.json',
9696
// watch: watch,
@@ -165,7 +165,7 @@ async function buildGraphWebview(mode) {
165165
outdir: out,
166166
platform: 'browser',
167167
sourcemap: true,
168-
target: ['es2022', 'chrome102'],
168+
target: ['es2023', 'chrome124'],
169169
treeShaking: true,
170170
tsconfig: 'src/webviews/apps/tsconfig.json',
171171
// watch: watch,

scripts/esbuild.tests.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async function buildTests(target, mode) {
3737
platform: target === 'webworker' ? 'browser' : target,
3838
plugins: [nodeExternalsPlugin()],
3939
sourcemap: mode !== 'production',
40-
target: ['es2022', 'chrome102', 'node16.14.2'],
40+
target: ['es2023', 'chrome124', 'node20.14.0'],
4141
treeShaking: true,
4242
tsconfig: target === 'webworker' ? 'tsconfig.test.browser.json' : 'tsconfig.test.json',
4343
};

src/env/browser/base64.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ export function base64(data: string | Uint8Array): string {
1010
for (let i = 0, { length } = bytes; i < length; i++) {
1111
output += fromCharCode(bytes[i]);
1212
}
13-
// eslint-disable-next-line @typescript-eslint/no-deprecated
1413
return globalThis.btoa(output);
1514
}
1615

1716
export function fromBase64(s: string): Uint8Array {
18-
// eslint-disable-next-line @typescript-eslint/no-deprecated
1917
const decoded = globalThis.atob(s);
2018

2119
const len = decoded.length;

src/env/browser/md5.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,5 @@ function hexToBinary(hex: string) {
211211

212212
export function md5(s: string, encoding: 'base64' | 'hex' = 'hex'): string {
213213
const h = hex(md51(s));
214-
// eslint-disable-next-line @typescript-eslint/no-deprecated
215214
return encoding === 'hex' ? h : globalThis.btoa(hexToBinary(h));
216215
}

src/env/node/fetch.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as process from 'process';
2-
import * as url from 'url';
32
import { HttpsProxyAgent } from 'https-proxy-agent';
43
import fetch from 'node-fetch';
54
import { configuration } from '../../system/-webview/configuration';
@@ -28,8 +27,13 @@ export function getProxyAgent(strictSSL?: boolean): HttpsProxyAgent | undefined
2827

2928
if (proxyUrl) {
3029
Logger.debug(`Using https proxy: ${proxyUrl}`);
30+
const proxyURL = new URL(proxyUrl);
3131
return new HttpsProxyAgent({
32-
...url.parse(proxyUrl),
32+
host: proxyURL.hostname,
33+
port: proxyURL.port,
34+
protocol: proxyURL.protocol,
35+
auth: proxyURL.username || proxyURL.password ? `${proxyURL.username}:${proxyURL.password}` : undefined,
36+
path: proxyURL.pathname,
3337
rejectUnauthorized: strictSSL,
3438
});
3539
}

src/env/node/git/shell.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ExecException } from 'child_process';
1+
import type { ExecFileException } from 'child_process';
22
import { exec, execFile } from 'child_process';
33
import type { Stats } from 'fs';
44
import { access, constants, existsSync, statSync } from 'fs';
@@ -160,7 +160,7 @@ const bufferExceededRegex = /stdout maxBuffer( length)? exceeded/;
160160

161161
export class RunError extends Error {
162162
constructor(
163-
private readonly original: ExecException,
163+
private readonly original: ExecFileException,
164164
public readonly stdout: string,
165165
public readonly stderr: string,
166166
) {
@@ -179,8 +179,8 @@ export class RunError extends Error {
179179
return this.original.killed;
180180
}
181181

182-
get code(): number | undefined {
183-
return this.original.code;
182+
get code(): string | number | undefined {
183+
return this.original.code ?? undefined;
184184
}
185185

186186
get signal(): NodeJS.Signals | undefined {
@@ -227,14 +227,17 @@ export function run<T extends number | string | Buffer>(
227227
encoding: BufferEncoding | 'buffer' | string,
228228
options?: RunOptions & { exitCodeOnly?: boolean },
229229
): Promise<T> {
230-
const { stdin, stdinEncoding, ...opts }: RunOptions = { maxBuffer: 1000 * 1024 * 1024, ...options };
230+
const { cancellation, exitCodeOnly, stdin, stdinEncoding, ...opts }: RunOptions & { exitCodeOnly?: boolean } = {
231+
maxBuffer: 1000 * 1024 * 1024,
232+
...options,
233+
};
231234

232235
let killed = false;
233236
return new Promise<T>((resolve, reject) => {
234-
const proc = execFile(command, args, opts, async (error: ExecException | null, stdout, stderr) => {
237+
const proc = execFile(command, args, opts, async (error: ExecFileException | null, stdout, stderr) => {
235238
if (killed) return;
236239

237-
if (options?.exitCodeOnly) {
240+
if (exitCodeOnly) {
238241
resolve((error?.code ?? proc.exitCode) as T);
239242

240243
return;
@@ -273,11 +276,11 @@ export function run<T extends number | string | Buffer>(
273276
}
274277
});
275278

276-
options?.cancellation?.onCancellationRequested(() => {
279+
cancellation?.onCancellationRequested(() => {
277280
const success = proc.kill();
278281
killed = true;
279282

280-
if (options?.exitCodeOnly) {
283+
if (exitCodeOnly) {
281284
resolve(0 as T);
282285
} else {
283286
reject(new CancelledRunError(command, success));

src/webviews/apps/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "../../../tsconfig.base.json",
33
"compilerOptions": {
44
"jsx": "react",
5-
"lib": ["dom", "dom.iterable", "es2022", "esnext.disposable"],
5+
"lib": ["dom", "dom.iterable", "es2023"],
66
"outDir": "../../",
77
"paths": {
88
"@env/*": ["src/env/browser/*"]

tests/e2e/specs/command_palette.test.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,23 @@ import { expect, MaxTimeout, test } from './baseTest';
22

33
test.describe('Test GitLens Command Palette commands', () => {
44
test('should open commit graph with the command', async ({ page }) => {
5-
// Open the command palette by clicking on the View menu and selecting Command Palette
6-
const commandPalette = page.locator('div[id="workbench.parts.titlebar"] .command-center-quick-pick');
7-
await commandPalette.click();
5+
const home = page.locator('div[id="workbench.view.extension.gitlens"]');
6+
await home.waitFor({ state: 'visible', timeout: MaxTimeout });
7+
await page.waitForTimeout(500);
8+
9+
// Open the command palette
10+
await page.keyboard.press('Control+Shift+P');
811

912
// Wait for the command palette input to be visible and fill it
1013
const commandPaletteInput = page.locator('.quick-input-box input');
11-
await commandPaletteInput.waitFor({ state: 'visible', timeout: MaxTimeout });
12-
await commandPaletteInput.fill('> GitLens: Show Commit graph');
13-
await page.waitForTimeout(1000);
14-
void page.keyboard.press('Enter');
14+
await expect(commandPaletteInput).toBeVisible({ timeout: MaxTimeout });
15+
16+
await commandPaletteInput.fill('> GitLens: Show Commit Graph');
17+
await page.waitForTimeout(500);
18+
await commandPaletteInput.press('Enter');
1519

16-
// Click on the first element (GitLens: Show Commit graph)
17-
/*
18-
const commandPaletteFirstLine = page.locator('.quick-input-widget .monaco-list .monaco-list-row.focused');
19-
await commandPaletteFirstLine.waitFor({ state: 'visible', timeout: MaxTimeout });
20-
await commandPaletteFirstLine.click();
21-
*/
22-
// Graph should be opened
23-
await page.locator('.panel.basepanel').waitFor({ state: 'visible' });
24-
await expect(page.locator('div[id="workbench.view.extension.gitlensPanel"]')).toBeVisible();
20+
// Assert the graph is opened and visible
21+
const commitGraph = page.locator('div[id="workbench.view.extension.gitlensPanel"]');
22+
await expect(commitGraph).toBeVisible({ timeout: MaxTimeout });
2523
});
2624
});

0 commit comments

Comments
 (0)