This enables `allowDeclareFields` flag that allows code like:
```ts
class Foo {
declare prop: string;
}
```
Declaring is a workaround for inheritance vs property initialization
issues.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier
For `allowDeclareFields` to work, we have to run
plugin-transform-typescript before plugin-proposal-class-properties and
few others, so this change migrates from preset-typescript that always
runs last to individual plugin-transform-typescript, and reorders some
plugins.
References #21119.
There is currently a bug when running `node@18.14.2` when running with
experimentalLoader
```
TypeError: The URL must be of scheme file
at new NodeError (node:internal/errors:399:5)
at Object.fileURLToPath (node:internal/url:1492:11)
at resolve (./node_modules/@playwright/test/lib/experimentalLoader.js:39:48)
at nextResolve (node:internal/modules/esm/loader:163:22)
at ESMLoader.resolve (node:internal/modules/esm/loader:838:24)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:7)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:21)
```
This came from my test `vrt.spec.ts` which had a non package import
inside of it
```ts
import fs from "node:fs/promises"
```
The test run failed due to node imports not returning fileUrls when
resolved.
---------
Co-authored-by: Nowell Strite <nstrite@nvidia.com>
This reverts commit 303c5998f8.
Reason for revert: I tried enabling `ssim-cie94` by default on
ionic-framework test suite, and it proves to be overly strict for their
usecase.
This implementation is based on the [original
PR](https://github.com/microsoft/playwright/pull/19691) by @kevin940726.
It makes the reporter produce single file when there is no sharding and
multiple out-of-line report-x-of-y.zip reports which are automatically
merged together when put in one folder.
References https://github.com/microsoft/playwright/issues/10437
Co-authored-by: Kai Hao <kevin830726@gmail.com>
The option defines a comparator to be used to compare images.
Possible values are `"pixelmatch"` and `"ssim-cie94"`.
Note: This reverts commit 8167f8bf54.
Close https://github.com/microsoft/playwright/issues/19803
I had to manually inject `window.playwrightReportBase64` data into
`playwright/packages/html-reporter/index.html` when developing,
wondering if there's any method I don't know.