From 9625b9e8b842c5bee6b459c6ac6f52454b8ad323 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Mon, 26 Jan 2026 13:25:16 -0800 Subject: [PATCH] detach playwright-core usage with imports --- .../package.json | 2 +- .../src/extension.ts | 19 ++++++++++++------- .../webpack.config.js | 1 - 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/package.json b/vscode-extensions/playwright-on-codespaces-vscode-extension/package.json index d870bc7be09..a16ecaaa74e 100644 --- a/vscode-extensions/playwright-on-codespaces-vscode-extension/package.json +++ b/vscode-extensions/playwright-on-codespaces-vscode-extension/package.json @@ -1,6 +1,6 @@ { "name": "playwright-on-codespaces", - "version": "0.0.0", + "version": "0.0.1", "repository": { "type": "git", "url": "https://github.com/microsoft/rushstack.git", diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/src/extension.ts b/vscode-extensions/playwright-on-codespaces-vscode-extension/src/extension.ts index 5a1a4d748a0..fcadde1b218 100644 --- a/vscode-extensions/playwright-on-codespaces-vscode-extension/src/extension.ts +++ b/vscode-extensions/playwright-on-codespaces-vscode-extension/src/extension.ts @@ -5,16 +5,21 @@ import * as os from 'node:os'; import * as path from 'node:path'; import * as vscode from 'vscode'; +import type { + TunnelStatus, + IHandshake, + ILaunchOptionsAllowlist, + ILaunchOptionsValidationResult +} from '@rushstack/playwright-browser-tunnel'; + +import { PlaywrightTunnel } from '@rushstack/playwright-browser-tunnel/lib/PlaywrightBrowserTunnel'; + import { - PlaywrightTunnel, - type TunnelStatus, - type IHandshake, EXTENSION_INSTALLED_FILENAME, - LaunchOptionsValidator, - type ILaunchOptionsAllowlist, - type ILaunchOptionsValidationResult, getNormalizedErrorString -} from '@rushstack/playwright-browser-tunnel'; +} from '@rushstack/playwright-browser-tunnel/lib/utilities'; +import { LaunchOptionsValidator } from '@rushstack/playwright-browser-tunnel/lib/LaunchOptionsValidator'; + import { Terminal, type ITerminal, type ITerminalProvider } from '@rushstack/terminal'; import { runWorkspaceCommandAsync } from '@rushstack/vscode-shared/lib/runWorkspaceCommandAsync'; diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/webpack.config.js b/vscode-extensions/playwright-on-codespaces-vscode-extension/webpack.config.js index fa7a82cac47..13af5df6482 100644 --- a/vscode-extensions/playwright-on-codespaces-vscode-extension/webpack.config.js +++ b/vscode-extensions/playwright-on-codespaces-vscode-extension/webpack.config.js @@ -20,7 +20,6 @@ function createConfig({ production, webpack }) { // Mark problematic modules as externals to avoid webpack bundling issues const externals = /** @type {Record} */ (config.externals || {}); - externals['playwright-core'] = 'commonjs playwright-core'; externals['bufferutil'] = 'commonjs bufferutil'; externals['utf-8-validate'] = 'commonjs utf-8-validate'; config.externals = externals;