Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr_check_client_side_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths:
- 'docs/src/api/**/*'
- 'packages/playwright-core/src/client/**/*'
- 'packages/playwright-core/src/utils/isomorphic/**/*'
- 'packages/isomorphic/**/*'
- 'packages/playwright/src/matchers/matchers.ts'
- 'packages/protocol/src/protocol.yml'
jobs:
Expand Down
3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export default [
},
{
files: [
"packages/playwright-core/src/utils/**/*.ts",
"packages/isomorphic/**/*.ts",
],
languageOptions: languageOptionsWithTsConfig,
rules: {
Expand Down Expand Up @@ -472,6 +472,7 @@ export default [
{
files: [
"packages/playwright-core/src/server/**/*.ts",
"packages/utils/**/*.ts",
],
plugins: {
"progress": progressPlugin,
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default defineConfig({
],
resolve: {
alias: {
'@isomorphic': path.resolve(__dirname, '../playwright-core/src/utils/isomorphic'),
'@isomorphic': path.resolve(__dirname, '../isomorphic'),
'@protocol': path.resolve(__dirname, '../protocol/src'),
'@web': path.resolve(__dirname, '../web/src'),
},
Expand Down
2 changes: 1 addition & 1 deletion packages/html-reporter/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineConfig({
resolve: {
alias: {
'@web': path.resolve(__dirname, '../web/src'),
'@isomorphic': path.resolve(__dirname, '../playwright-core/src/utils/isomorphic'),
'@isomorphic': path.resolve(__dirname, '../isomorphic'),
},
},
build: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { webColors } from '@isomorphic/colors';
import { webColors } from './colors';

import type * as fs from 'fs';
import type * as path from 'path';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type { Language } from '../locatorGenerators';
import type { ResourceSnapshot } from '@trace/snapshot';
import type * as trace from '@trace/trace';
import type { ActionTraceEvent } from '@trace/trace';
import type { ActionEntry, ContextEntry, PageEntry } from '../trace/entries';
import type { ActionEntry, ContextEntry, PageEntry } from './entries';
import type { StackFrame } from '@protocol/channels';
import type { ActionGroup } from '../protocolFormatter';

Expand Down
4 changes: 2 additions & 2 deletions packages/playwright-client/src/webPlatform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* limitations under the License.
*/

import { emptyPlatform } from '../../playwright-core/src/client/platform';
import { emptyPlatform } from '@isomorphic/platform';

import type { Platform } from '../../playwright-core/src/client/platform';
import type { Platform } from '@isomorphic/platform';

export const webPlatform: Platform = {
...emptyPlatform,
Expand Down
2 changes: 2 additions & 0 deletions packages/playwright-core/ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ bundle, together with the full license text for each.

For example:
- lib/utilsBundle.js.LICENSE

This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.
1 change: 1 addition & 0 deletions packages/playwright-core/src/DEPS.list
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ server/

[inprocess.ts]
**
@utils/**

[outofprocess.ts]
client/
Expand Down
4 changes: 2 additions & 2 deletions packages/playwright-core/src/browserServerImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import EventEmitter from 'events';

import { createGuid } from '@utils/crypto';
import { isUnderTest } from '@utils/debug';
import { rewriteErrorMessage } from '@isomorphic/stackTrace';
import { DEFAULT_PLAYWRIGHT_LAUNCH_TIMEOUT } from '@isomorphic/time';
import { PlaywrightServer } from './remote/playwrightServer';
import { helper } from './server/helper';
import { createPlaywright } from './server/playwright';
import { rewriteErrorMessage } from './utils/isomorphic/stackTrace';
import { DEFAULT_PLAYWRIGHT_LAUNCH_TIMEOUT } from './utils/isomorphic/time';
import * as validatorPrimitives from './protocol/validatorPrimitives';
import { ProgressController } from './server/progress';

Expand Down
3 changes: 2 additions & 1 deletion packages/playwright-core/src/cli/DEPS.list
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[*]
@isomorphic/**
@utils/**
../inprocess.ts
../package.ts
../server/
../server/registry/
@utils/**
../remote/
../utils/**
../utilsBundle.ts
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import type { Page } from './page';
import type * as types from './types';
import type * as api from '../../types/types';
import type { AndroidServerLauncherImpl } from '../androidServerImpl';
import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';
import type * as channels from '@protocol/channels';
import type { Playwright } from './playwright';

Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/browserContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import type { BrowserContextOptions, Headers, SetStorageState, StorageState, Wai
import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import type { URLMatch } from '@isomorphic/urlMatch';
import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';
import type * as channels from '@protocol/channels';
import type * as actions from '@recorder/actions';

Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/channelOwner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import type { ClientInstrumentation } from './clientInstrumentation';
import type { Connection } from './connection';
import type { Logger } from './types';
import type { ValidatorContext } from '../protocol/validator';
import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';
import type * as channels from '@protocol/channels';

type Listener = (...args: any[]) => void;
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/clientHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import { isString } from '@isomorphic/rtti';

import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';

export function envObjectToArray(env: NodeJS.ProcessEnv): { name: string, value: string }[] {
const result: { name: string, value: string }[] = [];
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/clientStackTrace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { captureRawStack, parseStackFrame } from '@isomorphic/stackTrace';

import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';
import type { StackFrame } from '@isomorphic/stackTrace';

export function captureLibraryStackTrace(platform: Platform): { frames: StackFrame[], apiName: string } {
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import { ValidationError, findValidator } from '../protocol/validator';
import type { ClientInstrumentation } from './clientInstrumentation';
import type { HeadersArray } from './types';
import type { ValidatorContext } from '../protocol/validator';
import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';
import type * as channels from '@protocol/channels';

class Root extends ChannelOwner<channels.RootChannel> {
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/consoleMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { JSHandle } from './jsHandle';

import type * as api from '../../types/types';
import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';
import type * as channels from '@protocol/channels';
import type { Page } from './page';
import type { Worker } from './worker';
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/elementHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import type { Locator } from './locator';
import type { FilePayload, Rect, SelectOption, SelectOptionOptions, TimeoutOptions } from './types';
import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';
import type * as channels from '@protocol/channels';

export class ElementHandle<T extends Node = Node> extends JSHandle<T> implements api.ElementHandle {
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/eventEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

import type { EventEmitter as EventEmitterType } from 'events';
import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';

type EventType = string | symbol;
type Listener = (...args: any[]) => any;
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import type { ClientCertificate, FilePayload, Headers, SetStorageState, StorageS
import type { Serializable } from '../../types/structs';
import type * as api from '../../types/types';
import type { HeadersArray, NameValue } from '@isomorphic/types';
import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';
import type * as channels from '@protocol/channels';
import type * as fs from 'fs';

Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';

// Keep in sync with the server.
export const fileUploadSizeLimit = 50 * 1024 * 1024;
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import type * as api from '../../types/types';
import type { HeadersArray } from '@isomorphic/types';
import type { URLMatch } from '@isomorphic/urlMatch';
import type * as channels from '@protocol/channels';
import type { Platform, Zone } from './platform';
import type { Platform, Zone } from '@isomorphic/platform';

export type NetworkCookie = {
name: string,
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type { SelectorEngine } from './types';
import type * as api from '../../types/types';
import type * as channels from '@protocol/channels';
import type { BrowserContext } from './browserContext';
import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';

export class Selectors implements api.Selectors {
private _platform: Platform;
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/timeoutSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import { DEFAULT_PLAYWRIGHT_LAUNCH_TIMEOUT, DEFAULT_PLAYWRIGHT_TIMEOUT } from '@isomorphic/time';

import type { Platform } from './platform';
import type { Platform } from '@isomorphic/platform';

export class TimeoutSettings {
private _parent: TimeoutSettings | undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/client/waiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { TimeoutError } from './errors';
import type { ChannelOwner } from './channelOwner';
import type * as channels from '@protocol/channels';
import type { EventEmitter } from 'events';
import type { Zone } from './platform';
import type { Zone } from '@isomorphic/platform';

export class Waiter {
private _dispose: (() => void)[];
Expand Down
7 changes: 4 additions & 3 deletions packages/playwright-core/src/coreBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
* limitations under the License.
*/

export * as iso from '@isomorphic/index';
export * as utils from '@utils/index';
export * as client from './client';
export * as iso from './utils/isomorphic';
export * as utils from './server/utils/index';
export * as libCli from './cli/program';
export * as libCliTestStub from './cli/programWithTestStub';
export * as inprocess from './inprocess';
export * as oop from './outofprocess';
export * as remote from './remote/playwrightServer';
export * as registry from './server/registry/index';
export * as sever from './server/index';
export * as server from './server/index';
export * as tools from './tools';
export { getUserAgent, getPlaywrightVersion } from './server/userAgent';
3 changes: 2 additions & 1 deletion packages/playwright-core/src/inprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ import { AndroidServerLauncherImpl } from './androidServerImpl';
import { BrowserServerLauncherImpl } from './browserServerImpl';
import { DispatcherConnection, PlaywrightDispatcher, RootDispatcher, createPlaywright } from './server';
import { Connection } from './client/connection';
import { packageRoot } from './package';

import type { Playwright as PlaywrightAPI } from './client/playwright';
import type { Language } from '@isomorphic/locatorGenerators';

function createInProcessPlaywright(): PlaywrightAPI {
const playwright = createPlaywright({ sdkLanguage: (process.env.PW_LANG_NAME as Language | undefined) || 'javascript' });
const clientConnection = new Connection(nodePlatform);
const clientConnection = new Connection(nodePlatform(packageRoot));
clientConnection.useRawBuffers();
const dispatcherConnection = new DispatcherConnection(true /* local */);

Expand Down
4 changes: 2 additions & 2 deletions packages/playwright-core/src/outofprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import path from 'path';

import { PipeTransport } from '@utils/pipeTransport';
import { nodePlatform } from '@utils/nodePlatform';
import { ManualPromise } from '@isomorphic/manualPromise';
import { Connection } from './client/connection';
import { packageRoot } from './package';
import { ManualPromise } from './utils/isomorphic/manualPromise';

import type { Playwright } from './client/playwright';

Expand Down Expand Up @@ -51,7 +51,7 @@ class PlaywrightClient {
// eslint-disable-next-line no-restricted-properties
this._driverProcess.stderr!.on('data', data => process.stderr.write(data));

const connection = new Connection(nodePlatform);
const connection = new Connection(nodePlatform(packageRoot));
const transport = new PipeTransport(this._driverProcess.stdin!, this._driverProcess.stdout!);
connection.onmessage = message => transport.send(JSON.stringify(message));
transport.onmessage = message => connection.dispatch(JSON.parse(message));
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/remote/playwrightServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import { Semaphore } from '@isomorphic/semaphore';
import { DEFAULT_PLAYWRIGHT_LAUNCH_TIMEOUT } from '@isomorphic/time';
import { WSServer } from '@utils/wsServer';
import { wrapInASCIIBox } from '@utils/ascii';
import { getPlaywrightVersion } from '@utils/userAgent';
import { SocksProxy } from '@utils/socksProxy';
import { debugLogger } from '@utils/debugLogger';
import { isUnderTest } from '@utils/debug';
import { getPlaywrightVersion } from '../server/userAgent';
import { PlaywrightConnection, PlaywrightInitializeResult } from './playwrightConnection';
import { WebSocketServerTransport } from './serverTransport';
import { createPlaywright } from '../server/playwright';
Expand Down
4 changes: 2 additions & 2 deletions packages/playwright-core/src/server/DEPS.list
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[*]
@isomorphic/**
@utils/**
../generated/
../package.ts
../protocol/
../utils
@isomorphic/**
../utilsBundle.ts
./
./codegen/
Expand All @@ -12,7 +13,6 @@
./recorder/
./registry/
./trace/recorder/tracing.ts
./utils/
node_modules/jpeg-js
node_modules/mime
node_modules/pngjs
Expand Down
3 changes: 2 additions & 1 deletion packages/playwright-core/src/server/android/DEPS.list
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[*]
@isomorphic/**
@utils/**
../
../../protocol/
@isomorphic/**
../../utilsBundle.ts
../chromium/
../utils
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/server/bidi/DEPS.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[*]
../../utils/**
@utils/**
@isomorphic/**
../
../isomorphic/
Expand Down
4 changes: 2 additions & 2 deletions packages/playwright-core/src/server/chromium/chromium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import path from 'path';
import { ManualPromise } from '@isomorphic/manualPromise';
import { wrapInASCIIBox } from '@utils/ascii';
import { RecentLogsCollector } from '@utils/debugLogger';
import { fetchData } from '@utils/network';
import { getUserAgent } from '@utils/userAgent';
import { removeFolders } from '@utils/fileUtils';
import { gracefullyCloseSet } from '@utils/processLauncher';
import { debugMode } from '@utils/debug';
import { headersArrayToObject, headersObjectToArray } from '@isomorphic/headers';
import { fetchData } from '../utils';
import { getUserAgent } from '../userAgent';
import { chromiumSwitches } from './chromiumSwitches';
import { shouldProxyLoopback, CRBrowser } from './crBrowser';
import { kBrowserCloseMessageId } from './crConnection';
Expand Down
3 changes: 2 additions & 1 deletion packages/playwright-core/src/server/codegen/DEPS.list
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[*]
../../utils/**
@isomorphic/**
@utils/**
../deviceDescriptors.ts
2 changes: 1 addition & 1 deletion packages/playwright-core/src/server/dispatchers/DEPS.list
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[*]
../../generated/
../../protocol/
../../utils/**
@utils/**
@isomorphic/**
../**
node_modules/yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

import net from 'net';
import { resolveGlobToRegexPattern } from '@isomorphic/urlMatch';
import { getUserAgent } from '@utils/userAgent';
import { fetchData } from '@utils/network';
import { fetchData } from '../utils';
import { getUserAgent } from '../userAgent';
import { Dispatcher } from './dispatcher';
import { SdkObject } from '../../server/instrumentation';
import { SdkObject } from '../instrumentation';
import * as localUtils from '../localUtils';
import { deviceDescriptors as descriptors } from '../deviceDescriptors';
import { JsonPipeDispatcher } from '../dispatchers/jsonPipeDispatcher';
Expand Down
Loading
Loading