Skip to content

chore(build): set esbuild target to node20 - #42657

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:esbuild-node20
Sep 10, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:esbuild-node20

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • esbuild had no explicit target and defaulted to esnext, so using declarations reached lib/ verbatim and failed to parse on the minimum supported node.
  • Adds Symbol.dispose to JSHandle and uses it for the frame element handle in crPage.

esbuild had no explicit target and defaulted to esnext, so `using`
declarations reached lib/ verbatim and failed to parse on the minimum
supported node. Adds Symbol.dispose to JSHandle and uses it for the frame
element handle in crPage.
if (frame === this._page.mainFrame())
return { x: 0, y: 0 };
const element = await frame.frameElement(nullProgress);
using element = await frame.frameElement(nullProgress);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think we should as part of this go through and change the other manual finally { foo.dispose(); } (e.g. _retryWithProgressIfNotConnected, waitForFunctionExpression, etc.)?

or would you rather have that be a followup (or just when that code is next modified)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included this one instance as a test that it works and that the tests pass.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox

8347 passed, 1376 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

3 flaky ⚠️ [chromium-library] › library/browsercontext-page-event.spec.ts:173 › should work with Ctrl-clicking `@chromium-ubuntu-22.04-arm-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`

51545 passed, 1247 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failures here.

🟢 The one failure is a pre-existing flake — this PR is clear

The single red — [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate on mcp-windows-latest-firefox — is a known Windows-Firefox flake that has nothing to do with this change. This PR only touches the esbuild target, JSHandle[Symbol.dispose], and the Chromium-only crPage frame-element path, none of which the Firefox MCP screencast flow exercises.

Details

Overall: tests 1 was fully green (51545 passed). The only failure is in the MCP run, and it reproduces across dozens of unrelated PRs — no failure here is attributable to this PR.

Pre-existing flake / infra

  • [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate (mcp-windows-latest-firefox) — pre-existing flake, isolated to Windows Firefox. In the aggregated CI results this exact (project, file, test) on this bot failed 74 of 694 runs (~11%) and passed 620, spread across 35 distinct PRs (73 of those 74 failures are on other PRs; only 1 is this PR). The same test on every other bot is effectively green (0–3 failures across ~700 runs each). The PR's diff — esbuild target: node20, Symbol.dispose on JSHandle, and a using in the Chromium crPage frame-element helper — doesn't reach the Firefox screencast/annotate path.

Triaged by the Playwright bot - agent run

@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit efb0761 into microsoft:main Sep 10, 2026
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants