chore: roll stable-test-runner to 1.28.1 (#19310)

This required `allowJs: false` in our `tsconfig.json` due to the
following error:

```

Error: Cannot find module './utilsBundleImpl'
Require stack:
- <playwright>/packages/playwright-core/src/utilsBundle.ts
- <playwright>/packages/playwright-test/lib/reporters/html.js
- <playwright>/tests/playwright-test/reporter-html.spec.ts
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/@playwright/test/lib/loader.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/@playwright/test/lib/runner.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/@playwright/test/lib/cli.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/playwright-core/lib/cli/cli.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/playwright-core/cli.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/@playwright/test/cli.js

   at ../../packages/playwright-core/src/utilsBundle.ts:20

  18 | import path from 'path';
  19 |
> 20 | export const colors: typeof import('../bundles/utils/node_modules/colors/safe') = require('./utilsBundleImpl').colors;
     |                                                                                   ^
  21 | export const debug: typeof import('../bundles/utils/node_modules/@types/debug') = require('./utilsBundleImpl').debug;
  22 | export const getProxyForUrl: typeof import('../bundles/utils/node_modules/@types/proxy-from-env').getProxyForUrl = require('./utilsBundleImpl').getProxyForUrl;
  23 | export const HttpsProxyAgent: typeof import('../bundles/utils/node_modules/https-proxy-agent').HttpsProxyAgent = require('./utilsBundleImpl').HttpsProxyAgent;

    at Object.<anonymous> (<playwright>/packages/playwright-core/src/utilsBundle.ts:20:83)
    at Object.<anonymous> (<playwright>/packages/playwright-test/src/reporters/html.ts:17:1)

```
This commit is contained in:
Dmitry Gozman 2022-12-06 15:46:19 -08:00 committed by GitHub
parent beb15bb504
commit d294c5da33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 25 additions and 24 deletions

View file

@ -22,7 +22,7 @@ import type { Action } from './recorderActions';
import type { MouseClickOptions } from './utils'; import type { MouseClickOptions } from './utils';
import { toModifiers } from './utils'; import { toModifiers } from './utils';
import { escapeWithQuotes } from '../../utils/isomorphic/stringUtils'; import { escapeWithQuotes } from '../../utils/isomorphic/stringUtils';
import deviceDescriptors from '../deviceDescriptors'; const deviceDescriptors = require('../deviceDescriptorsSource.json');
import { asLocator } from '../isomorphic/locatorGenerators'; import { asLocator } from '../isomorphic/locatorGenerators';
type CSharpLanguageMode = 'library' | 'mstest' | 'nunit'; type CSharpLanguageMode = 'library' | 'mstest' | 'nunit';

View file

@ -21,7 +21,7 @@ import type { ActionInContext } from './codeGenerator';
import type { Action } from './recorderActions'; import type { Action } from './recorderActions';
import type { MouseClickOptions } from './utils'; import type { MouseClickOptions } from './utils';
import { toModifiers } from './utils'; import { toModifiers } from './utils';
import deviceDescriptors from '../deviceDescriptors'; const deviceDescriptors = require('../deviceDescriptorsSource.json');
import { JavaScriptFormatter } from './javascript'; import { JavaScriptFormatter } from './javascript';
import { escapeWithQuotes } from '../../utils/isomorphic/stringUtils'; import { escapeWithQuotes } from '../../utils/isomorphic/stringUtils';
import { asLocator } from '../isomorphic/locatorGenerators'; import { asLocator } from '../isomorphic/locatorGenerators';

View file

@ -21,7 +21,7 @@ import type { ActionInContext } from './codeGenerator';
import type { Action } from './recorderActions'; import type { Action } from './recorderActions';
import type { MouseClickOptions } from './utils'; import type { MouseClickOptions } from './utils';
import { toModifiers } from './utils'; import { toModifiers } from './utils';
import deviceDescriptors from '../deviceDescriptors'; const deviceDescriptors = require('../deviceDescriptorsSource.json');
import { escapeWithQuotes } from '../../utils/isomorphic/stringUtils'; import { escapeWithQuotes } from '../../utils/isomorphic/stringUtils';
import { asLocator } from '../isomorphic/locatorGenerators'; import { asLocator } from '../isomorphic/locatorGenerators';

View file

@ -22,7 +22,7 @@ import type { Action } from './recorderActions';
import type { MouseClickOptions } from './utils'; import type { MouseClickOptions } from './utils';
import { toModifiers } from './utils'; import { toModifiers } from './utils';
import { escapeWithQuotes, toSnakeCase } from '../../utils/isomorphic/stringUtils'; import { escapeWithQuotes, toSnakeCase } from '../../utils/isomorphic/stringUtils';
import deviceDescriptors from '../deviceDescriptors'; const deviceDescriptors = require('../deviceDescriptorsSource.json');
import { asLocator } from '../isomorphic/locatorGenerators'; import { asLocator } from '../isomorphic/locatorGenerators';
export class PythonLanguageGenerator implements LanguageGenerator { export class PythonLanguageGenerator implements LanguageGenerator {

View file

@ -16,9 +16,9 @@
*/ */
import { colors, jpegjs } from '../utilsBundle'; import { colors, jpegjs } from '../utilsBundle';
import pixelmatch from '../third_party/pixelmatch'; const pixelmatch = require('../third_party/pixelmatch');
import { compare } from '../image_tools/compare'; import { compare } from '../image_tools/compare';
import { diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL } from '../third_party/diff_match_patch'; const { diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL } = require('../third_party/diff_match_patch');
import { PNG } from '../utilsBundle'; import { PNG } from '../utilsBundle';
export type ImageComparatorOptions = { threshold?: number, maxDiffPixels?: number, maxDiffPixelRatio?: number, comparator?: string }; export type ImageComparatorOptions = { threshold?: number, maxDiffPixels?: number, maxDiffPixelRatio?: number, comparator?: string };
@ -100,7 +100,7 @@ function compareText(actual: Buffer | string, expectedBuffer: Buffer): Comparato
}; };
} }
function diff_prettyTerminal(diffs: diff_match_patch.Diff[]) { function diff_prettyTerminal(diffs: [number, string][]) {
const html = []; const html = [];
for (let x = 0; x < diffs.length; x++) { for (let x = 0; x < diffs.length; x++) {
const op = diffs[x][0]; // Operation (insert, delete, equal) const op = diffs[x][0]; // Operation (insert, delete, equal)

View file

@ -26,6 +26,7 @@ const config: Config = {
forbidOnly: !!process.env.CI, forbidOnly: !!process.env.CI,
workers: process.env.CI ? 2 : undefined, workers: process.env.CI ? 2 : undefined,
preserveOutput: process.env.CI ? 'failures-only' : 'always', preserveOutput: process.env.CI ? 'failures-only' : 'always',
snapshotPathTemplate: '__screenshots__/{testFilePath}/{arg}{ext}',
projects: [ projects: [
{ {
name: 'playwright-test', name: 'playwright-test',

View file

@ -5,16 +5,16 @@
"packages": { "packages": {
"": { "": {
"dependencies": { "dependencies": {
"@playwright/test": "1.27.0-alpha-sep-15-2022" "@playwright/test": "1.28.1"
} }
}, },
"node_modules/@playwright/test": { "node_modules/@playwright/test": {
"version": "1.27.0-alpha-sep-15-2022", "version": "1.28.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.27.0-alpha-sep-15-2022.tgz", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz",
"integrity": "sha512-8v6zhbFDpjDgSC74vOZKEUPlsFtU+JhZP1l+FjhY7Tz31/ohwBkXWYtbXl/3a4qD8AqdJ+NJ4RHQx4AkwqNFTA==", "integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==",
"dependencies": { "dependencies": {
"@types/node": "*", "@types/node": "*",
"playwright-core": "1.27.0-alpha-sep-15-2022" "playwright-core": "1.28.1"
}, },
"bin": { "bin": {
"playwright": "cli.js" "playwright": "cli.js"
@ -29,9 +29,9 @@
"integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA=="
}, },
"node_modules/playwright-core": { "node_modules/playwright-core": {
"version": "1.27.0-alpha-sep-15-2022", "version": "1.28.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.0-alpha-sep-15-2022.tgz", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz",
"integrity": "sha512-QWwYeWoXZaj5cBiR+IE35dXT8QbR6JNftr0yIN9wt0JI7Ju5rnoKJxCCYtIY9drPb+aAXbAC83xV/bt5t6N9fA==", "integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==",
"bin": { "bin": {
"playwright": "cli.js" "playwright": "cli.js"
}, },
@ -42,12 +42,12 @@
}, },
"dependencies": { "dependencies": {
"@playwright/test": { "@playwright/test": {
"version": "1.27.0-alpha-sep-15-2022", "version": "1.28.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.27.0-alpha-sep-15-2022.tgz", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz",
"integrity": "sha512-8v6zhbFDpjDgSC74vOZKEUPlsFtU+JhZP1l+FjhY7Tz31/ohwBkXWYtbXl/3a4qD8AqdJ+NJ4RHQx4AkwqNFTA==", "integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==",
"requires": { "requires": {
"@types/node": "*", "@types/node": "*",
"playwright-core": "1.27.0-alpha-sep-15-2022" "playwright-core": "1.28.1"
} }
}, },
"@types/node": { "@types/node": {
@ -56,9 +56,9 @@
"integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA=="
}, },
"playwright-core": { "playwright-core": {
"version": "1.27.0-alpha-sep-15-2022", "version": "1.28.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.0-alpha-sep-15-2022.tgz", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz",
"integrity": "sha512-QWwYeWoXZaj5cBiR+IE35dXT8QbR6JNftr0yIN9wt0JI7Ju5rnoKJxCCYtIY9drPb+aAXbAC83xV/bt5t6N9fA==" "integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag=="
} }
} }
} }

View file

@ -1,6 +1,6 @@
{ {
"private": true, "private": true,
"dependencies": { "dependencies": {
"@playwright/test": "1.27.0-alpha-sep-15-2022" "@playwright/test": "1.28.1"
} }
} }

View file

@ -18,7 +18,7 @@
}, },
"esModuleInterop": true, "esModuleInterop": true,
"strict": true, "strict": true,
"allowJs": true, "allowJs": false,
"jsx": "react", "jsx": "react",
"resolveJsonModule": true, "resolveJsonModule": true,
"noEmit": true, "noEmit": true,