Although very common, bash is not guaranteed to be located at
`/bin/bash`. NixOS is an example of this.
More commonly, `/bin/bash` can be quite out of date. An example of this
is MacOS's version of `bash`. This realistically won't affect Playwright
but it's worth noting. You can technically update MacOS's system version
of bash but you need elevated permissions to do so.
By using `/usr/bin/env bash` instead of `/bin/bash` we can execute
Playwright's bash scripts in like NixOS and generally improve the
selection behaviour for bash in other systems too.
Some discussion of why it's worth favouring `/usr/bin/env bash` over
`/bin/bash`:
- Discusses `/bin/bash` missing in NixOS:
https://discourse.nixos.org/t/add-bin-bash-to-avoid-unnecessary-pain/5673
- Some general commentary on why `/usr/bin/env bash` is favoured:
https://askubuntu.com/a/1402721
- Points out how old bash is in MacOS:
https://itnext.io/upgrading-bash-on-macos-7138bd1066ba
Improves situation at #5501
There is a breaking in change in the `MatcherContext` that is passed to
matcher functions, so we now have `!!this.isNot` in a few places. The
same could happen to custom matcher in the wild.
```ts
// Old
{
isNot: boolean;
promise: string;
}
```
```ts
// New
{
isNot?: boolean;
promise?: string;
}
```
Fixes#23612.
The postmortem of the broken docker image:
- We use `playwright-core` package when bootstrapping our docker
container.
- Due to accidental removal of `bin` entry in the `playwright-core` (see
https://github.com/microsoft/playwright/issues/23206), the `npx
playwright install --with-deps` was using the last published
Playwright version instead of a locally-built playwright binary
This patch starts using `npx exec --no` to make sure that we never call
remote commands during docker image build.
This mode allows a suite to opt-out from parallelism. Useful to setup
multiple suites running in parallel, with each suite not being sharded.
References #22891.
BREAKING CHANGE: Drop support for React 17 and earlier
Support for React 17 an earlier is provided by
`@playwright/experimental-ct-react-17`
Closes#19923
* It is more common to set env variable value without quotes on Windows
(see the bug)
* Use defined to check for string presence, it will work nicely with
strings that contain whitespaces
https://github.com/microsoft/playwright-java/issues/1213