Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: make `@playwright/test` depend on `playwright` (#26946)
Dmitry Gozman186f86905c8a
diff --git a/.github/workflows/pr_check_client_side_changes.yml b/.github/workflows/pr_check_client_side_changes.ymlindex 57c96a60ad..6f10c95633 100644--- a/.github/workflows/pr_check_client_side_changes.yml+++ b/.github/workflows/pr_check_client_side_changes.yml@@ -5,7 +5,7 @@ on:- mainpaths:- 'packages/playwright-core/src/client/**/*'- - 'packages/playwright-test/src/matchers/matchers.ts'+ - 'packages/playwright/src/matchers/matchers.ts'jobs:check:name: Checkdiff --git a/.gitignore b/.gitignoreindex 1866dfff9c..0978f13e88 100644--- a/.gitignore+++ b/.gitignore@@ -25,6 +25,7 @@ test-results/packages/*/LICENSE/packages/*/NOTICE/packages/playwright/README.md+/packages/playwright-test/README.md/packages/playwright-core/api.json.env/tests/installation/output/diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.mdindex dc9f5a6cd2..b434f08b6b 100644--- a/docs/src/release-notes-js.md+++ b/docs/src/release-notes-js.md@@ -15,7 +15,7 @@ import LiteYouTube from '@site/src/components/LiteYouTube';### New `npx playwright merge-reports` tool-If you run tests on multiple shards, you can now merge all reports in a single HTML report (or any other report)+If you run tests on multiple shards, you can now merge all reports in a single HTML report (or any other report)using the new `merge-reports` CLI tool.Using `merge-reports` tool requires the following steps:@@ -48,7 +48,7 @@ Let us know if you encounter any issues!Linux support looks like this:| | Ubuntu 20.04 | Ubuntu 22.04 | Debian 11 | Debian 12 |-| :--- | :---: | :---: | :---: | :---: |+| :--- | :---: | :---: | :---: | :---: || Chromium | ✅ | ✅ | ✅ | ✅ || WebKit | ✅ | ✅ | ✅ | ✅ || Firefox | ✅ | ✅ | ✅ | ✅ |diff --git a/package-lock.json b/package-lock.jsonindex d35024dc6a..ada75a67de 100644--- a/package-lock.json+++ b/package-lock.json@@ -6300,6 +6300,9 @@},"engines": {"node": ">=16"+ },+ "optionalDependencies": {+ "fsevents": "2.3.2"}},"packages/playwright-browser-chromium": {@@ -6367,7 +6370,7 @@"version": "1.38.0-next","license": "Apache-2.0","dependencies": {- "@playwright/test": "1.38.0-next",+ "playwright": "1.38.0-next","playwright-core": "1.38.0-next","vite": "^4.3.9"},@@ -6589,16 +6592,13 @@"version": "1.38.0-next","license": "Apache-2.0","dependencies": {- "playwright-core": "1.38.0-next"+ "playwright": "1.38.0-next"},"bin": {"playwright": "cli.js"},"engines": {"node": ">=16"- },- "optionalDependencies": {- "fsevents": "2.3.2"}},"packages/playwright-webkit": {@@ -7469,7 +7469,7 @@"@playwright/experimental-ct-core": {"version": "file:packages/playwright-ct-core","requires": {- "@playwright/test": "1.38.0-next",+ "playwright": "1.38.0-next","playwright-core": "1.38.0-next","vite": "^4.3.9"}@@ -7575,8 +7575,7 @@"@playwright/test": {"version": "file:packages/playwright-test","requires": {- "fsevents": "2.3.2",- "playwright-core": "1.38.0-next"+ "playwright": "1.38.0-next"}},"@sindresorhus/is": {@@ -9885,6 +9884,7 @@"playwright": {"version": "file:packages/playwright","requires": {+ "fsevents": "2.3.2","playwright-core": "1.38.0-next"}},diff --git a/packages/html-reporter/tsconfig.json b/packages/html-reporter/tsconfig.jsonindex 71abcce236..93a8b7cbd0 100644--- a/packages/html-reporter/tsconfig.json+++ b/packages/html-reporter/tsconfig.json@@ -19,9 +19,9 @@"paths": {"@protocol/*": ["../protocol/src/*"],"@web/*": ["../web/src/*"],- "@playwright-test/*": ["../playwright-test/src/*"],+ "@playwright/*": ["../playwright/src/*"],"playwright-core/lib/*": ["../playwright-core/src/*"],- "playwright-test/lib/*": ["../playwright-test/src/*"],+ "playwright/lib/*": ["../playwright/src/*"],}},"include": ["src"],diff --git a/packages/playwright-ct-core/cli.js b/packages/playwright-ct-core/cli.jsindex bff00995d9..2d0ff42281 100755--- a/packages/playwright-ct-core/cli.js+++ b/packages/playwright-ct-core/cli.js@@ -14,4 +14,4 @@* See the License for the specific language governing permissions and* limitations under the License.*/-module.exports = require('@playwright/test/lib/cli');+module.exports = require('playwright/lib/cli');diff --git a/packages/playwright-ct-core/index.d.ts b/packages/playwright-ct-core/index.d.tsindex 90789c02a7..397a4cdb7f 100644--- a/packages/playwright-ct-core/index.d.ts+++ b/packages/playwright-ct-core/index.d.ts@@ -22,7 +22,7 @@ import type {PlaywrightWorkerArgs,PlaywrightWorkerOptions,Locator,-} from '@playwright/test';+} from 'playwright/test';import type { JsonObject } from './types/component';import type { InlineConfig } from 'vite';@@ -63,4 +63,4 @@ export function defineConfig(config: PlaywrightTestConfig): PlaywrightTestConfigexport function defineConfig<T>(config: PlaywrightTestConfig<T>): PlaywrightTestConfig<T>;export function defineConfig<T, W>(config: PlaywrightTestConfig<T, W>): PlaywrightTestConfig<T, W>;-export { expect, devices } from '@playwright/test';+export { expect, devices } from 'playwright/test';diff --git a/packages/playwright-ct-core/index.js b/packages/playwright-ct-core/index.jsindex 3cccb3d65a..c323f1c6ec 100644--- a/packages/playwright-ct-core/index.js+++ b/packages/playwright-ct-core/index.js@@ -14,7 +14,7 @@* limitations under the License.*/-const { test: baseTest, expect, devices, defineConfig: originalDefineConfig } = require('@playwright/test');+const { test: baseTest, expect, devices, defineConfig: originalDefineConfig } = require('playwright/test');const { fixtures } = require('./lib/mount');const defineConfig = config => originalDefineConfig({diff --git a/packages/playwright-ct-core/package.json b/packages/playwright-ct-core/package.jsonindex f4291f7947..582297df91 100644--- a/packages/playwright-ct-core/package.json+++ b/packages/playwright-ct-core/package.json@@ -26,7 +26,7 @@"dependencies": {"playwright-core": "1.38.0-next","vite": "^4.3.9",- "@playwright/test": "1.38.0-next"+ "playwright": "1.38.0-next"},"bin": {"playwright": "./cli.js"diff --git a/packages/playwright-ct-core/src/mount.ts b/packages/playwright-ct-core/src/mount.tsindex a671368104..fc01ab7283 100644--- a/packages/playwright-ct-core/src/mount.ts+++ b/packages/playwright-ct-core/src/mount.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import type { Fixtures, Locator, Page, BrowserContextOptions, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, BrowserContext } from '@playwright/test';+import type { Fixtures, Locator, Page, BrowserContextOptions, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, BrowserContext } from 'playwright/test';import type { Component, JsxComponent, MountOptions } from '../types/component';-import type { ContextReuseMode, FullConfigInternal } from '../../playwright-test/src/common/config';+import type { ContextReuseMode, FullConfigInternal } from '../../playwright/src/common/config';let boundCallbacksForMount: Function[] = [];diff --git a/packages/playwright-ct-core/src/tsxTransform.ts b/packages/playwright-ct-core/src/tsxTransform.tsindex 4d1d95bd67..f06df3c04d 100644--- a/packages/playwright-ct-core/src/tsxTransform.ts+++ b/packages/playwright-ct-core/src/tsxTransform.ts@@ -15,9 +15,9 @@*/import path from 'path';-import type { T, BabelAPI } from '@playwright/test/src/transform/babelBundle';-import { types, declare, traverse } from '@playwright/test/lib/transform/babelBundle';-import { resolveImportSpecifierExtension } from '@playwright/test/lib/util';+import type { T, BabelAPI } from 'playwright/src/transform/babelBundle';+import { types, declare, traverse } from 'playwright/lib/transform/babelBundle';+import { resolveImportSpecifierExtension } from 'playwright/lib/util';const t: typeof T = types;const fullNames = new Map<string, string | undefined>();diff --git a/packages/playwright-ct-core/src/vitePlugin.ts b/packages/playwright-ct-core/src/vitePlugin.tsindex f714564bd9..9705f4bbf5 100644--- a/packages/playwright-ct-core/src/vitePlugin.ts+++ b/packages/playwright-ct-core/src/vitePlugin.ts@@ -14,11 +14,11 @@* limitations under the License.*/-import type { Suite } from '@playwright/test/reporter';-import type { PlaywrightTestConfig as BasePlaywrightTestConfig, FullConfig } from '@playwright/test';+import type { Suite } from 'playwright/types/testReporter';+import type { PlaywrightTestConfig as BasePlaywrightTestConfig, FullConfig } from 'playwright/test';import type { InlineConfig, Plugin, ResolveFn, ResolvedConfig, UserConfig } from 'vite';-import type { TestRunnerPlugin } from '../../playwright-test/src/plugins';+import type { TestRunnerPlugin } from '../../playwright/src/plugins';import type { ComponentInfo } from './tsxTransform';import type { AddressInfo } from 'net';import type { PluginContext } from 'rollup';@@ -26,11 +26,11 @@ import { debug } from 'playwright-core/lib/utilsBundle';import fs from 'fs';import path from 'path';-import { parse, traverse, types as t } from '@playwright/test/lib/transform/babelBundle';-import { stoppable } from '@playwright/test/lib/utilsBundle';+import { parse, traverse, types as t } from 'playwright/lib/transform/babelBundle';+import { stoppable } from 'playwright/lib/utilsBundle';import { assert, calculateSha1 } from 'playwright-core/lib/utils';import { getPlaywrightVersion } from 'playwright-core/lib/utils';-import { setExternalDependencies } from '@playwright/test/lib/transform/compilationCache';+import { setExternalDependencies } from 'playwright/lib/transform/compilationCache';import { collectComponentUsages, componentInfo } from './tsxTransform';import { version as viteVersion, build, preview, mergeConfig } from 'vite';diff --git a/packages/playwright-ct-react/index.d.ts b/packages/playwright-ct-react/index.d.tsindex e7717c9b68..9c8d0a914d 100644--- a/packages/playwright-ct-react/index.d.ts+++ b/packages/playwright-ct-react/index.d.ts@@ -22,7 +22,7 @@ import type {PlaywrightWorkerArgs,PlaywrightWorkerOptions,Locator,-} from '@playwright/test';+} from 'playwright/test';import type { JsonObject } from '@playwright/experimental-ct-core/types/component';import type { InlineConfig } from 'vite';@@ -63,4 +63,4 @@ export function defineConfig(config: PlaywrightTestConfig): PlaywrightTestConfigexport function defineConfig<T>(config: PlaywrightTestConfig<T>): PlaywrightTestConfig<T>;export function defineConfig<T, W>(config: PlaywrightTestConfig<T, W>): PlaywrightTestConfig<T, W>;-export { expect, devices } from '@playwright/test';+export { expect, devices } from 'playwright/test';diff --git a/packages/playwright-ct-react17/index.d.ts b/packages/playwright-ct-react17/index.d.tsindex e7717c9b68..9c8d0a914d 100644--- a/packages/playwright-ct-react17/index.d.ts+++ b/packages/playwright-ct-react17/index.d.ts@@ -22,7 +22,7 @@ import type {PlaywrightWorkerArgs,PlaywrightWorkerOptions,Locator,-} from '@playwright/test';+} from 'playwright/test';import type { JsonObject } from '@playwright/experimental-ct-core/types/component';import type { InlineConfig } from 'vite';@@ -63,4 +63,4 @@ export function defineConfig(config: PlaywrightTestConfig): PlaywrightTestConfigexport function defineConfig<T>(config: PlaywrightTestConfig<T>): PlaywrightTestConfig<T>;export function defineConfig<T, W>(config: PlaywrightTestConfig<T, W>): PlaywrightTestConfig<T, W>;-export { expect, devices } from '@playwright/test';+export { expect, devices } from 'playwright/test';diff --git a/packages/playwright-ct-solid/index.d.ts b/packages/playwright-ct-solid/index.d.tsindex e7717c9b68..9c8d0a914d 100644--- a/packages/playwright-ct-solid/index.d.ts+++ b/packages/playwright-ct-solid/index.d.ts@@ -22,7 +22,7 @@ import type {PlaywrightWorkerArgs,PlaywrightWorkerOptions,Locator,-} from '@playwright/test';+} from 'playwright/test';import type { JsonObject } from '@playwright/experimental-ct-core/types/component';import type { InlineConfig } from 'vite';@@ -63,4 +63,4 @@ export function defineConfig(config: PlaywrightTestConfig): PlaywrightTestConfigexport function defineConfig<T>(config: PlaywrightTestConfig<T>): PlaywrightTestConfig<T>;export function defineConfig<T, W>(config: PlaywrightTestConfig<T, W>): PlaywrightTestConfig<T, W>;-export { expect, devices } from '@playwright/test';+export { expect, devices } from 'playwright/test';diff --git a/packages/playwright-ct-svelte/index.d.ts b/packages/playwright-ct-svelte/index.d.tsindex 19c5a9d1b2..0fd476f7ed 100644--- a/packages/playwright-ct-svelte/index.d.ts+++ b/packages/playwright-ct-svelte/index.d.ts@@ -22,7 +22,7 @@ import type {PlaywrightWorkerArgs,PlaywrightWorkerOptions,Locator,-} from '@playwright/test';+} from 'playwright/test';import type { JsonObject } from '@playwright/experimental-ct-core/types/component';import type { InlineConfig } from 'vite';import type { SvelteComponent, ComponentProps } from 'svelte/types/runtime';@@ -71,4 +71,4 @@ export function defineConfig(config: PlaywrightTestConfig): PlaywrightTestConfigexport function defineConfig<T>(config: PlaywrightTestConfig<T>): PlaywrightTestConfig<T>;export function defineConfig<T, W>(config: PlaywrightTestConfig<T, W>): PlaywrightTestConfig<T, W>;-export { expect, devices } from '@playwright/test';+export { expect, devices } from 'playwright/test';diff --git a/packages/playwright-ct-vue/index.d.ts b/packages/playwright-ct-vue/index.d.tsindex ebbdd55a28..249fe643d7 100644--- a/packages/playwright-ct-vue/index.d.ts+++ b/packages/playwright-ct-vue/index.d.ts@@ -22,7 +22,7 @@ import type {PlaywrightWorkerArgs,PlaywrightWorkerOptions,Locator,-} from '@playwright/test';+} from 'playwright/test';import type { JsonObject } from '@playwright/experimental-ct-core/types/component';import type { InlineConfig } from 'vite';@@ -91,4 +91,4 @@ export function defineConfig(config: PlaywrightTestConfig): PlaywrightTestConfigexport function defineConfig<T>(config: PlaywrightTestConfig<T>): PlaywrightTestConfig<T>;export function defineConfig<T, W>(config: PlaywrightTestConfig<T, W>): PlaywrightTestConfig<T, W>;-export { expect, devices } from '@playwright/test';+export { expect, devices } from 'playwright/test';diff --git a/packages/playwright-ct-vue2/index.d.ts b/packages/playwright-ct-vue2/index.d.tsindex 927fb1aa91..9e0a08a02c 100644--- a/packages/playwright-ct-vue2/index.d.ts+++ b/packages/playwright-ct-vue2/index.d.ts@@ -22,7 +22,7 @@ import type {PlaywrightWorkerArgs,PlaywrightWorkerOptions,Locator,-} from '@playwright/test';+} from 'playwright/test';import type { JsonObject } from '@playwright/experimental-ct-core/types/component';import type { InlineConfig } from 'vite';@@ -91,4 +91,4 @@ export function defineConfig(config: PlaywrightTestConfig): PlaywrightTestConfigexport function defineConfig<T>(config: PlaywrightTestConfig<T>): PlaywrightTestConfig<T>;export function defineConfig<T, W>(config: PlaywrightTestConfig<T, W>): PlaywrightTestConfig<T, W>;-export { expect, devices } from '@playwright/test';+export { expect, devices } from 'playwright/test';diff --git a/packages/playwright-test/README.md b/packages/playwright-test/README.mddeleted file mode 100644index 38e544a679..0000000000--- a/packages/playwright-test/README.md+++ /dev/null@@ -1,3 +0,0 @@-# @playwright/test--This package contains [Playwright Test](https://playwright.dev/docs/test-intro). A test-runner for writing idiomatic and reliable end-to-end tests with [Playwright](http://playwright.dev/).diff --git a/packages/playwright-test/cli.js b/packages/playwright-test/cli.jsindex bff00995d9..9d6dee9693 100755--- a/packages/playwright-test/cli.js+++ b/packages/playwright-test/cli.js@@ -14,4 +14,4 @@* See the License for the specific language governing permissions and* limitations under the License.*/-module.exports = require('@playwright/test/lib/cli');+module.exports = require('playwright/cli');diff --git a/packages/playwright-test/index.d.ts b/packages/playwright-test/index.d.tsindex 4369d23a3c..8d99c91500 100644--- a/packages/playwright-test/index.d.ts+++ b/packages/playwright-test/index.d.ts@@ -14,5 +14,5 @@* limitations under the License.*/-export * from './types/test';-export { default } from './types/test';+export * from 'playwright/test';+export { default } from 'playwright/test';diff --git a/packages/playwright-test/index.js b/packages/playwright-test/index.jsindex 8ff9824af1..8536f06390 100644--- a/packages/playwright-test/index.js+++ b/packages/playwright-test/index.js@@ -14,15 +14,4 @@* limitations under the License.*/-const pwt = require('./lib/index');-const { defineConfig } = require('./lib/common/configLoader');-const playwright = require('playwright-core');-const combinedExports = {- ...playwright,- ...pwt,- defineConfig,-};--Object.defineProperty(combinedExports, '__esModule', { value: true });--module.exports = combinedExports;+module.exports = require('playwright/test');diff --git a/packages/playwright-test/index.mjs b/packages/playwright-test/index.mjsindex 59299a0cb3..8d99c91500 100644--- a/packages/playwright-test/index.mjs+++ b/packages/playwright-test/index.mjs@@ -13,18 +13,6 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import playwright from './index.js';-export const chromium = playwright.chromium;-export const firefox = playwright.firefox;-export const webkit = playwright.webkit;-export const selectors = playwright.selectors;-export const devices = playwright.devices;-export const errors = playwright.errors;-export const request = playwright.request;-export const _electron = playwright._electron;-export const _android = playwright._android;-export const test = playwright.test;-export const expect = playwright.expect;-export const defineConfig = playwright.defineConfig;-export default playwright.test;+export * from 'playwright/test';+export { default } from 'playwright/test';diff --git a/packages/playwright-test/package.json b/packages/playwright-test/package.jsonindex 1b5dbc7e65..f71d270473 100644--- a/packages/playwright-test/package.json+++ b/packages/playwright-test/package.json@@ -7,7 +7,10 @@"engines": {"node": ">=16"},- "main": "index.js",+ "author": {+ "name": "Microsoft Corporation"+ },+ "license": "Apache-2.0","exports": {".": {"types": "./index.d.ts",@@ -17,32 +20,14 @@},"./cli": "./cli.js","./package.json": "./package.json",- "./lib/cli": "./lib/cli.js",- "./lib/transform/babelBundle": "./lib/transform/babelBundle.js",- "./lib/transform/compilationCache": "./lib/transform/compilationCache.js",- "./lib/transform/esmLoader": "./lib/transform/esmLoader.js",- "./lib/internalsForTest": "./lib/internalsForTest.js",- "./lib/plugins": "./lib/plugins/index.js",- "./jsx-runtime": {- "import": "./jsx-runtime.mjs",- "require": "./jsx-runtime.js",- "default": "./jsx-runtime.js"- },- "./lib/util": "./lib/util.js",- "./lib/utilsBundle": "./lib/utilsBundle.js","./reporter": "./reporter.js"},"bin": {"playwright": "./cli.js"},- "author": {- "name": "Microsoft Corporation"+ "scripts": {},- "license": "Apache-2.0","dependencies": {- "playwright-core": "1.38.0-next"- },- "optionalDependencies": {- "fsevents": "2.3.2"+ "playwright": "1.38.0-next"}}diff --git a/packages/playwright-test/reporter.d.ts b/packages/playwright-test/reporter.d.tsindex 29a927d48e..806d13fb09 100644--- a/packages/playwright-test/reporter.d.ts+++ b/packages/playwright-test/reporter.d.ts@@ -14,4 +14,4 @@* limitations under the License.*/-export * from './types/testReporter';+export * from 'playwright/types/testReporter';diff --git a/packages/playwright-test/.eslintrc.js b/packages/playwright/.eslintrc.jssimilarity index 100%rename from packages/playwright-test/.eslintrc.jsrename to packages/playwright/.eslintrc.jsdiff --git a/packages/playwright-test/.npmignore b/packages/playwright/.npmignoresimilarity index 100%rename from packages/playwright-test/.npmignorerename to packages/playwright/.npmignorediff --git a/packages/playwright-test/ThirdPartyNotices.txt b/packages/playwright/ThirdPartyNotices.txtsimilarity index 99%rename from packages/playwright-test/ThirdPartyNotices.txtrename to packages/playwright/ThirdPartyNotices.txtindex dadc614821..35b04cc386 100644--- a/packages/playwright-test/ThirdPartyNotices.txt+++ b/packages/playwright/ThirdPartyNotices.txt@@ -1,4 +1,4 @@-microsoft/playwright-test+microsoft/playwrightTHIRD-PARTY SOFTWARE NOTICES AND INFORMATIONdiff --git a/packages/playwright-test/bundles/babel/package-lock.json b/packages/playwright/bundles/babel/package-lock.jsonsimilarity index 100%rename from packages/playwright-test/bundles/babel/package-lock.jsonrename to packages/playwright/bundles/babel/package-lock.jsondiff --git a/packages/playwright-test/bundles/babel/package.json b/packages/playwright/bundles/babel/package.jsonsimilarity index 100%rename from packages/playwright-test/bundles/babel/package.jsonrename to packages/playwright/bundles/babel/package.jsondiff --git a/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts b/packages/playwright/bundles/babel/src/babelBundleImpl.tssimilarity index 99%rename from packages/playwright-test/bundles/babel/src/babelBundleImpl.tsrename to packages/playwright/bundles/babel/src/babelBundleImpl.tsindex 30cf969765..e0cc0eaf7d 100644--- a/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts+++ b/packages/playwright/bundles/babel/src/babelBundleImpl.ts@@ -65,7 +65,7 @@ function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins// Support JSX/TSX at all times, regardless of the file extension.plugins.push([require('@babel/plugin-transform-react-jsx'), {runtime: 'automatic',- importSource: '@playwright/test'+ importSource: 'playwright'}]);if (!isModule) {diff --git a/packages/playwright-test/bundles/expect/package-lock.json b/packages/playwright/bundles/expect/package-lock.jsonsimilarity index 100%rename from packages/playwright-test/bundles/expect/package-lock.jsonrename to packages/playwright/bundles/expect/package-lock.jsondiff --git a/packages/playwright-test/bundles/expect/package.json b/packages/playwright/bundles/expect/package.jsonsimilarity index 100%rename from packages/playwright-test/bundles/expect/package.jsonrename to packages/playwright/bundles/expect/package.jsondiff --git a/packages/playwright-test/bundles/expect/src/expectBundleImpl.ts b/packages/playwright/bundles/expect/src/expectBundleImpl.tssimilarity index 100%rename from packages/playwright-test/bundles/expect/src/expectBundleImpl.tsrename to packages/playwright/bundles/expect/src/expectBundleImpl.tsdiff --git a/packages/playwright-test/bundles/utils/build.js b/packages/playwright/bundles/utils/build.jssimilarity index 100%rename from packages/playwright-test/bundles/utils/build.jsrename to packages/playwright/bundles/utils/build.jsdiff --git a/packages/playwright-test/bundles/utils/package-lock.json b/packages/playwright/bundles/utils/package-lock.jsonsimilarity index 100%rename from packages/playwright-test/bundles/utils/package-lock.jsonrename to packages/playwright/bundles/utils/package-lock.jsondiff --git a/packages/playwright-test/bundles/utils/package.json b/packages/playwright/bundles/utils/package.jsonsimilarity index 100%rename from packages/playwright-test/bundles/utils/package.jsonrename to packages/playwright/bundles/utils/package.jsondiff --git a/packages/playwright-test/bundles/utils/src/utilsBundleImpl.ts b/packages/playwright/bundles/utils/src/utilsBundleImpl.tssimilarity index 100%rename from packages/playwright-test/bundles/utils/src/utilsBundleImpl.tsrename to packages/playwright/bundles/utils/src/utilsBundleImpl.tsdiff --git a/packages/playwright/cli.js b/packages/playwright/cli.jsindex bd995de114..d4eb087af8 100755--- a/packages/playwright/cli.js+++ b/packages/playwright/cli.js@@ -14,4 +14,4 @@* See the License for the specific language governing permissions and* limitations under the License.*/-module.exports = require('playwright-core/lib/cli/cli');+module.exports = require('./lib/cli');diff --git a/packages/playwright-test/jsx-runtime.js b/packages/playwright/jsx-runtime.jssimilarity index 100%rename from packages/playwright-test/jsx-runtime.jsrename to packages/playwright/jsx-runtime.jsdiff --git a/packages/playwright-test/jsx-runtime.mjs b/packages/playwright/jsx-runtime.mjssimilarity index 100%rename from packages/playwright-test/jsx-runtime.mjsrename to packages/playwright/jsx-runtime.mjsdiff --git a/packages/playwright/package.json b/packages/playwright/package.jsonindex 2b9123043f..07468b094d 100644--- a/packages/playwright/package.json+++ b/packages/playwright/package.json@@ -7,10 +7,7 @@"engines": {"node": ">=16"},- "author": {- "name": "Microsoft Corporation"- },- "license": "Apache-2.0",+ "main": "index.js","exports": {".": {"types": "./index.d.ts",@@ -19,14 +16,44 @@"default": "./index.js"},"./cli": "./cli.js",- "./package.json": "./package.json"+ "./package.json": "./package.json",+ "./lib/cli": "./lib/cli.js",+ "./lib/transform/babelBundle": "./lib/transform/babelBundle.js",+ "./lib/transform/compilationCache": "./lib/transform/compilationCache.js",+ "./lib/transform/esmLoader": "./lib/transform/esmLoader.js",+ "./lib/internalsForTest": "./lib/internalsForTest.js",+ "./lib/plugins": "./lib/plugins/index.js",+ "./jsx-runtime": {+ "import": "./jsx-runtime.mjs",+ "require": "./jsx-runtime.js",+ "default": "./jsx-runtime.js"+ },+ "./lib/util": "./lib/util.js",+ "./lib/utilsBundle": "./lib/utilsBundle.js",+ "./types/test": {+ "types": "./types/test.d.ts"+ },+ "./types/testReporter": {+ "types": "./types/testReporter.d.ts"+ },+ "./test": {+ "types": "./test.d.ts",+ "import": "./test.mjs",+ "require": "./test.js",+ "default": "./test.js"+ }},"bin": {"playwright": "./cli.js"},- "scripts": {+ "author": {+ "name": "Microsoft Corporation"},+ "license": "Apache-2.0","dependencies": {"playwright-core": "1.38.0-next"+ },+ "optionalDependencies": {+ "fsevents": "2.3.2"}}diff --git a/packages/playwright-test/src/DEPS.list b/packages/playwright/src/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/DEPS.listrename to packages/playwright/src/DEPS.listdiff --git a/packages/playwright-test/src/cli.ts b/packages/playwright/src/cli.tssimilarity index 99%rename from packages/playwright-test/src/cli.tsrename to packages/playwright/src/cli.tsindex 62fb72acfa..5f9182cf6f 100644--- a/packages/playwright-test/src/cli.ts+++ b/packages/playwright/src/cli.ts@@ -26,12 +26,12 @@ import { showHTMLReport } from './reporters/html';import { createMergedReport } from './reporters/merge';import { ConfigLoader, resolveConfigFile } from './common/configLoader';import type { ConfigCLIOverrides } from './common/ipc';-import type { FullResult, TestError } from '../reporter';+import type { FullResult, TestError } from '../types/testReporter';import type { TraceMode } from '../types/test';import { builtInReporters, defaultReporter, defaultTimeout } from './common/config';import type { FullConfigInternal } from './common/config';import program from 'playwright-core/lib/cli/program';-import type { ReporterDescription } from '..';+import type { ReporterDescription } from '../types/test';import { prepareErrorStack } from './reporters/base';function addTestCommand(program: Command) {diff --git a/packages/playwright-test/src/common/DEPS.list b/packages/playwright/src/common/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/common/DEPS.listrename to packages/playwright/src/common/DEPS.listdiff --git a/packages/playwright-test/src/common/config.ts b/packages/playwright/src/common/config.tssimilarity index 100%rename from packages/playwright-test/src/common/config.tsrename to packages/playwright/src/common/config.tsdiff --git a/packages/playwright-test/src/common/configLoader.ts b/packages/playwright/src/common/configLoader.tssimilarity index 100%rename from packages/playwright-test/src/common/configLoader.tsrename to packages/playwright/src/common/configLoader.tsdiff --git a/packages/playwright-test/src/common/esmLoaderHost.ts b/packages/playwright/src/common/esmLoaderHost.tssimilarity index 100%rename from packages/playwright-test/src/common/esmLoaderHost.tsrename to packages/playwright/src/common/esmLoaderHost.tsdiff --git a/packages/playwright-test/src/common/expectBundle.ts b/packages/playwright/src/common/expectBundle.tssimilarity index 100%rename from packages/playwright-test/src/common/expectBundle.tsrename to packages/playwright/src/common/expectBundle.tsdiff --git a/packages/playwright-test/src/common/fixtures.ts b/packages/playwright/src/common/fixtures.tssimilarity index 100%rename from packages/playwright-test/src/common/fixtures.tsrename to packages/playwright/src/common/fixtures.tsdiff --git a/packages/playwright-test/src/common/globals.ts b/packages/playwright/src/common/globals.tssimilarity index 100%rename from packages/playwright-test/src/common/globals.tsrename to packages/playwright/src/common/globals.tsdiff --git a/packages/playwright-test/src/common/ipc.ts b/packages/playwright/src/common/ipc.tssimilarity index 100%rename from packages/playwright-test/src/common/ipc.tsrename to packages/playwright/src/common/ipc.tsdiff --git a/packages/playwright-test/src/common/poolBuilder.ts b/packages/playwright/src/common/poolBuilder.tssimilarity index 98%rename from packages/playwright-test/src/common/poolBuilder.tsrename to packages/playwright/src/common/poolBuilder.tsindex 326f24843b..cc1bc095c9 100644--- a/packages/playwright-test/src/common/poolBuilder.ts+++ b/packages/playwright/src/common/poolBuilder.ts@@ -20,7 +20,7 @@ import type { Suite, TestCase } from './test';import type { TestTypeImpl } from './testType';import type { FullProjectInternal } from './config';import { formatLocation } from '../util';-import type { TestError } from '../../reporter';+import type { TestError } from '../../types/testReporter';export class PoolBuilder {private _project: FullProjectInternal | undefined;diff --git a/packages/playwright-test/src/common/process.ts b/packages/playwright/src/common/process.tssimilarity index 100%rename from packages/playwright-test/src/common/process.tsrename to packages/playwright/src/common/process.tsdiff --git a/packages/playwright-test/src/common/suiteUtils.ts b/packages/playwright/src/common/suiteUtils.tssimilarity index 100%rename from packages/playwright-test/src/common/suiteUtils.tsrename to packages/playwright/src/common/suiteUtils.tsdiff --git a/packages/playwright-test/src/common/test.ts b/packages/playwright/src/common/test.tssimilarity index 100%rename from packages/playwright-test/src/common/test.tsrename to packages/playwright/src/common/test.tsdiff --git a/packages/playwright-test/src/common/testLoader.ts b/packages/playwright/src/common/testLoader.tssimilarity index 98%rename from packages/playwright-test/src/common/testLoader.tsrename to packages/playwright/src/common/testLoader.tsindex c0e781e552..a85d93545d 100644--- a/packages/playwright-test/src/common/testLoader.ts+++ b/packages/playwright/src/common/testLoader.ts@@ -16,7 +16,7 @@import path from 'path';import util from 'util';-import type { TestError } from '../../reporter';+import type { TestError } from '../../types/testReporter';import { isWorkerProcess, setCurrentlyLoadingFileSuite } from './globals';import { Suite } from './test';import { requireOrImport } from '../transform/transform';diff --git a/packages/playwright-test/src/common/testType.ts b/packages/playwright/src/common/testType.tssimilarity index 100%rename from packages/playwright-test/src/common/testType.tsrename to packages/playwright/src/common/testType.tsdiff --git a/packages/playwright-test/src/index.ts b/packages/playwright/src/index.tssimilarity index 100%rename from packages/playwright-test/src/index.tsrename to packages/playwright/src/index.tsdiff --git a/packages/playwright-test/src/internalsForTest.ts b/packages/playwright/src/internalsForTest.tssimilarity index 100%rename from packages/playwright-test/src/internalsForTest.tsrename to packages/playwright/src/internalsForTest.tsdiff --git a/packages/playwright-test/src/isomorphic/DEPS.list b/packages/playwright/src/isomorphic/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/isomorphic/DEPS.listrename to packages/playwright/src/isomorphic/DEPS.listdiff --git a/packages/playwright-test/src/isomorphic/folders.ts b/packages/playwright/src/isomorphic/folders.tssimilarity index 100%rename from packages/playwright-test/src/isomorphic/folders.tsrename to packages/playwright/src/isomorphic/folders.tsdiff --git a/packages/playwright-test/src/isomorphic/stringInternPool.ts b/packages/playwright/src/isomorphic/stringInternPool.tssimilarity index 100%rename from packages/playwright-test/src/isomorphic/stringInternPool.tsrename to packages/playwright/src/isomorphic/stringInternPool.tsdiff --git a/packages/playwright-test/src/isomorphic/teleReceiver.ts b/packages/playwright/src/isomorphic/teleReceiver.tssimilarity index 100%rename from packages/playwright-test/src/isomorphic/teleReceiver.tsrename to packages/playwright/src/isomorphic/teleReceiver.tsdiff --git a/packages/playwright-test/src/loader/DEPS.list b/packages/playwright/src/loader/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/loader/DEPS.listrename to packages/playwright/src/loader/DEPS.listdiff --git a/packages/playwright-test/src/loader/loaderMain.ts b/packages/playwright/src/loader/loaderMain.tssimilarity index 97%rename from packages/playwright-test/src/loader/loaderMain.tsrename to packages/playwright/src/loader/loaderMain.tsindex 23444ca21f..7e865c7e4b 100644--- a/packages/playwright-test/src/loader/loaderMain.ts+++ b/packages/playwright/src/loader/loaderMain.ts@@ -19,7 +19,7 @@ import { ConfigLoader } from '../common/configLoader';import { ProcessRunner } from '../common/process';import type { FullConfigInternal } from '../common/config';import { loadTestFile } from '../common/testLoader';-import type { TestError } from '../../reporter';+import type { TestError } from '../../types/testReporter';import { serializeCompilationCache } from '../transform/compilationCache';import { PoolBuilder } from '../common/poolBuilder';import { incorporateCompilationCache } from '../common/esmLoaderHost';diff --git a/packages/playwright-test/src/matchers/DEPS.list b/packages/playwright/src/matchers/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/matchers/DEPS.listrename to packages/playwright/src/matchers/DEPS.listdiff --git a/packages/playwright-test/src/matchers/expect.ts b/packages/playwright/src/matchers/expect.tssimilarity index 100%rename from packages/playwright-test/src/matchers/expect.tsrename to packages/playwright/src/matchers/expect.tsdiff --git a/packages/playwright-test/src/matchers/matcherHint.ts b/packages/playwright/src/matchers/matcherHint.tssimilarity index 100%rename from packages/playwright-test/src/matchers/matcherHint.tsrename to packages/playwright/src/matchers/matcherHint.tsdiff --git a/packages/playwright-test/src/matchers/matchers.ts b/packages/playwright/src/matchers/matchers.tssimilarity index 100%rename from packages/playwright-test/src/matchers/matchers.tsrename to packages/playwright/src/matchers/matchers.tsdiff --git a/packages/playwright-test/src/matchers/toBeTruthy.ts b/packages/playwright/src/matchers/toBeTruthy.tssimilarity index 100%rename from packages/playwright-test/src/matchers/toBeTruthy.tsrename to packages/playwright/src/matchers/toBeTruthy.tsdiff --git a/packages/playwright-test/src/matchers/toEqual.ts b/packages/playwright/src/matchers/toEqual.tssimilarity index 100%rename from packages/playwright-test/src/matchers/toEqual.tsrename to packages/playwright/src/matchers/toEqual.tsdiff --git a/packages/playwright-test/src/matchers/toMatchSnapshot.ts b/packages/playwright/src/matchers/toMatchSnapshot.tssimilarity index 100%rename from packages/playwright-test/src/matchers/toMatchSnapshot.tsrename to packages/playwright/src/matchers/toMatchSnapshot.tsdiff --git a/packages/playwright-test/src/matchers/toMatchText.ts b/packages/playwright/src/matchers/toMatchText.tssimilarity index 100%rename from packages/playwright-test/src/matchers/toMatchText.tsrename to packages/playwright/src/matchers/toMatchText.tsdiff --git a/packages/playwright-test/src/plugins/DEPS.list b/packages/playwright/src/plugins/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/plugins/DEPS.listrename to packages/playwright/src/plugins/DEPS.listdiff --git a/packages/playwright-test/src/plugins/gitCommitInfoPlugin.ts b/packages/playwright/src/plugins/gitCommitInfoPlugin.tssimilarity index 100%rename from packages/playwright-test/src/plugins/gitCommitInfoPlugin.tsrename to packages/playwright/src/plugins/gitCommitInfoPlugin.tsdiff --git a/packages/playwright-test/src/plugins/index.ts b/packages/playwright/src/plugins/index.tssimilarity index 100%rename from packages/playwright-test/src/plugins/index.tsrename to packages/playwright/src/plugins/index.tsdiff --git a/packages/playwright-test/src/plugins/webServerPlugin.ts b/packages/playwright/src/plugins/webServerPlugin.tssimilarity index 100%rename from packages/playwright-test/src/plugins/webServerPlugin.tsrename to packages/playwright/src/plugins/webServerPlugin.tsdiff --git a/packages/playwright-test/src/reporters/.eslintrc.json b/packages/playwright/src/reporters/.eslintrc.jsonsimilarity index 100%rename from packages/playwright-test/src/reporters/.eslintrc.jsonrename to packages/playwright/src/reporters/.eslintrc.jsondiff --git a/packages/playwright-test/src/reporters/DEPS.list b/packages/playwright/src/reporters/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/reporters/DEPS.listrename to packages/playwright/src/reporters/DEPS.listdiff --git a/packages/playwright-test/src/reporters/base.ts b/packages/playwright/src/reporters/base.tssimilarity index 100%rename from packages/playwright-test/src/reporters/base.tsrename to packages/playwright/src/reporters/base.tsdiff --git a/packages/playwright-test/src/reporters/blob.ts b/packages/playwright/src/reporters/blob.tssimilarity index 100%rename from packages/playwright-test/src/reporters/blob.tsrename to packages/playwright/src/reporters/blob.tsdiff --git a/packages/playwright-test/src/reporters/dot.ts b/packages/playwright/src/reporters/dot.tssimilarity index 100%rename from packages/playwright-test/src/reporters/dot.tsrename to packages/playwright/src/reporters/dot.tsdiff --git a/packages/playwright-test/src/reporters/empty.ts b/packages/playwright/src/reporters/empty.tssimilarity index 100%rename from packages/playwright-test/src/reporters/empty.tsrename to packages/playwright/src/reporters/empty.tsdiff --git a/packages/playwright-test/src/reporters/github.ts b/packages/playwright/src/reporters/github.tssimilarity index 100%rename from packages/playwright-test/src/reporters/github.tsrename to packages/playwright/src/reporters/github.tsdiff --git a/packages/playwright-test/src/reporters/html.ts b/packages/playwright/src/reporters/html.tssimilarity index 100%rename from packages/playwright-test/src/reporters/html.tsrename to packages/playwright/src/reporters/html.tsdiff --git a/packages/playwright-test/src/reporters/internalReporter.ts b/packages/playwright/src/reporters/internalReporter.tssimilarity index 100%rename from packages/playwright-test/src/reporters/internalReporter.tsrename to packages/playwright/src/reporters/internalReporter.tsdiff --git a/packages/playwright-test/src/reporters/json.ts b/packages/playwright/src/reporters/json.tssimilarity index 100%rename from packages/playwright-test/src/reporters/json.tsrename to packages/playwright/src/reporters/json.tsdiff --git a/packages/playwright-test/src/reporters/junit.ts b/packages/playwright/src/reporters/junit.tssimilarity index 100%rename from packages/playwright-test/src/reporters/junit.tsrename to packages/playwright/src/reporters/junit.tsdiff --git a/packages/playwright-test/src/reporters/line.ts b/packages/playwright/src/reporters/line.tssimilarity index 100%rename from packages/playwright-test/src/reporters/line.tsrename to packages/playwright/src/reporters/line.tsdiff --git a/packages/playwright-test/src/reporters/list.ts b/packages/playwright/src/reporters/list.tssimilarity index 100%rename from packages/playwright-test/src/reporters/list.tsrename to packages/playwright/src/reporters/list.tsdiff --git a/packages/playwright-test/src/reporters/markdown.ts b/packages/playwright/src/reporters/markdown.tssimilarity index 100%rename from packages/playwright-test/src/reporters/markdown.tsrename to packages/playwright/src/reporters/markdown.tsdiff --git a/packages/playwright-test/src/reporters/merge.ts b/packages/playwright/src/reporters/merge.tssimilarity index 100%rename from packages/playwright-test/src/reporters/merge.tsrename to packages/playwright/src/reporters/merge.tsdiff --git a/packages/playwright-test/src/reporters/multiplexer.ts b/packages/playwright/src/reporters/multiplexer.tssimilarity index 100%rename from packages/playwright-test/src/reporters/multiplexer.tsrename to packages/playwright/src/reporters/multiplexer.tsdiff --git a/packages/playwright-test/src/reporters/reporterV2.ts b/packages/playwright/src/reporters/reporterV2.tssimilarity index 100%rename from packages/playwright-test/src/reporters/reporterV2.tsrename to packages/playwright/src/reporters/reporterV2.tsdiff --git a/packages/playwright-test/src/reporters/teleEmitter.ts b/packages/playwright/src/reporters/teleEmitter.tssimilarity index 100%rename from packages/playwright-test/src/reporters/teleEmitter.tsrename to packages/playwright/src/reporters/teleEmitter.tsdiff --git a/packages/playwright-test/src/runner/DEPS.list b/packages/playwright/src/runner/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/runner/DEPS.listrename to packages/playwright/src/runner/DEPS.listdiff --git a/packages/playwright-test/src/runner/dispatcher.ts b/packages/playwright/src/runner/dispatcher.tssimilarity index 100%rename from packages/playwright-test/src/runner/dispatcher.tsrename to packages/playwright/src/runner/dispatcher.tsdiff --git a/packages/playwright-test/src/runner/failureTracker.ts b/packages/playwright/src/runner/failureTracker.tssimilarity index 100%rename from packages/playwright-test/src/runner/failureTracker.tsrename to packages/playwright/src/runner/failureTracker.tsdiff --git a/packages/playwright-test/src/runner/loadUtils.ts b/packages/playwright/src/runner/loadUtils.tssimilarity index 100%rename from packages/playwright-test/src/runner/loadUtils.tsrename to packages/playwright/src/runner/loadUtils.tsdiff --git a/packages/playwright-test/src/runner/loaderHost.ts b/packages/playwright/src/runner/loaderHost.tssimilarity index 97%rename from packages/playwright-test/src/runner/loaderHost.tsrename to packages/playwright/src/runner/loaderHost.tsindex 70ccf8f0be..8afaa2916a 100644--- a/packages/playwright-test/src/runner/loaderHost.ts+++ b/packages/playwright/src/runner/loaderHost.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import type { TestError } from '../../reporter';+import type { TestError } from '../../types/testReporter';import { serializeConfig } from '../common/ipc';import { ProcessHost } from './processHost';import { Suite } from '../common/test';diff --git a/packages/playwright-test/src/runner/processHost.ts b/packages/playwright/src/runner/processHost.tssimilarity index 100%rename from packages/playwright-test/src/runner/processHost.tsrename to packages/playwright/src/runner/processHost.tsdiff --git a/packages/playwright-test/src/runner/projectUtils.ts b/packages/playwright/src/runner/projectUtils.tssimilarity index 100%rename from packages/playwright-test/src/runner/projectUtils.tsrename to packages/playwright/src/runner/projectUtils.tsdiff --git a/packages/playwright-test/src/runner/reporters.ts b/packages/playwright/src/runner/reporters.tssimilarity index 100%rename from packages/playwright-test/src/runner/reporters.tsrename to packages/playwright/src/runner/reporters.tsdiff --git a/packages/playwright-test/src/runner/runner.ts b/packages/playwright/src/runner/runner.tssimilarity index 100%rename from packages/playwright-test/src/runner/runner.tsrename to packages/playwright/src/runner/runner.tsdiff --git a/packages/playwright-test/src/runner/sigIntWatcher.ts b/packages/playwright/src/runner/sigIntWatcher.tssimilarity index 100%rename from packages/playwright-test/src/runner/sigIntWatcher.tsrename to packages/playwright/src/runner/sigIntWatcher.tsdiff --git a/packages/playwright-test/src/runner/taskRunner.ts b/packages/playwright/src/runner/taskRunner.tssimilarity index 98%rename from packages/playwright-test/src/runner/taskRunner.tsrename to packages/playwright/src/runner/taskRunner.tsindex 7e990391d6..badc593362 100644--- a/packages/playwright-test/src/runner/taskRunner.ts+++ b/packages/playwright/src/runner/taskRunner.ts@@ -16,7 +16,7 @@import { debug } from 'playwright-core/lib/utilsBundle';import { ManualPromise, monotonicTime } from 'playwright-core/lib/utils';-import type { FullResult, TestError } from '../../reporter';+import type { FullResult, TestError } from '../../types/testReporter';import { SigIntWatcher } from './sigIntWatcher';import { serializeError } from '../util';import type { ReporterV2 } from '../reporters/reporterV2';diff --git a/packages/playwright-test/src/runner/tasks.ts b/packages/playwright/src/runner/tasks.tssimilarity index 100%rename from packages/playwright-test/src/runner/tasks.tsrename to packages/playwright/src/runner/tasks.tsdiff --git a/packages/playwright-test/src/runner/testGroups.ts b/packages/playwright/src/runner/testGroups.tssimilarity index 100%rename from packages/playwright-test/src/runner/testGroups.tsrename to packages/playwright/src/runner/testGroups.tsdiff --git a/packages/playwright-test/src/runner/uiMode.ts b/packages/playwright/src/runner/uiMode.tssimilarity index 99%rename from packages/playwright-test/src/runner/uiMode.tsrename to packages/playwright/src/runner/uiMode.tsindex 62ec66873c..aff2baaddb 100644--- a/packages/playwright-test/src/runner/uiMode.ts+++ b/packages/playwright/src/runner/uiMode.ts@@ -16,7 +16,7 @@import { openTraceViewerApp, openTraceInBrowser, registry } from 'playwright-core/lib/server';import { isUnderTest, ManualPromise } from 'playwright-core/lib/utils';-import type { FullResult } from '../../reporter';+import type { FullResult } from '../../types/testReporter';import { clearCompilationCache, collectAffectedTestFiles, dependenciesForTestFile } from '../transform/compilationCache';import type { FullConfigInternal } from '../common/config';import { InternalReporter } from '../reporters/internalReporter';diff --git a/packages/playwright-test/src/runner/watchMode.ts b/packages/playwright/src/runner/watchMode.tssimilarity index 99%rename from packages/playwright-test/src/runner/watchMode.tsrename to packages/playwright/src/runner/watchMode.tsindex 2f860e0f1b..575653d3e2 100644--- a/packages/playwright-test/src/runner/watchMode.ts+++ b/packages/playwright/src/runner/watchMode.ts@@ -23,7 +23,7 @@ import type { Matcher } from '../util';import { TestRun, createTaskRunnerForWatch, createTaskRunnerForWatchSetup } from './tasks';import { buildProjectsClosure, filterProjects } from './projectUtils';import { clearCompilationCache, collectAffectedTestFiles } from '../transform/compilationCache';-import type { FullResult } from 'packages/playwright-test/reporter';+import type { FullResult } from '../../types/testReporter';import { chokidar } from '../utilsBundle';import type { FSWatcher as CFSWatcher } from 'chokidar';import { colors } from 'playwright-core/lib/utilsBundle';diff --git a/packages/playwright-test/src/runner/workerHost.ts b/packages/playwright/src/runner/workerHost.tssimilarity index 100%rename from packages/playwright-test/src/runner/workerHost.tsrename to packages/playwright/src/runner/workerHost.tsdiff --git a/packages/playwright-test/src/store.ts b/packages/playwright/src/store.tssimilarity index 100%rename from packages/playwright-test/src/store.tsrename to packages/playwright/src/store.tsdiff --git a/packages/playwright-test/src/third_party/tsconfig-loader.ts b/packages/playwright/src/third_party/tsconfig-loader.tssimilarity index 100%rename from packages/playwright-test/src/third_party/tsconfig-loader.tsrename to packages/playwright/src/third_party/tsconfig-loader.tsdiff --git a/packages/playwright-test/src/transform/DEPS.list b/packages/playwright/src/transform/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/transform/DEPS.listrename to packages/playwright/src/transform/DEPS.listdiff --git a/packages/playwright-test/src/transform/babelBundle.ts b/packages/playwright/src/transform/babelBundle.tssimilarity index 100%rename from packages/playwright-test/src/transform/babelBundle.tsrename to packages/playwright/src/transform/babelBundle.tsdiff --git a/packages/playwright-test/src/transform/compilationCache.ts b/packages/playwright/src/transform/compilationCache.tssimilarity index 100%rename from packages/playwright-test/src/transform/compilationCache.tsrename to packages/playwright/src/transform/compilationCache.tsdiff --git a/packages/playwright-test/src/transform/esmLoader.ts b/packages/playwright/src/transform/esmLoader.tssimilarity index 100%rename from packages/playwright-test/src/transform/esmLoader.tsrename to packages/playwright/src/transform/esmLoader.tsdiff --git a/packages/playwright-test/src/transform/portTransport.ts b/packages/playwright/src/transform/portTransport.tssimilarity index 100%rename from packages/playwright-test/src/transform/portTransport.tsrename to packages/playwright/src/transform/portTransport.tsdiff --git a/packages/playwright-test/src/transform/transform.ts b/packages/playwright/src/transform/transform.tssimilarity index 100%rename from packages/playwright-test/src/transform/transform.tsrename to packages/playwright/src/transform/transform.tsdiff --git a/packages/playwright-test/src/util.ts b/packages/playwright/src/util.tssimilarity index 99%rename from packages/playwright-test/src/util.tsrename to packages/playwright/src/util.tsindex f825c145c7..b7e98c0626 100644--- a/packages/playwright-test/src/util.ts+++ b/packages/playwright/src/util.ts@@ -305,7 +305,7 @@ function folderIsModule(folder: string): boolean {const kExperimentalLoaderOptions = ['--no-warnings',- `--experimental-loader=${url.pathToFileURL(require.resolve('@playwright/test/lib/transform/esmLoader')).toString()}`,+ `--experimental-loader=${url.pathToFileURL(require.resolve('playwright/lib/transform/esmLoader')).toString()}`,];export function execArgvWithExperimentalLoaderOptions() {diff --git a/packages/playwright-test/src/utilsBundle.ts b/packages/playwright/src/utilsBundle.tssimilarity index 100%rename from packages/playwright-test/src/utilsBundle.tsrename to packages/playwright/src/utilsBundle.tsdiff --git a/packages/playwright-test/src/worker/DEPS.list b/packages/playwright/src/worker/DEPS.listsimilarity index 100%rename from packages/playwright-test/src/worker/DEPS.listrename to packages/playwright/src/worker/DEPS.listdiff --git a/packages/playwright-test/src/worker/fixtureRunner.ts b/packages/playwright/src/worker/fixtureRunner.tssimilarity index 100%rename from packages/playwright-test/src/worker/fixtureRunner.tsrename to packages/playwright/src/worker/fixtureRunner.tsdiff --git a/packages/playwright-test/src/worker/testInfo.ts b/packages/playwright/src/worker/testInfo.tssimilarity index 100%rename from packages/playwright-test/src/worker/testInfo.tsrename to packages/playwright/src/worker/testInfo.tsdiff --git a/packages/playwright-test/src/worker/testTracing.ts b/packages/playwright/src/worker/testTracing.tssimilarity index 100%rename from packages/playwright-test/src/worker/testTracing.tsrename to packages/playwright/src/worker/testTracing.tsdiff --git a/packages/playwright-test/src/worker/timeoutManager.ts b/packages/playwright/src/worker/timeoutManager.tssimilarity index 100%rename from packages/playwright-test/src/worker/timeoutManager.tsrename to packages/playwright/src/worker/timeoutManager.tsdiff --git a/packages/playwright-test/src/worker/workerMain.ts b/packages/playwright/src/worker/workerMain.tssimilarity index 100%rename from packages/playwright-test/src/worker/workerMain.tsrename to packages/playwright/src/worker/workerMain.tsdiff --git a/packages/playwright/test.d.ts b/packages/playwright/test.d.tsnew file mode 100644index 0000000000..4369d23a3c--- /dev/null+++ b/packages/playwright/test.d.ts@@ -0,0 +1,18 @@+/**+ * Copyright (c) Microsoft Corporation.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++export * from './types/test';+export { default } from './types/test';diff --git a/packages/playwright/test.js b/packages/playwright/test.jsnew file mode 100644index 0000000000..c066192a74--- /dev/null+++ b/packages/playwright/test.js@@ -0,0 +1,28 @@+/**+ * Copyright (c) Microsoft Corporation.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++const pwt = require('./lib/index');+const { defineConfig } = require('./lib/common/configLoader');+const playwright = require('./index');+const combinedExports = {+ ...playwright,+ ...pwt,+ defineConfig,+};++Object.defineProperty(combinedExports, '__esModule', { value: true });++module.exports = combinedExports;diff --git a/packages/playwright/test.mjs b/packages/playwright/test.mjsnew file mode 100644index 0000000000..affa8048dd--- /dev/null+++ b/packages/playwright/test.mjs@@ -0,0 +1,31 @@+/**+ * Copyright (c) Microsoft Corporation.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import playwright from './test.js';++export const chromium = playwright.chromium;+export const firefox = playwright.firefox;+export const webkit = playwright.webkit;+export const selectors = playwright.selectors;+export const devices = playwright.devices;+export const errors = playwright.errors;+export const request = playwright.request;+export const _electron = playwright._electron;+export const _android = playwright._android;+export const test = playwright.test;+export const expect = playwright.expect;+export const defineConfig = playwright.defineConfig;+export default playwright.test;diff --git a/packages/playwright-test/types/reporterPrivate.ts b/packages/playwright/types/reporterPrivate.tssimilarity index 100%rename from packages/playwright-test/types/reporterPrivate.tsrename to packages/playwright/types/reporterPrivate.tsdiff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright/types/test.d.tssimilarity index 100%rename from packages/playwright-test/types/test.d.tsrename to packages/playwright/types/test.d.tsdiff --git a/packages/playwright-test/types/testReporter.d.ts b/packages/playwright/types/testReporter.d.tssimilarity index 100%rename from packages/playwright-test/types/testReporter.d.tsrename to packages/playwright/types/testReporter.d.tsdiff --git a/packages/trace-viewer/src/ui/DEPS.list b/packages/trace-viewer/src/ui/DEPS.listindex 515497fd39..3fab0da95b 100644--- a/packages/trace-viewer/src/ui/DEPS.list+++ b/packages/trace-viewer/src/ui/DEPS.list@@ -5,4 +5,4 @@@web/**../entries.ts../geometry.ts-../../../playwright-test/src/isomorphic/**+../../../playwright/src/isomorphic/**diff --git a/packages/trace-viewer/src/ui/uiModeView.tsx b/packages/trace-viewer/src/ui/uiModeView.tsxindex a5c7cabb54..42a62c6cc6 100644--- a/packages/trace-viewer/src/ui/uiModeView.tsx+++ b/packages/trace-viewer/src/ui/uiModeView.tsx@@ -22,7 +22,7 @@ import { TreeView } from '@web/components/treeView';import type { TreeState } from '@web/components/treeView';import { baseFullConfig, TeleReporterReceiver, TeleSuite } from '@testIsomorphic/teleReceiver';import type { TeleTestCase } from '@testIsomorphic/teleReceiver';-import type { FullConfig, Suite, TestCase, Location, TestError } from '@playwright/test/types/testReporter';+import type { FullConfig, Suite, TestCase, Location, TestError } from 'playwright/types/testReporter';import { SplitView } from '@web/components/splitView';import { idForAction, MultiTraceModel } from './modelUtil';import type { SourceLocation } from './modelUtil';diff --git a/packages/trace-viewer/tsconfig.json b/packages/trace-viewer/tsconfig.jsonindex 350af62edd..41b2ed3948 100644--- a/packages/trace-viewer/tsconfig.json+++ b/packages/trace-viewer/tsconfig.json@@ -20,7 +20,7 @@"@isomorphic/*": ["../playwright-core/src/utils/isomorphic/*"],"@protocol/*": ["../protocol/src/*"],"@recorder/*": ["../recorder/src/*"],- "@testIsomorphic/*": ["../playwright-test/src/isomorphic/*"],+ "@testIsomorphic/*": ["../playwright/src/isomorphic/*"],"@trace/*": ["../trace/src/*"],"@web/*": ["../web/src/*"],// Resolving type dependencies will start processing types in @playwright/testdiff --git a/packages/trace-viewer/vite.config.ts b/packages/trace-viewer/vite.config.tsindex e075ce1d85..2e5178132d 100644--- a/packages/trace-viewer/vite.config.ts+++ b/packages/trace-viewer/vite.config.ts@@ -32,7 +32,7 @@ export default defineConfig({'@injected': path.resolve(__dirname, '../playwright-core/src/server/injected'),'@isomorphic': path.resolve(__dirname, '../playwright-core/src/utils/isomorphic'),'@protocol': path.resolve(__dirname, '../protocol/src'),- '@testIsomorphic': path.resolve(__dirname, '../playwright-test/src/isomorphic'),+ '@testIsomorphic': path.resolve(__dirname, '../playwright/src/isomorphic'),'@trace': path.resolve(__dirname, '../trace/src'),'@web': path.resolve(__dirname, '../web/src'),},diff --git a/tests/components/ct-react-vite/tsconfig.json b/tests/components/ct-react-vite/tsconfig.jsonindex 7f890931cc..e706497adb 100644--- a/tests/components/ct-react-vite/tsconfig.json+++ b/tests/components/ct-react-vite/tsconfig.json@@ -17,7 +17,8 @@"jsx": "react-jsx","baseUrl": ".","paths": {- "@/*": ["./src/*"]+ "@/*": ["./src/*"],+ "*": ["_"],}},"include": ["src", "tests"],diff --git a/tests/components/ct-react17/tsconfig.json b/tests/components/ct-react17/tsconfig.jsonindex e41f60c87d..fef2ed01ee 100644--- a/tests/components/ct-react17/tsconfig.json+++ b/tests/components/ct-react17/tsconfig.json@@ -21,7 +21,8 @@"jsx": "react-jsx","baseUrl": ".","paths": {- "@/*": ["./src/*"]+ "@/*": ["./src/*"],+ "*": ["_"],}},"include": [diff --git a/tests/components/ct-solid/package.json b/tests/components/ct-solid/package.jsonindex a298b78099..ecbcb6ae46 100644--- a/tests/components/ct-solid/package.json+++ b/tests/components/ct-solid/package.json@@ -12,7 +12,7 @@"license": "MIT","dependencies": {"@solidjs/router": "^0.8.2",- "solid-js": "^1.4.7"+ "solid-js": "^1.7.3"},"devDependencies": {"typescript": "^4.7.4",diff --git a/tests/components/ct-solid/tsconfig.json b/tests/components/ct-solid/tsconfig.jsonindex 6dec35bc3c..c353ff128a 100644--- a/tests/components/ct-solid/tsconfig.json+++ b/tests/components/ct-solid/tsconfig.json@@ -14,7 +14,8 @@"skipLibCheck": true,"baseUrl": ".","paths": {- "@/*": ["./src/*"]+ "@/*": ["./src/*"],+ "*": ["_"],}}}diff --git a/tests/components/ct-svelte-vite/tests/render.spec.ts b/tests/components/ct-svelte-vite/tests/render.spec.tsindex 78755c8aa3..bf830dd715 100644--- a/tests/components/ct-svelte-vite/tests/render.spec.ts+++ b/tests/components/ct-svelte-vite/tests/render.spec.ts@@ -1,5 +1,5 @@import { test, expect } from '@playwright/experimental-ct-svelte';-import type { HooksConfig } from 'playwright';+import type { HooksConfig } from '../playwright';import Button from '@/components/Button.svelte';import Empty from '@/components/Empty.svelte';import Context from '@/components/Context.svelte';diff --git a/tests/components/ct-svelte-vite/tsconfig.json b/tests/components/ct-svelte-vite/tsconfig.jsonindex 635d5559ea..4dc15b75b0 100644--- a/tests/components/ct-svelte-vite/tsconfig.json+++ b/tests/components/ct-svelte-vite/tsconfig.json@@ -5,7 +5,6 @@"useDefineForClassFields": true,"module": "esnext","resolveJsonModule": true,- "baseUrl": ".",/*** Typecheck JS in `.svelte` and `.js` files by default.* Disable checkJs if you'd like to use dynamic types in JS.@@ -16,8 +15,10 @@"checkJs": true,"skipLibCheck": true,"strict": true,+ "baseUrl": ".","paths": {- "@/*": ["./src/*"]+ "@/*": ["./src/*"],+ "*": ["_"],}},"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte", "src/**/*.spec.*/*", "tests/**/*.ts"],diff --git a/tests/components/ct-svelte/tsconfig.json b/tests/components/ct-svelte/tsconfig.jsonindex 47248ae0a0..4ce7ec19bf 100644--- a/tests/components/ct-svelte/tsconfig.json+++ b/tests/components/ct-svelte/tsconfig.json@@ -9,7 +9,8 @@"moduleResolution": "node","baseUrl": ".","paths": {- "@/*": ["./src/*"]+ "@/*": ["./src/*"],+ "*": ["_"],}}}diff --git a/tests/components/ct-vue-cli/package.json b/tests/components/ct-vue-cli/package.jsonindex e28d1136ec..1a38a7c66e 100644--- a/tests/components/ct-vue-cli/package.json+++ b/tests/components/ct-vue-cli/package.json@@ -10,7 +10,7 @@},"dependencies": {"core-js": "^3.8.3",- "vue": "^3.2.13",+ "vue": "3.2.36","vue-router": "^4.1.5"},"devDependencies": {diff --git a/tests/components/ct-vue-cli/tsconfig.app.json b/tests/components/ct-vue-cli/tsconfig.app.jsonindex 326d9a3552..5e1fc21721 100644--- a/tests/components/ct-vue-cli/tsconfig.app.json+++ b/tests/components/ct-vue-cli/tsconfig.app.json@@ -6,7 +6,8 @@"composite": true,"baseUrl": ".","paths": {- "@/*": ["./src/*"]+ "@/*": ["./src/*"],+ "*": ["_"],}}}diff --git a/tests/components/ct-vue-vite/tsconfig.json b/tests/components/ct-vue-vite/tsconfig.jsonindex a1d96a55c5..cda3ce98be 100644--- a/tests/components/ct-vue-vite/tsconfig.json+++ b/tests/components/ct-vue-vite/tsconfig.json@@ -4,7 +4,8 @@"compilerOptions": {"baseUrl": ".","paths": {- "@/*": ["./src/*"]+ "@/*": ["./src/*"],+ "*": ["_"],},"ignoreDeprecations": "5.0"},diff --git a/tests/components/ct-vue2-cli/tsconfig.app.json b/tests/components/ct-vue2-cli/tsconfig.app.jsonindex 40ad6e32b2..2222a73314 100644--- a/tests/components/ct-vue2-cli/tsconfig.app.json+++ b/tests/components/ct-vue2-cli/tsconfig.app.json@@ -5,7 +5,8 @@"composite": true,"baseUrl": ".","paths": {- "@/*": ["./src/*"]+ "@/*": ["./src/*"],+ "*": ["_"],}}}diff --git a/tests/installation/playwright-cdn-failover-should-work.spec.ts b/tests/installation/playwright-cdn-failover-should-work.spec.tsindex 9df7433607..382cff8c27 100644--- a/tests/installation/playwright-cdn-failover-should-work.spec.ts+++ b/tests/installation/playwright-cdn-failover-should-work.spec.ts@@ -45,7 +45,5 @@ for (const cdn of CDNS) {await exec('node sanity.js playwright chromium firefox webkit');if (nodeMajorVersion >= 14)await exec('node esm-playwright.mjs');- const stdio = await exec('npx playwright', 'test', '-c', '.', { expectToExitWithError: true });- expect(stdio).toContain(`Please install @playwright/test package`);});}diff --git a/tests/installation/playwright-core-should-work.spec.ts b/tests/installation/playwright-core-should-work.spec.tsnew file mode 100755index 0000000000..5fbad8cd9e--- /dev/null+++ b/tests/installation/playwright-core-should-work.spec.ts@@ -0,0 +1,24 @@+/**+ * Copyright (c) Microsoft Corporation.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+import { test, expect } from './npmTest';++test(`playwright-core should work`, async ({ exec, installedSoftwareOnDisk }) => {+ const result1 = await exec('npm i --foreground-scripts playwright-core');+ expect(result1).toHaveLoggedSoftwareDownload([]);+ expect(await installedSoftwareOnDisk()).toEqual([]);+ const stdio = await exec('npx playwright-core', 'test', '-c', '.', { expectToExitWithError: true });+ expect(stdio).toContain(`Please install @playwright/test package`);+});diff --git a/tests/installation/playwright-should-work.spec.ts b/tests/installation/playwright-should-work.spec.tsindex 79d76b8284..84eb9c026f 100755--- a/tests/installation/playwright-should-work.spec.ts+++ b/tests/installation/playwright-should-work.spec.ts@@ -27,6 +27,4 @@ test(`playwright should work`, async ({ exec, nodeMajorVersion, installedSoftwarawait exec('node sanity.js playwright chromium firefox webkit');if (nodeMajorVersion >= 14)await exec('node esm-playwright.mjs');- const stdio = await exec('npx playwright', 'test', '-c', '.', { expectToExitWithError: true });- expect(stdio).toContain(`Please install @playwright/test package`);});diff --git a/tests/library/tracing.spec.ts b/tests/library/tracing.spec.tsindex d01173f36c..8f92a7d596 100644--- a/tests/library/tracing.spec.ts+++ b/tests/library/tracing.spec.ts@@ -21,7 +21,7 @@ import { browserTest, contextTest as test, expect } from '../config/browserTest'import { parseTraceRaw } from '../config/utils';import type { StackFrame } from '@protocol/channels';import type { ActionTraceEvent } from '../../packages/trace/src/trace';-import { artifactsFolderName } from '../../packages/playwright-test/src/isomorphic/folders';+import { artifactsFolderName } from '../../packages/playwright/src/isomorphic/folders';test.skip(({ trace }) => trace === 'on');diff --git a/tests/playwright-test/playwright-test-fixtures.ts b/tests/playwright-test/playwright-test-fixtures.tsindex 08c55532c7..e5d88f9b2b 100644--- a/tests/playwright-test/playwright-test-fixtures.ts+++ b/tests/playwright-test/playwright-test-fixtures.ts@@ -129,7 +129,7 @@ async function runPlaywrightTest(childProcess: CommonFixtures['childProcess'], b}const reportFile = path.join(baseDir, 'report.json');const testProcess = startPlaywrightTest(childProcess, baseDir, params, {- PW_TEST_REPORTER: path.join(__dirname, '../../packages/playwright-test/lib/reporters/json.js'),+ PW_TEST_REPORTER: path.join(__dirname, '../../packages/playwright/lib/reporters/json.js'),PLAYWRIGHT_JSON_OUTPUT_NAME: reportFile,...env,}, options);diff --git a/tests/playwright-test/reporter-blob.spec.ts b/tests/playwright-test/reporter-blob.spec.tsindex f74626f294..ef633c8838 100644--- a/tests/playwright-test/reporter-blob.spec.ts+++ b/tests/playwright-test/reporter-blob.spec.ts@@ -15,11 +15,11 @@*/import * as fs from 'fs';-import type { PlaywrightTestConfig } from 'packages/playwright-test';+import type { PlaywrightTestConfig } from '@playwright/test';import path from 'path';import url from 'url';import type { HttpServer } from '../../packages/playwright-core/src/utils';-import { startHtmlReportServer } from '../../packages/playwright-test/lib/reporters/html';+import { startHtmlReportServer } from '../../packages/playwright/lib/reporters/html';import { expect as baseExpect, test as baseTest, stripAnsi } from './playwright-test-fixtures';import extractZip from '../../packages/playwright-core/bundles/zip/node_modules/extract-zip';import * as yazl from '../../packages/playwright-core/bundles/zip/node_modules/yazl';diff --git a/tests/playwright-test/reporter-html.spec.ts b/tests/playwright-test/reporter-html.spec.tsindex a2c1bec167..1de61a423d 100644--- a/tests/playwright-test/reporter-html.spec.ts+++ b/tests/playwright-test/reporter-html.spec.ts@@ -19,7 +19,7 @@ import path from 'path';import url from 'url';import { test as baseTest, expect as baseExpect, createImage } from './playwright-test-fixtures';import type { HttpServer } from '../../packages/playwright-core/src/utils';-import { startHtmlReportServer } from '../../packages/playwright-test/lib/reporters/html';+import { startHtmlReportServer } from '../../packages/playwright/lib/reporters/html';const { spawnAsync } = require('../../packages/playwright-core/lib/utils');const test = baseTest.extend<{ showReport: (reportFolder?: string) => Promise<void> }>({@@ -873,7 +873,7 @@ for (const useIntermediateMergeReport of [false] as const) {const files = {'uncommitted.txt': `uncommitted file`,'playwright.config.ts': `- import { gitCommitInfo } from '@playwright/test/lib/plugins';+ import { gitCommitInfo } from 'playwright/lib/plugins';import { test, expect } from '@playwright/test';export default { _plugins: [gitCommitInfo()] };`,@@ -926,7 +926,7 @@ for (const useIntermediateMergeReport of [false] as const) {const result = await runInlineTest({'uncommitted.txt': `uncommitted file`,'playwright.config.ts': `- import { gitCommitInfo } from '@playwright/test/lib/plugins';+ import { gitCommitInfo } from 'playwright/lib/plugins';import { test, expect } from '@playwright/test';const plugin = gitCommitInfo({info: {@@ -940,7 +940,7 @@ for (const useIntermediateMergeReport of [false] as const) {export default { _plugins: [plugin] };`,'example.spec.ts': `- import { gitCommitInfo } from '@playwright/test/lib/plugins';+ import { gitCommitInfo } from 'playwright/lib/plugins';import { test, expect } from '@playwright/test';test('sample', async ({}) => { expect(2).toBe(2); });`,diff --git a/tests/playwright-test/reporter.spec.ts b/tests/playwright-test/reporter.spec.tsindex 870f7cb493..485d029d5c 100644--- a/tests/playwright-test/reporter.spec.ts+++ b/tests/playwright-test/reporter.spec.ts@@ -150,7 +150,7 @@ for (const useIntermediateMergeReport of [false, true] as const) {expect(result.exitCode).toBe(0);expect(result.outputLines).toEqual(['reporter-begin-begin%%',- 'version-' + require('../../packages/playwright-test/package.json').version,+ 'version-' + require('../../packages/playwright/package.json').version,'reporter-testbegin-is run-foo%%','reporter-stdout%%','reporter-stderr%%',diff --git a/tests/playwright-test/runner.spec.ts b/tests/playwright-test/runner.spec.tsindex 0ce0f4c8be..0a576f97f8 100644--- a/tests/playwright-test/runner.spec.ts+++ b/tests/playwright-test/runner.spec.ts@@ -120,7 +120,7 @@ test('sigint should stop workers', async ({ interactWithTestRunner }) => {});`,}, { 'workers': 2, 'reporter': 'line,json' }, {- PW_TEST_REPORTER: path.join(__dirname, '../../packages/playwright-test/lib/reporters/json.js'),+ PW_TEST_REPORTER: path.join(__dirname, '../../packages/playwright/lib/reporters/json.js'),PLAYWRIGHT_JSON_OUTPUT_NAME: 'report.json',});await testProcess.waitForOutput('%%SEND-SIGINT%%', 2);diff --git a/tests/playwright-test/watch.spec.ts b/tests/playwright-test/watch.spec.tsindex 0db5abe4e7..9e83f36a64 100644--- a/tests/playwright-test/watch.spec.ts+++ b/tests/playwright-test/watch.spec.ts@@ -40,7 +40,7 @@ test('should print dependencies in CJS mode', async ({ runInlineTest }) => {test('passes', () => {});`,'globalTeardown.ts': `- import { fileDependencies } from '@playwright/test/lib/internalsForTest';+ import { fileDependencies } from 'playwright/lib/internalsForTest';export default () => {console.log('###' + JSON.stringify(fileDependencies()) + '###');};@@ -79,7 +79,7 @@ test('should print dependencies in ESM mode', async ({ runInlineTest }) => {test('passes', () => {});`,'globalTeardown.ts': `- import { fileDependencies } from '@playwright/test/lib/internalsForTest';+ import { fileDependencies } from 'playwright/lib/internalsForTest';export default () => {console.log('###' + JSON.stringify(fileDependencies()) + '###');};diff --git a/tests/playwright-test/web-server.spec.ts b/tests/playwright-test/web-server.spec.tsindex 4dee864767..bb8d49c274 100644--- a/tests/playwright-test/web-server.spec.ts+++ b/tests/playwright-test/web-server.spec.ts@@ -574,7 +574,7 @@ test.describe('baseURL with plugins', () => {});`,'playwright.config.ts': `- import { webServer } from '@playwright/test/lib/plugins';+ import { webServer } from 'playwright/lib/plugins';module.exports = {_plugins: [webServer({@@ -599,7 +599,7 @@ test.describe('baseURL with plugins', () => {});`,'playwright.config.ts': `- import { webServer } from '@playwright/test/lib/plugins';+ import { webServer } from 'playwright/lib/plugins';module.exports = {webServer: {command: 'node ${JSON.stringify(SIMPLE_SERVER_PATH)} ${port}',diff --git a/tsconfig.json b/tsconfig.jsonindex 669bc6d20d..913e039570 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -15,11 +15,11 @@"@isomorphic/*": ["./packages/playwright-core/src/utils/isomorphic/*"],"@protocol/*": ["./packages/protocol/src/*"],"@recorder/*": ["./packages/recorder/src/*"],- "@testIsomorphic/*": ["./packages/playwright-test/src/isomorphic/*"],+ "@testIsomorphic/*": ["./packages/playwright/src/isomorphic/*"],"@trace/*": ["./packages/trace/src/*"],"@web/*": ["./packages/web/src/*"],"playwright-core/lib/*": ["./packages/playwright-core/src/*"],- "@playwright/test/lib/*": ["./packages/playwright-test/src/*"],+ "playwright/lib/*": ["./packages/playwright/src/*"],},"esModuleInterop": true,"strict": true,diff --git a/utils/check_deps.js b/utils/check_deps.jsindex fbcf5554c3..ab1ed12072 100644--- a/utils/check_deps.js+++ b/utils/check_deps.js@@ -29,7 +29,7 @@ const packages = new Map();packages.set('web', packagesDir + '/web/src/');packages.set('injected', packagesDir + '/playwright-core/src/server/injected/');packages.set('isomorphic', packagesDir + '/playwright-core/src/utils/isomorphic/');-packages.set('testIsomorphic', packagesDir + '/playwright-test/src/isomorphic/');+packages.set('testIsomorphic', packagesDir + '/playwright/src/isomorphic/');const peerDependencies = ['electron', 'react', 'react-dom', '@zip.js/zip.js'];@@ -45,11 +45,11 @@ async function checkDeps() {await innerCheckDeps(path.join(packagesDir, 'web'));const corePackageJson = await innerCheckDeps(path.join(packagesDir, 'playwright-core'));- const testPackageJson = await innerCheckDeps(path.join(packagesDir, 'playwright-test'));+ const playwrightPackageJson = await innerCheckDeps(path.join(packagesDir, 'playwright'));let hasVersionMismatch = false;for (const [key, value] of Object.entries(corePackageJson.dependencies || {})) {- const value2 = testPackageJson.dependencies[key];+ const value2 = playwrightPackageJson.dependencies[key];if (value2 && value2 !== value) {hasVersionMismatch = true;console.log(`Dependency version mismatch ${key}: ${value} != ${value2}`);@@ -135,7 +135,7 @@ async function innerCheckDeps(root) {const mergedDeps = calculateDeps(fileName);if (mergedDeps.includes('***'))- return;+ return;if (importPath) {if (!fs.existsSync(importPath)) {if (fs.existsSync(importPath + '.ts'))diff --git a/utils/generate_third_party_notice.js b/utils/generate_third_party_notice.jsindex 6ba2f451b9..8028b4b98f 100644--- a/utils/generate_third_party_notice.js+++ b/utils/generate_third_party_notice.js@@ -37,7 +37,7 @@ async function checkDir(dir) {}(async () => {- for (const project of ['playwright-core', 'playwright-test']) {+ for (const project of ['playwright-core', 'playwright']) {const lines = [];lines.push(`microsoft/${project}diff --git a/utils/generate_types/index.js b/utils/generate_types/index.jsindex 811242d71c..f775dd2176 100644--- a/utils/generate_types/index.js+++ b/utils/generate_types/index.js@@ -657,13 +657,13 @@ class TypesGenerator {const coreTypesDir = path.join(PROJECT_DIR, 'packages', 'playwright-core', 'types');if (!fs.existsSync(coreTypesDir))fs.mkdirSync(coreTypesDir)- const testTypesDir = path.join(PROJECT_DIR, 'packages', 'playwright-test', 'types');- if (!fs.existsSync(testTypesDir))- fs.mkdirSync(testTypesDir)+ const playwrightTypesDir = path.join(PROJECT_DIR, 'packages', 'playwright', 'types');+ if (!fs.existsSync(playwrightTypesDir))+ fs.mkdirSync(playwrightTypesDir)writeFile(path.join(coreTypesDir, 'protocol.d.ts'), fs.readFileSync(path.join(PROJECT_DIR, 'packages', 'playwright-core', 'src', 'server', 'chromium', 'protocol.d.ts'), 'utf8'), false);writeFile(path.join(coreTypesDir, 'types.d.ts'), await generateCoreTypes(false), true);- writeFile(path.join(testTypesDir, 'test.d.ts'), await generateTestTypes(false), true);- writeFile(path.join(testTypesDir, 'testReporter.d.ts'), await generateReporterTypes(false), true);+ writeFile(path.join(playwrightTypesDir, 'test.d.ts'), await generateTestTypes(false), true);+ writeFile(path.join(playwrightTypesDir, 'testReporter.d.ts'), await generateReporterTypes(false), true);process.exit(hadChanges && process.argv.includes('--check-clean') ? 1 : 0);})().catch(e => {console.error(e);diff --git a/utils/workspace.js b/utils/workspace.jsindex a452523085..a63fb79ce1 100755--- a/utils/workspace.js+++ b/utils/workspace.js@@ -150,7 +150,7 @@ const workspace = new Workspace(ROOT_PATH, [new PWPackage({name: 'playwright',path: path.join(ROOT_PATH, 'packages', 'playwright'),- // We copy README.md additionally for Playwright so that it looks nice on NPM.+ // We copy README.md additionally for playwright so that it looks nice on NPM.files: [...LICENCE_FILES, 'README.md'],}),new PWPackage({@@ -161,7 +161,8 @@ const workspace = new Workspace(ROOT_PATH, [new PWPackage({name: '@playwright/test',path: path.join(ROOT_PATH, 'packages', 'playwright-test'),- files: LICENCE_FILES,+ // We copy README.md additionally for @playwright/test so that it looks nice on NPM.+ files: [...LICENCE_FILES, 'README.md'],}),new PWPackage({name: 'playwright-webkit',