From 2a0a44bc09e66ac4aaf03efb1b9d12ea27fd641f Mon Sep 17 00:00:00 2001 From: Joel Einbinder Date: Wed, 13 Oct 2021 16:38:26 -0400 Subject: [PATCH] chore: move diff_match_patch into the test package (#9475) --- packages/playwright-test/src/matchers/golden.ts | 2 +- .../src/third_party/diff_match_patch.js | 0 utils/build/build.js | 7 +++++++ 3 files changed, 8 insertions(+), 1 deletion(-) rename packages/{playwright-core => playwright-test}/src/third_party/diff_match_patch.js (100%) diff --git a/packages/playwright-test/src/matchers/golden.ts b/packages/playwright-test/src/matchers/golden.ts index 1605bb55fe..b7e02ad126 100644 --- a/packages/playwright-test/src/matchers/golden.ts +++ b/packages/playwright-test/src/matchers/golden.ts @@ -21,7 +21,7 @@ import fs from 'fs'; import path from 'path'; import jpeg from 'jpeg-js'; import pixelmatch from 'pixelmatch'; -import { diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL } from 'playwright-core/src/third_party/diff_match_patch'; +import { diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL } from '../third_party/diff_match_patch'; import { TestInfoImpl, UpdateSnapshots } from '../types'; import { addSuffixToFilePath } from '../util'; diff --git a/packages/playwright-core/src/third_party/diff_match_patch.js b/packages/playwright-test/src/third_party/diff_match_patch.js similarity index 100% rename from packages/playwright-core/src/third_party/diff_match_patch.js rename to packages/playwright-test/src/third_party/diff_match_patch.js diff --git a/utils/build/build.js b/utils/build/build.js index 69cd458c01..7080135551 100644 --- a/utils/build/build.js +++ b/utils/build/build.js @@ -194,6 +194,13 @@ copyFiles.push({ ignored: ['**/.eslintrc.js', '**/webpack*.config.js', '**/injected/**/*'] }); +copyFiles.push({ + files: 'packages/playwright-test/src/**/*.js', + from: 'packages/playwright-test/src', + to: 'packages/playwright-test/lib', + ignored: ['**/.eslintrc.js'] +}); + // Sometimes we require JSON files that babel ignores. // For example, deviceDescriptorsSource.json copyFiles.push({