Skip to content

Commit 6ae6e04

Browse files
authored
chore: move imageUtils.ts to utils/isomorphic (#39497)
1 parent b7bf1ef commit 6ae6e04

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/playwright-core/src/mcp/browser/tools/screenshot.ts

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

17-
import { scaleImageToSize } from '../../../server/utils/imageUtils';
17+
import { scaleImageToSize } from '../../../utils/isomorphic/imageUtils';
1818
import { jpegjs, PNG } from '../../../utilsBundle';
1919
import { formatObject } from '../../../utils/isomorphic/stringUtils';
2020

packages/playwright-core/src/server/utils/comparators.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import pixelmatch from '../../third_party/pixelmatch';
2121
import { jpegjs } from '../../utilsBundle';
2222
import { colors, diff } from '../../utilsBundle';
2323
import { PNG } from '../../utilsBundle';
24-
import { padImageToSize } from './imageUtils';
24+
import { padImageToSize } from '../../utils/isomorphic/imageUtils';
2525

26-
import type { ImageData } from './imageUtils';
26+
import type { ImageData } from '../../utils/isomorphic/imageUtils';
2727

2828
export type ImageComparatorOptions = { threshold?: number, maxDiffPixels?: number, maxDiffPixelRatio?: number, comparator?: string };
2929
export type ComparatorResult = { diff?: Buffer; errorMessage: string; } | null;

packages/playwright-core/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export * from './utils/isomorphic/ariaSnapshot';
1818
export * from './utils/isomorphic/assert';
1919
export * from './utils/isomorphic/colors';
2020
export * from './utils/isomorphic/headers';
21+
export * from './utils/isomorphic/imageUtils';
2122
export * from './utils/isomorphic/locatorGenerators';
2223
export * from './utils/isomorphic/manualPromise';
2324
export * from './utils/isomorphic/mimeType';
@@ -44,7 +45,6 @@ export * from './server/utils/expectUtils';
4445
export * from './server/utils/fileUtils';
4546
export * from './server/utils/hostPlatform';
4647
export * from './server/utils/httpServer';
47-
export * from './server/utils/imageUtils';
4848
export * from './server/utils/network';
4949
export * from './server/utils/nodePlatform';
5050
export * from './server/utils/processLauncher';

packages/playwright-core/src/server/utils/imageUtils.ts renamed to packages/playwright-core/src/utils/isomorphic/imageUtils.ts

File renamed without changes.

0 commit comments

Comments
 (0)