Skip to content

feat(test-runner): experimental esbuild transpilation - #43177

Closed
Pavel Feldman (pavelfeldman) wants to merge 3 commits into
microsoft:mainfrom
pavelfeldman:esbuild-transform
Closed

Pavel Feldman (pavelfeldman) wants to merge 3 commits into
microsoft:mainfrom
pavelfeldman:esbuild-transform

Conversation

@pavelfeldman

@pavelfeldman Pavel Feldman (pavelfeldman) commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

  • PLAYWRIGHT_EXPERIMENTAL_ESBUILD=1 transpiles TS/JS with esbuild instead of Babel; the loader, tsconfig resolution and compilation cache are unchanged.
  • esbuild is an optional peer dependency (>=0.21.5) that users install themselves.
  • Class fields follow useDefineForClassFields the same way as Babel.
  • Known differences from Babel: .css imports are not stripped, assert import attributes are unsupported in ESM, PW_TEST_SOURCE_TRANSFORM is ignored.
  • Depends on feat(test-runner): respect useDefineForClassFields from tsconfig #43262.

esbuild

real 0m4.392s
real 0m4.349s

babel

real 0m10.349s
real 0m10.255s

hot

real 0m2.637s

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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

🟢 The failure is a pre-existing flake

The only real failure has occurred on unrelated PRs on the same macOS/Node 22 bot. This PR is clear.

Details

Overall: this PR adds an opt-in esbuild transform. The failing job did not set PLAYWRIGHT_EXPERIMENTAL_ESBUILD, so it used the unchanged default transform path. The failure is an existing polling-output test that observed one fewer retry before the assertion passed.

Pre-existing flake / infra

Triaged by the Playwright bot - agent run

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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

🟢 The failure is a pre-existing flake

The same test has failed with the same error on an unrelated PR and has also failed on main. This PR is clear.

Details

Overall: this PR adds an opt-in esbuild transform. The MCP workflow does not set PLAYWRIGHT_EXPERIMENTAL_ESBUILD, so it uses the unchanged default transform path. The failure is a known Windows/Firefox WebMCP registration race.

Pre-existing flake / infra

Triaged by the Playwright bot - agent run

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 flaky ⚠️ [installation tests] › playwright-cdn.spec.ts:43 › playwright cdn failover should work (https://cdn.playwright.dev) `@package-installations-windows-latest`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/webmcp.spec.ts:216 › should scope tools to their frame `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@chromium-ubuntu-22.04-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`

53368 passed, 1267 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

9165 passed, 1495 skipped


Merge workflow run.

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