mirror of
https://github.com/playwright-community/playwright-go.git
synced 2026-06-03 21:02:27 +08:00
BREAKING CHANGE:
Due to the rewrite of the go code generation scripts, it brings the following **breaking** changes:
- Optimized generated comments. Links and **Deprecated** tags in Go doc comments now work.
- May cause many **Deprecated** lint errors, please update the call or use `//nolint:staticcheck` to ignore.
- Added event interface methods. For example `Page.OnDialog()` etc.
- The signatures of some interface methods have changed, for example:
- Unified optional parameter naming. For example, previously all `Click` used `PageClickOptions`, now
```go
Locator.Click(options ...LocatorClickOptions)
Page.Click(selector string, options ...PageClickOptions)
Frame.Click(selector string, options ...FrameClickOptions)
```
- Some parameters are generated as new types or names, e.g. `Page.AddInitScript(script Script)`
- Removed several methods that were not documented upstream. These methods can be safely converted to other existing methods. For example
- `Page.ExpectedDialog` can use `Page.OnDialog` instead.
- All `xxxAssertions.NotTo...`, use `.Not().xxx` pls.
29 lines
628 B
Bash
Executable File
29 lines
628 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
BRANCH_NAME_BUILD="playwright-build"
|
|
SCRIPTS_DIR="$(dirname "$0")"
|
|
|
|
echo "Applying patches..."
|
|
echo "==================="
|
|
|
|
pushd "$SCRIPTS_DIR/.."
|
|
PW_VERSION="$(grep -oE "playwrightCliVersion.+\"[0-9\.]+" ./run.go | sed 's/playwrightCliVersion = "/v/g')"
|
|
git submodule update --init
|
|
pushd playwright
|
|
|
|
git checkout HEAD --detach
|
|
|
|
if git show-ref -q --heads "$BRANCH_NAME_BUILD"; then
|
|
git fetch --tags
|
|
git checkout "$PW_VERSION"
|
|
git branch -D "$BRANCH_NAME_BUILD"
|
|
fi
|
|
|
|
git checkout -b "$BRANCH_NAME_BUILD"
|
|
git apply --3way --whitespace=nowarn ../patches/*
|
|
git add -A
|
|
git commit -m "Applied patches"
|
|
|
|
popd |