Skip to content

Commit

Permalink
feat(e2e): support puppeteer v14
Browse files Browse the repository at this point in the history
this commit increments the supported version of puppeteer from v10 to
v14.

v11, v12, v13 all did not require any changes to the stencil codebase.
as a result, this commit jumps directly from v10 to v14.

the package is now declared in `package.json` using a caret ("^")
instead of a tilde ("~"). the author (rwaskiewicz) was being cautious
when making the change to support v10 of stencil in
#2934, to a degree that is no
longer necessary

v14 of puppeteer introduced private fields in their source code. this
affected stencil's validation scripts for type declaration files, as
the default settings would create a TypeScript `program` that could not
be properly compiled/validated.

the `moduleResolution` and `target` fields needed to be explictly
set to allow the transpiled `.d.ts` to pass validation. this is a result
of cascading defaults where for the `createProgram` call:
- the `target` field defaults to "ES3"
- the `target` default causes the `module` field to default to
  "CommonJS"
- the `module` default causes `moduleResolution` to default to
  "classic", which can't resolve the new type declaration file. as a
  result, we explicitly set this field
- the `target` field is set to support the private identifiers in
  puppeteer
  • Loading branch information
rwaskiewicz committed Nov 9, 2022
1 parent 4537acd commit bfe3304
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 269 deletions.

0 comments on commit bfe3304

Please sign in to comment.