Skip to content

Commit f54478a

Browse files
authored
chore: move utils that are user in server to server/utils (3) (#34739)
1 parent 703ca9f commit f54478a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+204
-227
lines changed

packages/playwright-core/src/DEPS.list

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ utils/
1414
client/
1515
protocol/
1616
utils/
17-
common/
17+
utils/isomorphic
18+
server/utils
19+
common/

packages/playwright-core/src/cli/driver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import * as fs from 'fs';
2020

2121
import * as playwright from '../..';
22-
import { PipeTransport } from '../protocol/transport';
22+
import { PipeTransport } from '../utils/pipeTransport';
2323
import { PlaywrightServer } from '../remote/playwrightServer';
2424
import { DispatcherConnection, PlaywrightDispatcher, RootDispatcher, createPlaywright } from '../server';
2525
import { gracefullyProcessExitDoNotHang } from '../server/utils/processLauncher';

packages/playwright-core/src/client/android.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import { TargetClosedError, isTargetClosedError } from './errors';
2222
import { Events } from './events';
2323
import { Waiter } from './waiter';
2424
import { TimeoutSettings } from '../common/timeoutSettings';
25-
import { isRegExp, isString } from '../utils/rtti';
26-
import { monotonicTime } from '../utils/time';
27-
import { raceAgainstDeadline } from '../utils/timeoutRunner';
25+
import { isRegExp, isString } from '../utils/isomorphic/rtti';
26+
import { monotonicTime } from '../utils/isomorphic/time';
27+
import { raceAgainstDeadline } from '../utils/isomorphic/timeoutRunner';
2828

2929
import type { Page } from './page';
3030
import type * as types from './types';

packages/playwright-core/src/client/browserContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ import { WebError } from './webError';
3636
import { Worker } from './worker';
3737
import { TimeoutSettings } from '../common/timeoutSettings';
3838
import { mkdirIfNeeded } from '../utils/fileUtils';
39-
import { headersObjectToArray } from '../utils/headers';
39+
import { headersObjectToArray } from '../utils/isomorphic/headers';
4040
import { urlMatchesEqual } from '../utils/isomorphic/urlMatch';
41-
import { isRegExp, isString } from '../utils/rtti';
41+
import { isRegExp, isString } from '../utils/isomorphic/rtti';
4242
import { rewriteErrorMessage } from '../utils/stackTrace';
4343

4444
import type { BrowserType } from './browserType';

packages/playwright-core/src/client/browserType.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import { ChannelOwner } from './channelOwner';
2222
import { envObjectToArray } from './clientHelper';
2323
import { Events } from './events';
2424
import { assert } from '../utils/debug';
25-
import { headersObjectToArray } from '../utils/headers';
26-
import { monotonicTime } from '../utils/time';
27-
import { raceAgainstDeadline } from '../utils/timeoutRunner';
25+
import { headersObjectToArray } from '../utils/isomorphic/headers';
26+
import { monotonicTime } from '../utils/isomorphic/time';
27+
import { raceAgainstDeadline } from '../utils/isomorphic/timeoutRunner';
2828

2929
import type { Playwright } from './playwright';
3030
import type { ConnectOptions, LaunchOptions, LaunchPersistentContextOptions, LaunchServerOptions, Logger } from './types';

packages/playwright-core/src/client/clientHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { isString } from '../utils/rtti';
18+
import { isString } from '../utils/isomorphic/rtti';
1919

2020
import type * as types from './types';
2121
import type { Platform } from '../utils/platform';

packages/playwright-core/src/client/elementHandle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { Frame } from './frame';
2121
import { JSHandle, parseResult, serializeArgument } from './jsHandle';
2222
import { assert } from '../utils/debug';
2323
import { fileUploadSizeLimit, mkdirIfNeeded } from '../utils/fileUtils';
24-
import { isString } from '../utils/rtti';
24+
import { isString } from '../utils/isomorphic/rtti';
2525
import { mime } from '../utilsBundle';
2626
import { WritableStream } from './writableStream';
2727

packages/playwright-core/src/client/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { parseSerializedValue, serializeValue } from '../protocol/serializers';
18-
import { isError } from '../utils/rtti';
18+
import { isError } from '../utils/isomorphic/rtti';
1919

2020
import type { SerializedError } from '@protocol/channels';
2121

packages/playwright-core/src/client/fetch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import { RawHeaders } from './network';
2121
import { Tracing } from './tracing';
2222
import { assert } from '../utils/debug';
2323
import { mkdirIfNeeded } from '../utils/fileUtils';
24-
import { headersObjectToArray } from '../utils/headers';
25-
import { isString } from '../utils/rtti';
24+
import { headersObjectToArray } from '../utils/isomorphic/headers';
25+
import { isString } from '../utils/isomorphic/rtti';
2626

2727
import type { Playwright } from './playwright';
2828
import type { ClientCertificate, FilePayload, Headers, SetStorageState, StorageState } from './types';

packages/playwright-core/src/client/locator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import { parseResult, serializeArgument } from './jsHandle';
1919
import { asLocator } from '../utils/isomorphic/locatorGenerators';
2020
import { getByAltTextSelector, getByLabelSelector, getByPlaceholderSelector, getByRoleSelector, getByTestIdSelector, getByTextSelector, getByTitleSelector } from '../utils/isomorphic/locatorUtils';
2121
import { escapeForTextSelector } from '../utils/isomorphic/stringUtils';
22-
import { isString } from '../utils/rtti';
23-
import { monotonicTime } from '../utils/time';
22+
import { isString } from '../utils/isomorphic/rtti';
23+
import { monotonicTime } from '../utils/isomorphic/time';
2424

2525
import type { Frame } from './frame';
2626
import type { FilePayload, FrameExpectParams, Rect, SelectOption, SelectOptionOptions, TimeoutOptions } from './types';

0 commit comments

Comments
 (0)