Pre Node.js `18.20.0`: - `assert` is supported Post Node.js `18.20.0` - `assert` and `with` is supported. Before https://github.com/microsoft/playwright/pull/30482 we kept `asserts` in the JS code, Node.js was interpreting them. The `with` keyword was not supported, this was what the PR was fixing. After https://github.com/microsoft/playwright/pull/30482 Babel is converting `assert` (deprecated) into `with` (successor) since we use the `deprecatedAssertSyntax` option. This means, that the minimum Node.js version we support in order to use import attributes is now `18.20.0` where they added the `with` support. This follows our principle of supporting only the latest minor release for Node.js versions. See here for the 18.20 changelog: > #### Added support for import attributes > > Support has been added for import attributes, to replace the old import > assertions syntax. This will aid migration by making the new syntax available > across all currently supported Node.js release lines. > > This adds the `with` keyword which should be used in place of the previous > `assert` keyword, which will be removed in a future semver-major Node.js > release. > > For example, > > ```console > import "foo" assert { ... } > ``` > > should be replaced with > > ```console > import "foo" with { ... } > ``` Fixes https://github.com/microsoft/playwright/pull/30482 - the tests were a noop before, since they were tree-shaked by Babel. |
||
|---|---|---|
| .. | ||
| android | ||
| assets | ||
| components | ||
| config | ||
| electron | ||
| image_tools | ||
| installation | ||
| library | ||
| page | ||
| playwright-test | ||
| stress | ||
| third_party/proxy | ||
| webview2 | ||
| .eslintrc.js | ||
| index.d.ts | ||
| tsconfig.json | ||