Commit Graph

269 Commits

Author SHA1 Message Date
Randolf J
6bc45c4ae8 chore: unfreeze version on docs 2022-06-13 23:27:40 +02:00
release-please[bot]
e0c537408e
chore(main): release 14.4.0 (#8512)
* chore(main): release 14.4.0

* chore: freeze version on docs

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-06-13 23:05:56 +02:00
Randolf J
353358a996 chore: unfreeze version on docs 2022-06-07 16:34:36 +02:00
release-please[bot]
4b05a8454e
chore(main): release 14.3.0 (#8471)
* chore(main): release 14.3.0

* chore: freeze version on docs

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-06-07 16:21:47 +02:00
jrandolf
66008c2189
chore: unfreeze version on docs (#8465)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-06-02 16:42:02 +02:00
release-please[bot]
d5cd41686c
chore(main): release 14.2.1 (#8462)
* chore(main): release 14.2.1

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: jrandolf <101637635+jrandolf@users.noreply.github.com>
2022-06-02 15:38:51 +02:00
Randolf J
cf49b18beb chore: build main docs 2022-06-01 22:18:41 +02:00
release-please[bot]
b3b62b35f3
chore(main): release 14.2.0 (#8457)
* chore(main): release 14.2.0

* chore: freeze version on docs

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-06-01 22:11:58 +02:00
jrandolf
d111d19f78
fix: process documentation during publishing (#8433) 2022-05-30 21:50:34 +02:00
Alex Rudenko
0ca60a7ff0
chore(release): mark v14.1.1 (#8374) 2022-05-19 14:54:39 +00:00
Alex Rudenko
1441fb84d8
chore(release): mark v14.1.0 (#8339) 2022-05-13 07:31:25 +00:00
Alex Rudenko
06f7390eab
chore(release): mark v14.0.0 (#8326) 2022-05-09 13:13:07 +00:00
jrandolf
ae97ccab68
chore(release): mark v13.7.0 (#8292) 2022-04-28 10:59:24 +00:00
Ergün Erdoğmuş
29a309915d
chore(release): mark v13.6.0 (#8249)
Co-authored-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2022-04-20 10:07:34 +02:00
Alex Rudenko
ed4afe81a5
docs: typos and minor documentation issues (#8211) 2022-04-08 11:58:55 +02:00
Alex Rudenko
0d9699be37
chore(release): mark v13.5.2 (#8175) 2022-03-31 10:13:58 +02:00
Alex Rudenko
e28462c3db
chore(release): mark v13.5.1 (#8118) 2022-03-09 13:18:06 +00:00
Alex Rudenko
7b38b458c9
chore(release): mark v13.5.0 (#8110) 2022-03-07 13:58:56 +01:00
Alex Rudenko
69d5ef59ee
chore(release): mark v13.4.1 (#8078) 2022-03-01 07:21:07 +00:00
Alex Rudenko
7f47c8133a
chore(release): mark v13.4.0 (#8052) 2022-02-22 13:34:25 +01:00
Alex Rudenko
98dabc50c6
docs: update README w.r.t. the @next version (#8020) 2022-02-15 10:50:09 +01:00
Stano Bo
21c7f46e21
docs: add additional chromium/pptr version mapping info (#8016) 2022-02-14 13:06:18 +00:00
Alex Rudenko
1c2566bae5
chore(release): mark v13.3.2 (#8015) 2022-02-14 11:14:18 +00:00
jrandolf
90505a77be
chore(release): mark v13.3.1 (#7997)
Co-authored-by: Randolf Jung <jrandolf@chromium.org>
2022-02-10 14:59:28 +00:00
jrandolf
6879f9cfe1
chore(release): mark v13.3.0 (#7979)
Co-authored-by: Randolf Jung <jrandolf@chromium.org>
2022-02-09 17:01:45 +00:00
Alex Rudenko
b531f498e9
chore(release): mark v13.2.0 (#7970) 2022-02-07 15:35:33 +01:00
Alex Rudenko
7b76883802
chore(release): mark v13.1.3 (#7946) 2022-01-31 10:15:42 +01:00
Alex Rudenko
0a9eb3c9a5
chore(release): mark v13.1.2 (#7925) 2022-01-25 07:55:07 +00:00
Alex Rudenko
f108560be8
chore(release): mark v13.1.1 (#7912) 2022-01-18 08:55:34 +00:00
Alex Rudenko
80d6b84ded
chore(release): mark v13.1.0 (#7908) 2022-01-17 15:40:56 +01:00
Alex Rudenko
71cef32f6d
chore(release): mark v13.0.1 (#7865) 2021-12-22 09:06:12 +01:00
Alex Rudenko
d0cb9e2573
chore(release): mark v13.0.0 (#7832) 2021-12-10 09:02:39 +00:00
Alex Rudenko
913ff123ec
chore(release): mark v12.0.1 (#7810) 2021-11-29 20:06:56 +00:00
Alex Rudenko
641588a783
chore(release): mark v12.0.0 (#7800) 2021-11-26 08:58:29 +00:00
Jan Scheffler
e2e98376b9
chore(release): mark v11.0.0 (#7737) 2021-11-02 14:36:33 +00:00
Julien Déramond
7207746b4f
docs: fix typo for PUPPETEER_DOWNLOAD_PATH in README (#7715) 2021-10-25 09:31:27 +00:00
David Barton
9a6749f4b4
docs: remove try-puppeteer.appspot,com link (#7660) 2021-10-08 16:21:57 +00:00
David Barton
7cc22c7629
docs: add warning about version of try-puppeteer.appspot.com (#7639)
The URL https://try-puppeteer.appspot.com/ is mentioned around the top of `README.md` even if it is running a very outdated version (v1.4.0). This change adds a warning to inform users about this.
2021-10-07 09:27:56 +00:00
Jan Scheffler
5631d3aebc
chore(release): mark v10.4.0 (#7586) 2021-09-21 17:29:27 +02:00
Mathias Bynens
686030fe0d
chore: remove references to upstream master branches (#7412)
Chromium had its branch renamed to `main`, and for other projects we can just point to the `HEAD`.
2021-09-14 15:02:39 +00:00
Sarah Lewis
47624245e8
chore: fix link to demo 2021-08-10 09:18:53 +00:00
Maksim Sadym
c510df8d8e
chore(release): mark v10.2.0 (#7467) 2021-08-04 14:45:31 +02:00
Jan Scheffler
6b13a17ed9
chore(release): mark v10.1.0 (#7331) 2021-06-29 09:26:24 +02:00
Diego Fernandez
7e74a9d606
docs: add download location to the FAQ (#7339)
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2021-06-21 07:21:05 +02:00
Jan Scheffler
9df7b71e3b
chore(release): mark v10.0.0 (#7299) 2021-05-31 14:34:04 +02:00
Jan Scheffler
d615dd3d2c
chore(release): mark v9.1.1 (#7205) 2021-05-05 10:38:53 +02:00
Jan Scheffler
1d473bc79f
chore(release): mark v9.1.0 (#7201) 2021-05-03 14:08:44 +02:00
Maksim Sadym
5872e7178a
chore(release): mark v9.0.0 (#7111) 2021-04-21 11:18:09 +00:00
Nitin Kumar
56f17fe481
docs(readme): remove inactive slack link (#6986) 2021-03-15 07:48:06 +01:00
Alex Rudenko
0b5969dea9
chore(release): mark v8.0.0 (#6928) 2021-02-26 08:32:27 +00:00
信鑫-King
d66389ba7e
docs(readme): fix page.pdf code example (#6890)
Ref: `PaperFormat` type.
2021-02-18 09:05:43 +01:00
Jack Franklin
a681aac7e3
chore(release): mark v7.1.0 (#6879) 2021-02-12 10:51:43 +00:00
Jack Franklin
db2b4898e1
chore(release): mark v7.0.4 (#6850) 2021-02-09 13:24:44 +01:00
Jack Franklin
27eaf607ce
chore(release): mark v7.0.3 (#6845) 2021-02-09 09:49:44 +01:00
Jack Franklin
ff50c86332
chore(release): mark v7.0.2 (#6842) 2021-02-09 08:17:15 +00:00
Jack Franklin
f1b46ab5fa
fix: much better TypeScript definitions (#6837)
This PR aims to vastly improve our TS types and how we ship them.

Our previous attempt at shipping TypeScript was unfortunately flawed for
many reasons when compared to the @types/puppeteer package:

* It only worked if you needed the default export. If you wanted to
  import a type that Puppeteer uses, you'd have to do `import type X
  from 'puppeteer/lib/...'`. This is not something we want to encourage
  because that means our internal file structure becomes almost public
  API.
* It gave absolutely no help to CommonJS users in JS files because it
  would warn people they needed to do `const pptr =
  require('puppeteer').default, which is not correct.
* I found a bug in the `evaluate` types which mean't you couldn't
  override the types to provide more info, and TS would insist the types
  were all `unknown`.

The goal of this PR is to support:

1. In a `ts` file, `import puppeteer from 'puppeteer'`
1. In a `ts` file, `import type {ElementHandle} from 'puppeteer'`
1. In a `ts` file, referencing a type as `puppeteer.ElementHandle`
1. In a `ts` file, you can get good type inference when running
   `foo.evaluate(x => x.clientHeight)`.
1. In a `js` file using CJS, you can do `const puppeteer =
   require('puppeteer')` and get good type help from VSCode.

To test this I created a new empty repository with two test files in,
one `.ts` file with this in:
https://gist.github.com/jackfranklin/22ba2f390f97c7312cd70025a2096fc8,
and a `js` file with this in:
https://gist.github.com/jackfranklin/06bed136fdb22419cb7a8a9a4d4ef32f.

These files included enough code to check that the types were behaving
as I expected.

The fix for our types was to make use of API Extractor, which we already
use for our docs, to "rollup" all the disparate type files that TS
generates into one large `types.d.ts` which contains all the various
types that we define, such as:

```ts
export declare class ElementHandle {...}

export type EvaluateFn ...
```

If we then update our `package.json` `types` field to point to that file
in `lib/types.d.ts`, this then allows a developer to write:

```
import type {ElementHandle} from 'puppeteer'
```

And get the correct type definitions. However, what the `types.d.ts`
file doesn't do out of the box is declare the default export, so
importing Puppeteer's default export to call a method such as `launch`
on it will get you an error.

That's where the `script/add-default-export-to-types.ts` comes in. It
appends the following to the auto-generated `types.d.ts` file:

```ts
declare const puppeteer: PuppeteerNode;
export = puppeteer;
```

This tells TypeScript what the default export is, and by using the
`export =` syntax, we make sure TS understands both in a TS ESM
environment and in a JS CJS environment.

Now the `build` step, which is run by GitHub Actions when we release,
will generate the `.d.ts` file and then extend it with the default
export code.

To ensure that I was generating a valid package, I created a new
repository locally with the two code samples linked in Gists above. I
then ran:

```
npm init -y
npm install --save-dev typescript
npx tsc --init
```

Which gives me a base to test from. In Puppeteer, I ran `npm pack`,
which packs the module into a tar that's almost identical to what would
be published, so I can be confident that the .d.ts files in there are
what would be published.

I then installed it:

```
npm install --save-dev ../../puppeteer/puppeteer-7.0.1-post.tgz
```

And then reloaded VSCode in my dummy project. By deliberately making
typos and hovering over the code, I could confirm that all the goals
listed above were met, and this seems like a vast improvement on our
types.
2021-02-09 08:00:42 +00:00
Jack Franklin
eb0d604bf3
chore(release): mark v7.0.1 (#6812) 2021-02-04 10:07:37 +00:00
Jan Scheffler
edd8bcc619
chore(release): mark v7.0.0 (#6804) 2021-02-03 16:33:32 +01:00
Jan Scheffler
ef4767080a
chore(release): mark v6.0.0 (#6800) 2021-02-02 12:00:09 +01:00
Mathias Bynens
f7f122dc41
chore: drop Travis CI config (#6799)
Now that we’ve migrated to GitHub Actions and everything seems to work correctly, we can remove Travis CI without losing confidence.

Issue: #6726
2021-02-02 11:03:31 +01:00
Mathias Bynens
0a76cd0bd6 chore: drop README badge 2021-02-02 08:42:37 +01:00
Mathias Bynens
18143b3573
chore(release): mark v5.5.0 (#6604) 2020-11-16 14:38:50 +01:00
Jack Franklin
562c9c2723
chore: mark version 5.4.1 (#6552) 2020-10-27 15:05:43 +00:00
Johan Bay
729cdfe98a
chore: mark version v5.4.0 (#6542) 2020-10-23 16:28:38 +02:00
Maksim Sadym
c7d32cb92f
chore: mark version v5.3.1 (#6439) 2020-09-22 12:49:28 +02:00
Maksim Sadym
030fcaa075
chore: mark version v5.3.0 (#6412) 2020-09-11 10:43:09 +02:00
Johan Bay
4ee4649de6
chore: mark v5.2.1 (#6254) 2020-07-21 14:53:02 +02:00
Jack Franklin
028f144256
chore: mark v5.2.0 (#6238) 2020-07-17 13:44:29 +02:00
Changhao Han
8fa18aef99
chore: mark version v5.1.0 (#6206)
Co-authored-by: Changhao Han <changhaohan@chromium.org>
2020-07-13 10:25:14 +02:00
Jack Franklin
6d06adea10
chore: mark v5.0.0 (#6143) 2020-07-02 14:32:43 +01:00
Jack Franklin
1f5e333f00
chore: Don't store revisions in package.json (#6109)
* chore: Don't store revisions in `package.json`

It's quite messy to have to require the `package.json` file in multiple
places purely to find out what revision of a given browser we want to
use. We can also achieve better type safety by placing it in an actual
source file.

This commit makes that change and also tidies up our reliance on
`package.json` within the source code generally; we now only use it to
find the location of the Puppeteer root such that we know where to
install downloaded browsers to.

To avoid using `package.json` to parse the name of the module, we also
now explicitly have an entry point for the Puppeteer module and the
Puppeter Core module. This will make it easier in the future to ship
less code as part of core (e.g. core never needs to download a browser,
so why ship that code?). Core can also then not have any revisions based
info contained in it.

The test install script has also been updated to ensure that
puppeteer-core can be installed correctly too.

Finally, the `install` script has been moved to TypeScript for nicer
typechecking and safety. The functionality of it has not changed.
2020-06-29 16:13:24 +01:00
Jack Franklin
46fc6ca41a
feat(types): improve typing of .evaluate() (#6096)
* feat(types): improve typing of `.evaluate()`

This is the start of the work to take the types from the
`@types/puppeteer` repository and port them into our repo so we can ship
our built-in types out the box.

This change types the `evaluate` function properly. It takes a generic
type which is the type of the function you're passing, and the arguments
and the return that you get back from the `evaluate` call are typed
correctly.
2020-06-25 13:38:01 +01:00
Mathias Bynens
f1ec6a3df0
chore: update references to branch names (#6022) 2020-06-15 17:34:16 +02:00
Jack Franklin
2ffe710177
chore: mark version 4.0.0 (#6018) 2020-06-15 14:48:37 +01:00
Jack Franklin
e84e579c3c
chore: mark version v3.3.0 (#5959) 2020-06-02 09:53:53 +01:00
Jack Franklin
88b5265be1
chore: mark version v3.2.0 (#5937) 2020-05-29 10:22:13 +01:00
Alex Rudenko
8ba36752e7
chore: mark version v3.1.0 (#5883)
* chore: mark version v3.1.0

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2020-05-18 13:47:03 +02:00
Jack Franklin
c214d20d54
chore: mark version v3.0.4 (#5823) 2020-05-07 11:52:59 +02:00
Jack Franklin
dd5bdf1616
chore: mark version v3.0.3 (#5813) 2020-05-06 15:57:04 +01:00
Anderson Aguiar
209e25c0e1
docs(readme): syntax-highlight nested snippets in debugging section (#5799) 2020-05-05 07:45:21 +02:00
Jack Franklin
646f42e98c
chore: mark version v3.0.2 (#5752) 2020-04-28 10:23:19 +01:00
Jack Franklin
6029fdd618
chore: mark version v3.0.1 (#5709) 2020-04-22 11:10:04 +01:00
Changhao Han
6760b9225e
chore: mark version v3.0.0 (#5642)
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-04-16 10:43:12 +02:00
Mathias Bynens
c5df4902cb
docs(readme): update cross-browser FAQ (#5634) 2020-04-15 16:46:01 +02:00
Mathias Bynens
bbdaf92116
docs(README): remove unused badges 2020-04-08 10:16:45 +02:00
Maja Frydrychowicz
33f1967072
(feat) Add option to fetch Firefox Nightly (#5467)
* (feat) Add option to fetch Firefox Nightly

Add Firefox support to BrowserFetcher and the install script.
By default, the latest Firefox Nightly is downloaded
directly from archive.mozilla.org (dmg, tar.bz2 and zip)

This also required changes that impact `puppeteer.launch()`
and `puppeteer.executablePath()`

Fixes #5151

* Update docs/api.md

Co-Authored-By: Mathias Bynens <mathias@qiwi.be>

* Clean up revision promise

* Improve error handling in revision check

* Remove matchAll

* Use explicit octal mode

* Update .gitignore

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-03-10 21:59:03 +01:00
Changhao Han
807fbbdc20
chore: drop Node.js v8 support (#5365)
* chore: update relevant Node.js versions from 8 to 10

* chore: remove node6 and node8 folders from puppeteer-firefox ci

* fix: loosen definition for proc.stdio

* fix: update typescript version used in npm run test-types
2020-03-10 21:55:32 +01:00
Changhao Han
46386eb866
chore: mark version v2.1.1 (#5388) 2020-02-05 14:36:04 +01:00
Tim van der Lippe
1a1ef83e8d
Add FAQ entry on cross-browser support (#5360)
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-01-29 15:52:20 +01:00
Mathias Bynens
a30cf05e3a chore: mark version v2.1.0 (#5347)
This changes the Chromium revision to r722234 (Chrome 80.0.3987.0),
since that's the most recent version in the Chromium 80 range for
which a download exists for all supported platforms.
2020-01-27 15:48:40 +01:00
Lawrence Chou
c7af7ded66 docs(readme): update link for ndb (#5272) 2020-01-08 12:26:22 +01:00
Mathias Bynens
eddb23b521
chore: update URLs (#5185) 2019-11-26 13:12:25 +01:00
Mathias Bynens
aa246973b9
chore: mark version v2.0.0 (#5078) 2019-10-24 14:46:50 +02:00
Mathias Bynens
11ff374ca3
chore: drop Node.js v6 support (#5045)
Node.js v6 was end-of-life'd in April, 2019, with AWS Lambda prohibiting updaets to the Node.js v6 runtime since June 30, 2019.

This makes it quite safe for us to remove the Node 6 support from the repository.
2019-10-16 17:00:20 +02:00
Mathias Bynens
83c327a0f6
docs(readme): correct Slack link
Fixes #4969.
2019-10-10 14:23:21 +01:00
Mathias Bynens
a5f03ce1c8 chore: mark version v1.20.0 (#4928) 2019-09-12 15:21:21 -07:00
Maximilian Tagher
e17d38c61b docs(readme): explain significance of Chromium revision (#4811) 2019-09-11 10:33:01 +02:00
James George
135bb424ba docs: update README.md (#4857)
add issue resolution badge
2019-09-04 15:07:47 -07:00
Andrey Lushnikov
af0d229044
chore: mark version v1.19.0 (#4744) 2019-07-22 22:02:45 -07:00
Andrey Lushnikov
a2cf81dd78
chore: mark version v1.18.1 (#4628) 2019-06-26 10:40:38 -07:00