Skip to content

Commit

Permalink
fix!(testing): puppeteer v10 support (#2934)
Browse files Browse the repository at this point in the history
- Update puppeteer to v10.0.0
  - Remove @types/puppeteer from root package.json file
- Update programmatic library checks
  - Remove @types/puppeteer
  - Make puppeteer@10 the recommended version
- Replace @types/puppeteer instances of PageCloseOptions
  - This interface was originally defined in v5.4.3 of the DefinitelyTyped type declaration file for Puppeteer https://github.com/DefinitelyTyped/DefinitelyTyped/blob/34edf5fb8fdf54f57ed6584f77f1611767af7f6b/types/puppeteer/index.d.ts#L1423
  - It has since been removed, and replace with an object literal of the
    same shape
https://github.com/puppeteer/puppeteer/blob/main/src/common/Page.ts#L2097
- Replace usages of NavigationOptions for WaitForOptions
  - WaitForOptions is structurally the same as @types/puppeteer's
    [NavigationOptions](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/34edf5fb8fdf54f57ed6584f77f1611767af7f6b/types/puppeteer/index.d.ts#L616)
and is used as a drop in replacement
  - The page#goTo method in Puppeteer's definition in both v5.4.3 and
    v10 allow an optional 'referer' string. Since it was omitted in the
    original implementation, I did not include it in this update
- Replace Response with HTTPResponse
- Update ElementHandle#press to use KeyInput instead of string
- Make typings of executionContext.evaluate explicit
- Migrate EmulateOptions
  - Puppeteer no longer exports a type of name EmulateOptions, in favor of
an object literal.

BREAKING CHANGE: Requires Puppeteer v10.0.0
  • Loading branch information
rwaskiewicz authored Jun 23, 2021
1 parent 22f1dee commit 0c09aaa
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 146 deletions.
7 changes: 7 additions & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,3 +557,10 @@ When running Jest directly, previously most of Jest had to be manually configure
- ]
}
```

# Stencil v3.0.0 [Unreleased]

Stencil v3.0.0 is in development at this time and has not been released. The list below is not final and is subject to
change. Further details on each of these items will be included prior to the release.

- [fix(testing): puppeteer v10 support #2934](https://github.com/ionic-team/stencil/pull/2934)
Loading

0 comments on commit 0c09aaa

Please sign in to comment.