Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: roll to Playwright v1.40.1 #394

Merged
merged 8 commits into from
Dec 3, 2023

Conversation

canstand
Copy link
Collaborator

@canstand canstand commented Nov 27, 2023

  • roll to Playwright v1.40.1
  • SetInputFiles now supports both file paths and InputFile objects

@canstand canstand marked this pull request as ready for review November 27, 2023 09:27
@canstand canstand changed the title chore: roll to Playwright v1.40.0 chore: roll to Playwright v1.40.1 Nov 29, 2023
artifact.go Outdated
@@ -18,7 +18,7 @@ func (a *artifactImpl) PathAfterFinished() (string, error) {
return "", errors.New("Path is not available when connecting remotely. Use SaveAs() to save a local copy")
}
path, err := a.channel.Send("pathAfterFinished")
if path == nil {
if path == nil { // < v1.40.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally would remove that, since we from the last person throw if you connect to a server which is not matching the protocol version you are using. The user use-case if that you are using the normal driver which we download for you where we ensure that the version always matches.

browser.go Outdated
}
// if b.isClosedOrClosing {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant code?

errors.go Outdated
Comment on lines 37 to 38
ErrBrowserClosed = errors.New("Browser has been closed")
ErrBrowserOrContextClosed = errors.New("Target page, context or browser has been closed")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ErrBrowserClosed = errors.New("Browser has been closed")
ErrBrowserOrContextClosed = errors.New("Target page, context or browser has been closed")

can't we remove these two? Ideally we only have ErrorPlaywright, ErrTimeout and ErrTargetClosed. (maybe use more Go like names, but something around these lines)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest commit refactors the error type, bringing breaking changes:

  • ErrPlaywright wraps all Playwright errors
  • ErrTimeout wraps all timeout errors and replaces TimeoutError

pls review it.

BREAKING CHANGE:
- `ErrPlaywright` wraps all Playwright errors
- `ErrTimeout` wraps all timeout errors and replaces `TimeoutError`
Copy link
Member

@mxschmitt mxschmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable!

@canstand canstand merged commit 3319f69 into playwright-community:main Dec 3, 2023
13 checks passed
@canstand canstand deleted the roll-v1.40 branch December 19, 2023 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants