Repository: microsoft/vscode-edge-devtools
Pull request #2714 (2025-01-21 22:10:25)

Bump undici from 6.19.8 to 6.21.1
Bumps [undici](https://github.com/nodejs/undici) from 6.19.8 to 6.21.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/nodejs/undici/releases">undici's releases</a>.</em></p>
<blockquote>
<h2>v6.21.1</h2>
<h1>⚠️ Security Release ⚠️</h1>
<p>Fixes CVE CVE-2025-22150 <a href="https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975">https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975</a> (embargoed until 22-01-2025).</p>
<h2>What's Changed</h2>
<ul>
<li>fix(<a href="https://redirect.github.com/nodejs/undici/issues/3736">#3736</a>): back-port 183f8e9 to v6.x by <a href="https://github.com/ggoodman"><code>@​ggoodman</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3855">nodejs/undici#3855</a></li>
<li>fix(<a href="https://redirect.github.com/nodejs/undici/issues/3817">#3817</a>): send servername for SNI on TLS (<a href="https://redirect.github.com/nodejs/undici/issues/3821">#3821</a>) [backport] by <a href="https://github.com/metcoder95"><code>@​metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3864">nodejs/undici#3864</a></li>
<li>fix: sending formdata bodies with http2 (<a href="https://redirect.github.com/nodejs/undici/issues/3863">#3863</a>) [backport] by <a href="https://github.com/metcoder95"><code>@​metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3866">nodejs/undici#3866</a></li>
<li>[Backport v6.x] fix: Fixed the issue that there is no running request when http2 goaway by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3877">nodejs/undici#3877</a></li>
<li>types: [backport] Update return type of RetryCallback (<a href="https://redirect.github.com/nodejs/undici/issues/3851">#3851</a>) by <a href="https://github.com/metcoder95"><code>@​metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3876">nodejs/undici#3876</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v6.21.0...v6.21.1">https://github.com/nodejs/undici/compare/v6.21.0...v6.21.1</a></p>
<h2>v6.21.0</h2>
<h2>What's Changed</h2>
<ul>
<li>[Backport v6.x] web: mark as uncloneable when possible (<a href="https://redirect.github.com/nodejs/undici/issues/3709">#3709</a>) by <a href="https://github.com/jazelly"><code>@​jazelly</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3744">nodejs/undici#3744</a></li>
<li>[Backport v6.x] fetch: fix content-encoding order by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3764">nodejs/undici#3764</a></li>
<li>[Backport v6.x] fix: handle undefined deref() of WeakRef(socket) by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3822">nodejs/undici#3822</a></li>
<li>[Backport v6.x] fix: range end is zero-indexed by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3827">nodejs/undici#3827</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v6.20.1...v6.21.0">https://github.com/nodejs/undici/compare/v6.20.1...v6.21.0</a></p>
<h2>v6.20.1</h2>
<h2>What's Changed</h2>
<ul>
<li>[Backport v6.x] jsdoc: add jsdoc to lib/web/fetch/constants.js by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3710">nodejs/undici#3710</a></li>
<li>[Backport v6.x] feat: implement <code>BodyReadable.bytes</code> by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3711">nodejs/undici#3711</a></li>
<li>fix: add more expectsPayload methods by <a href="https://github.com/ronag"><code>@​ronag</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3715">nodejs/undici#3715</a></li>
<li>[Backport v6.x] chore(H2): onboard H2 into Undici queueing system (<a href="https://redirect.github.com/nodejs/undici/issues/3707">#3707</a>) by <a href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3724">nodejs/undici#3724</a></li>
<li>[Backport v6.x] fix: PoolBase kClose and kDestroy should await and not return the Promise by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3723">nodejs/undici#3723</a></li>
<li>[Backport v6.x] fix: extract noop everywhere by <a href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3727">nodejs/undici#3727</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v6.20.0...v6.20.1">https://github.com/nodejs/undici/compare/v6.20.0...v6.20.1</a></p>
<h2>v6.20.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Remove patched dom types (<code>v6.x</code> branch) by <a href="https://github.com/eXhumer"><code>@​eXhumer</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3531">nodejs/undici#3531</a></li>
<li>docs(Backport v6.x): Fix signature of RetryHandler by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3594">nodejs/undici#3594</a></li>
<li>deps(dev): update <code>@​types/node</code> by <a href="https://github.com/metcoder95"><code>@​metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3618">nodejs/undici#3618</a></li>
<li>fix: throw on retry when payload is consume by downstream by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3596">nodejs/undici#3596</a></li>
<li>feat(Backport v6.x): move throwOnError to interceptor by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3595">nodejs/undici#3595</a></li>
<li>[Backport v6.x] fix: reduce memory usage in client-h1 by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3672">nodejs/undici#3672</a></li>
<li>[Backport v6.x] fix: refactor fast timers, fix UND_ERR_CONNECT_TIMEOUT on event loop blocking by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3673">nodejs/undici#3673</a></li>
<li>[Backport v6.x] fix: run asserts first if possible by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3674">nodejs/undici#3674</a></li>
<li>[Backport v6.x] fix: use fasttimers for all connection timeouts by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3675">nodejs/undici#3675</a></li>
<li>[Backport v6.x] ci: less flaky test/request-timeout.js test by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3678">nodejs/undici#3678</a></li>
<li>[Backport v6.x] test: less flaky timers acceptance test, rework fast timer tests to pass them faster by <a href="https://github.com/github-actions"><code>@​github-actions</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3679">nodejs/undici#3679</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/nodejs/undici/commit/e260e7bb173abe3399dabd61338ca4a71fcf8825"><code>e260e7b</code></a> Bumped v6.21.1</li>
<li><a href="https://github.com/nodejs/undici/commit/c3acc6050b781b827d80c86cbbab34f14458d385"><code>c3acc60</code></a> Merge commit from fork</li>
<li><a href="https://github.com/nodejs/undici/commit/2414bc9f7d651f830902af00238e1b11d9a389dc"><code>2414bc9</code></a> Update return type of RetryCallback (<a href="https://redirect.github.com/nodejs/undici/issues/3851">#3851</a>) (<a href="https://redirect.github.com/nodejs/undici/issues/3876">#3876</a>)</li>
<li><a href="https://github.com/nodejs/undici/commit/be8cd0afa0cf8207d8849026f2ee6fdc6dc9dcec"><code>be8cd0a</code></a> [Backport v6.x] fix: Fixed the issue that there is no running request when ht...</li>
<li><a href="https://github.com/nodejs/undici/commit/ee6176cd2e09853c868bf5bc1a34bf0500963e4d"><code>ee6176c</code></a> fix: sending formdata bodies with http2 (<a href="https://redirect.github.com/nodejs/undici/issues/3863">#3863</a>) [backport] (<a href="https://redirect.github.com/nodejs/undici/issues/3866">#3866</a>)</li>
<li><a href="https://github.com/nodejs/undici/commit/a0220f14bfd2a404173eacc94aa1722829075283"><code>a0220f1</code></a> fix(<a href="https://redirect.github.com/nodejs/undici/issues/3817">#3817</a>): send servername for SNI on TLS (<a href="https://redirect.github.com/nodejs/undici/issues/3821">#3821</a>) [backport] (<a href="https://redirect.github.com/nodejs/undici/issues/3864">#3864</a>)</li>
<li><a href="https://github.com/nodejs/undici/commit/353ab63188af904a17030d96018d6193247d7d18"><code>353ab63</code></a> fix(<a href="https://redirect.github.com/nodejs/undici/issues/3736">#3736</a>): back-port 183f8e9 to v6.x (<a href="https://redirect.github.com/nodejs/undici/issues/3855">#3855</a>)</li>
<li><a href="https://github.com/nodejs/undici/commit/61ec3531a64ffeec953a990c11735ff09455de4e"><code>61ec353</code></a> Bumped v6.21.0</li>
<li><a href="https://github.com/nodejs/undici/commit/11e31a4fdc92b09dc47f2cc5c30f5e975e6b6499"><code>11e31a4</code></a> fix: range end is zero-indexed (<a href="https://redirect.github.com/nodejs/undici/issues/3826">#3826</a>) (<a href="https://redirect.github.com/nodejs/undici/issues/3827">#3827</a>)</li>
<li><a href="https://github.com/nodejs/undici/commit/98d1b1b2bdbe6137d4b4156b5fbe33af44bdb293"><code>98d1b1b</code></a> fix: handle undefined deref() of WeakRef(socket) (<a href="https://redirect.github.com/nodejs/undici/issues/3751">#3751</a>) (<a href="https://redirect.github.com/nodejs/undici/issues/3822">#3822</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/nodejs/undici/compare/v6.19.8...v6.21.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=undici&package-manager=npm_and_yarn&previous-version=6.19.8&new-version=6.21.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/microsoft/vscode-edge-devtools/network/alerts).

</details>


Patch:
diff --git a/package-lock.json b/package-lock.json
index d8f375d..bcc0018 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4310,9 +4310,9 @@
             }
         },
         "node_modules/cross-spawn": {
-            "version": "7.0.3",
-            "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
-            "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+            "version": "7.0.6",
+            "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+            "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
             "dev": true,
             "dependencies": {
                 "path-key": "^3.1.0",
@@ -11518,10 +11518,11 @@
             "dev": true
         },
         "node_modules/undici": {
-            "version": "6.19.8",
-            "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz",
-            "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==",
+            "version": "6.21.1",
+            "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz",
+            "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==",
             "dev": true,
+            "license": "MIT",
             "engines": {
                 "node": ">=18.17"
             }
diff --git a/src/extension.ts b/src/extension.ts
index 326a8f8..7f279ea 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -83,8 +83,8 @@ export function activate(context: vscode.ExtensionContext): void {
         void attach(context);
     }));
 
-    context.subscriptions.push(vscode.commands.registerCommand(`${SETTINGS_STORE_NAME}.launch`, (): void => {
-        void launch(context);
+    context.subscriptions.push(vscode.commands.registerCommand(`${SETTINGS_STORE_NAME}.launch`, (opts: {launchUrl: string} = {launchUrl: ''}): void => {
+        void launch(context, opts.launchUrl);
     }));
 
     context.subscriptions.push(vscode.commands.registerCommand(`${SETTINGS_STORE_NAME}.attachToCurrentDebugTarget`, (debugSessionId: string | undefined, config: Partial<IUserConfig>): void => {


Test patch:
diff --git a/test/extension.test.ts b/test/extension.test.ts
index 6871993..b57ac03 100644
--- a/test/extension.test.ts
+++ b/test/extension.test.ts
@@ -11,6 +11,7 @@ import {
     removeTrailingSlash,
     SETTINGS_STORE_NAME,
     SETTINGS_VIEW_NAME,
+    type IUserConfig,
 } from "../src/utils";
 
 jest.mock("vscode", () => createFakeVSCode(), { virtual: true });
@@ -497,6 +498,39 @@ describe("extension", () => {
             }));
         });
 
+        it("calls launch on launch command with arguments", async () => {
+            const vscode = jest.requireMock("vscode");
+
+            // As we are overriding launch method we mock the extension.ts
+            jest.mock("../src/extension");
+
+            const args = { launchUrl: "http://example.com" };
+
+            const context = createFakeExtensionContext();
+
+            const newExtension = await import('../src/extension');
+
+            // We mock the implementation for the launch function to validate it is able to being called with url
+            // arguments
+            jest.spyOn(newExtension, 'launch').mockImplementation((context: ExtensionContext, launchUrl ?: string, config ?: Partial<IUserConfig>)=> {
+                expect(launchUrl).toEqual(args.launchUrl);
+                return Promise.resolve();
+            })
+
+            // We mimic the call
+            context.subscriptions.push(vscode.commands.registerCommand(`${SETTINGS_STORE_NAME}.launch`, ( opts: {launchUrl: string} = {launchUrl: ""} ): void => {
+                void newExtension.launch(context, opts.launchUrl);
+            }));
+
+            const callback = vscode.commands.registerCommand.mock.calls[0][1];
+            expect(callback).toBeDefined();
+
+            await callback!(args);
+
+            // Cleaning the mock after this test.
+            jest.unmock("../src/extension");
+        });
+
         it("calls launch on launch command", async () => {
             const vscode = jest.requireMock("vscode");
             const context = createFakeExtensionContext();