chore: update references to branch names (#6022)
This commit is contained in:
parent
2ffe710177
commit
f1ec6a3df0
@ -64,7 +64,7 @@ information on using pull requests.
|
||||
|
||||
## Code Style
|
||||
|
||||
- Coding style is fully defined in [`.eslintrc`](https://github.com/puppeteer/puppeteer/blob/master/.eslintrc.js) and we automatically format our code with [Prettier](https://prettier.io).
|
||||
- Coding style is fully defined in [`.eslintrc`](https://github.com/puppeteer/puppeteer/blob/main/.eslintrc.js) and we automatically format our code with [Prettier](https://prettier.io).
|
||||
- It's recommended to set-up Prettier into your editor, or you can run `npm run eslint-fix` to automatically format any files.
|
||||
- If you're working in a JS file, code should be annotated with [closure annotations](https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler).
|
||||
- If you're working in a TS file, you should explicitly type all variables and return types. You'll get ESLint warnings if you don't so if you're not sure use them as guidelines, and feel free to ask us for help!
|
||||
@ -136,7 +136,7 @@ To deliver to a different location, use "deliver" option:
|
||||
|
||||
## Writing Documentation
|
||||
|
||||
All public API should have a descriptive entry in [`docs/api.md`](https://github.com/puppeteer/puppeteer/blob/master/docs/api.md). There's a [documentation linter](https://github.com/puppeteer/puppeteer/tree/master/utils/doclint) which makes sure documentation is aligned with the codebase.
|
||||
All public API should have a descriptive entry in [`docs/api.md`](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md). There's a [documentation linter](https://github.com/puppeteer/puppeteer/tree/main/utils/doclint) which makes sure documentation is aligned with the codebase.
|
||||
|
||||
To run the documentation linter, use:
|
||||
|
||||
@ -160,7 +160,7 @@ A barrier for introducing new installation dependencies is especially high:
|
||||
- Tests should not depend on external services.
|
||||
- Tests should work on all three platforms: Mac, Linux and Win. This is especially important for screenshot tests.
|
||||
|
||||
Puppeteer tests are located in the test directory ([`test`](https://github.com/puppeteer/puppeteer/blob/master/test/) and are written using Mocha. See [`test/README.md`](https://github.com/puppeteer/puppeteer/blob/master/test/) for more details.
|
||||
Puppeteer tests are located in the test directory ([`test`](https://github.com/puppeteer/puppeteer/blob/main/test/) and are written using Mocha. See [`test/README.md`](https://github.com/puppeteer/puppeteer/blob/main/test/) for more details.
|
||||
|
||||
Despite being named 'unit', these are integration tests, making sure public API methods and events work as expected.
|
||||
|
||||
@ -233,7 +233,7 @@ Releasing to npm consists of the following phases:
|
||||
1. Source Code: mark a release.
|
||||
1. Bump `package.json` version following the SEMVER rules.
|
||||
2. Run `npm run doc` to update the docs accordingly.
|
||||
3. Update the “Releases per Chromium Version” list in [`docs/api.md`](https://github.com/puppeteer/puppeteer/blob/master/docs/api.md) to include the new version. Note: only do this when the Chrome revision is different from the previous release.
|
||||
3. Update the “Releases per Chromium Version” list in [`docs/api.md`](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md) to include the new version. Note: only do this when the Chrome revision is different from the previous release.
|
||||
4. Send a PR titled `'chore: mark version vXXX.YYY.ZZZ'` ([example](https://github.com/puppeteer/puppeteer/pull/5078)).
|
||||
5. Make sure the PR passes **all checks**.
|
||||
- **WHY**: there are linters in place that help to avoid unnecessary errors, e.g. [like this](https://github.com/puppeteer/puppeteer/pull/2446)
|
||||
|
18
README.md
18
README.md
@ -1,12 +1,12 @@
|
||||
# Puppeteer
|
||||
|
||||
<!-- [START badges] -->
|
||||
[![Build status](https://img.shields.io/travis/com/puppeteer/puppeteer/master.svg)](https://travis-ci.com/puppeteer/puppeteer) [![npm puppeteer package](https://img.shields.io/npm/v/puppeteer.svg)](https://npmjs.org/package/puppeteer) [![Issue resolution status](https://isitmaintained.com/badge/resolution/puppeteer/puppeteer.svg)](https://github.com/puppeteer/puppeteer/issues)
|
||||
[![Build status](https://img.shields.io/travis/com/puppeteer/puppeteer/main.svg)](https://travis-ci.com/puppeteer/puppeteer) [![npm puppeteer package](https://img.shields.io/npm/v/puppeteer.svg)](https://npmjs.org/package/puppeteer) [![Issue resolution status](https://isitmaintained.com/badge/resolution/puppeteer/puppeteer.svg)](https://github.com/puppeteer/puppeteer/issues)
|
||||
<!-- [END badges] -->
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png" height="200" align="right">
|
||||
|
||||
###### [API](https://github.com/puppeteer/puppeteer/blob/v4.0.0/docs/api.md) | [FAQ](#faq) | [Contributing](https://github.com/puppeteer/puppeteer/blob/master/CONTRIBUTING.md) | [Troubleshooting](https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md)
|
||||
###### [API](https://github.com/puppeteer/puppeteer/blob/v4.0.0/docs/api.md) | [FAQ](#faq) | [Contributing](https://github.com/puppeteer/puppeteer/blob/main/CONTRIBUTING.md) | [Troubleshooting](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md)
|
||||
|
||||
> Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). Puppeteer runs [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) by default, but can be configured to run full (non-headless) Chrome or Chromium.
|
||||
|
||||
@ -53,7 +53,7 @@ npm i puppeteer-core
|
||||
`puppeteer-core` is intended to be a lightweight version of Puppeteer for launching an existing browser installation or for connecting to a remote one. Be sure that the version of puppeteer-core you install is compatible with the
|
||||
browser you intend to connect to.
|
||||
|
||||
See [puppeteer vs puppeteer-core](https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#puppeteer-vs-puppeteer-core).
|
||||
See [puppeteer vs puppeteer-core](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#puppeteer-vs-puppeteer-core).
|
||||
|
||||
### Usage
|
||||
|
||||
@ -186,7 +186,7 @@ Puppeteer creates its own browser user profile which it **cleans up on every run
|
||||
## Resources
|
||||
|
||||
- [API Documentation](https://github.com/puppeteer/puppeteer/blob/v4.0.0/docs/api.md)
|
||||
- [Examples](https://github.com/puppeteer/puppeteer/tree/master/examples/)
|
||||
- [Examples](https://github.com/puppeteer/puppeteer/tree/main/examples/)
|
||||
- [Community list of Puppeteer resources](https://github.com/transitive-bullshit/awesome-puppeteer)
|
||||
|
||||
|
||||
@ -297,7 +297,7 @@ Puppeteer creates its own browser user profile which it **cleans up on every run
|
||||
|
||||
## Contributing to Puppeteer
|
||||
|
||||
Check out [contributing guide](https://github.com/puppeteer/puppeteer/blob/master/CONTRIBUTING.md) to get an overview of Puppeteer development.
|
||||
Check out [contributing guide](https://github.com/puppeteer/puppeteer/blob/main/CONTRIBUTING.md) to get an overview of Puppeteer development.
|
||||
|
||||
<!-- [START faq] -->
|
||||
|
||||
@ -306,7 +306,7 @@ Check out [contributing guide](https://github.com/puppeteer/puppeteer/blob/maste
|
||||
#### Q: Who maintains Puppeteer?
|
||||
|
||||
The Chrome DevTools team maintains the library, but we'd love your help and expertise on the project!
|
||||
See [Contributing](https://github.com/puppeteer/puppeteer/blob/master/CONTRIBUTING.md).
|
||||
See [Contributing](https://github.com/puppeteer/puppeteer/blob/main/CONTRIBUTING.md).
|
||||
|
||||
#### Q: What is the status of cross-browser support?
|
||||
|
||||
@ -364,12 +364,12 @@ npm install puppeteer-core@chrome-71
|
||||
|
||||
#### Q: Which Chromium version does Puppeteer use?
|
||||
|
||||
Look for `chromium_revision` in [package.json](https://github.com/puppeteer/puppeteer/blob/master/package.json). To find the corresponding Chromium commit and version number, search for the revision prefixed by an `r` in [OmahaProxy](https://omahaproxy.appspot.com/)'s "Find Releases" section.
|
||||
Look for `chromium_revision` in [package.json](https://github.com/puppeteer/puppeteer/blob/main/package.json). To find the corresponding Chromium commit and version number, search for the revision prefixed by an `r` in [OmahaProxy](https://omahaproxy.appspot.com/)'s "Find Releases" section.
|
||||
|
||||
|
||||
#### Q: Which Firefox version does Puppeteer use?
|
||||
|
||||
Since Firefox support is experimental, Puppeteer downloads the latest [Firefox Nightly](https://wiki.mozilla.org/Nightly) when the `PUPPETEER_PRODUCT` environment variable is set to `firefox`. That's also why the value of `firefox_revision` in [package.json](https://github.com/puppeteer/puppeteer/blob/master/package.json) is `latest` -- Puppeteer isn't tied to a particular Firefox version.
|
||||
Since Firefox support is experimental, Puppeteer downloads the latest [Firefox Nightly](https://wiki.mozilla.org/Nightly) when the `PUPPETEER_PRODUCT` environment variable is set to `firefox`. That's also why the value of `firefox_revision` in [package.json](https://github.com/puppeteer/puppeteer/blob/main/package.json) is `latest` -- Puppeteer isn't tied to a particular Firefox version.
|
||||
|
||||
To fetch Firefox Nightly as part of Puppeteer installation:
|
||||
|
||||
@ -412,7 +412,7 @@ You may find that Puppeteer does not behave as expected when controlling pages t
|
||||
* Since Puppeteer (in all configurations) controls a desktop version of Chromium/Chrome, features that are only supported by the mobile version of Chrome are not supported. This means that Puppeteer [does not support HTTP Live Streaming (HLS)](https://caniuse.com/#feat=http-live-streaming).
|
||||
|
||||
#### Q: I am having trouble installing / running Puppeteer in my test environment. Where should I look for help?
|
||||
We have a [troubleshooting](https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md) guide for various operating systems that lists the required dependencies.
|
||||
We have a [troubleshooting](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md) guide for various operating systems that lists the required dependencies.
|
||||
|
||||
#### Q: How do I try/test a prerelease version of Puppeteer?
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
- Interactive Documentation: https://pptr.dev
|
||||
- API Translations: [中文|Chinese](https://zhaoqize.github.io/puppeteer-api-zh_CN/#/)
|
||||
- Troubleshooting: [troubleshooting.md](https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md)
|
||||
- Troubleshooting: [troubleshooting.md](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md)
|
||||
- Releases per Chromium Version:
|
||||
* Chromium 83.0.4103.0 - [Puppeteer v3.1.0](https://github.com/puppeteer/puppeteer/blob/v3.1.0/docs/api.md)
|
||||
* Chromium 81.0.4044.0 - [Puppeteer v3.0.0](https://github.com/puppeteer/puppeteer/blob/v3.0.0/docs/api.md)
|
||||
@ -498,7 +498,7 @@ The default flags that Chromium will be launched with.
|
||||
- returns: <[Object]>
|
||||
|
||||
Returns a list of devices to be used with [`page.emulate(options)`](#pageemulateoptions). Actual list of
|
||||
devices can be found in [src/DeviceDescriptors.js](https://github.com/puppeteer/puppeteer/blob/master/src/DeviceDescriptors.ts).
|
||||
devices can be found in [src/DeviceDescriptors.js](https://github.com/puppeteer/puppeteer/blob/main/src/DeviceDescriptors.ts).
|
||||
|
||||
```js
|
||||
const puppeteer = require('puppeteer');
|
||||
@ -1334,7 +1334,7 @@ const iPhone = puppeteer.devices['iPhone 6'];
|
||||
})();
|
||||
```
|
||||
|
||||
List of all available devices is available in the source code: [src/DeviceDescriptors.ts](https://github.com/puppeteer/puppeteer/blob/master/src/DeviceDescriptors.ts).
|
||||
List of all available devices is available in the source code: [src/DeviceDescriptors.ts](https://github.com/puppeteer/puppeteer/blob/main/src/DeviceDescriptors.ts).
|
||||
|
||||
#### page.emulateMedia(type)
|
||||
- `type` <?[string]> Changes the CSS media type of the page. The only allowed values are `'screen'`, `'print'` and `null`. Passing `null` disables CSS media emulation.
|
||||
|
@ -184,7 +184,7 @@ export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox
|
||||
|
||||
## Running Puppeteer on Travis CI
|
||||
|
||||
> 👋 We run our tests for Puppeteer on Travis CI - see our [`.travis.yml`](https://github.com/puppeteer/puppeteer/blob/master/.travis.yml) for reference.
|
||||
> 👋 We run our tests for Puppeteer on Travis CI - see our [`.travis.yml`](https://github.com/puppeteer/puppeteer/blob/main/.travis.yml) for reference.
|
||||
|
||||
Tips-n-tricks:
|
||||
- [xvfb](https://en.wikipedia.org/wiki/Xvfb) service should be launched in order to run Chromium in non-headless mode
|
||||
@ -237,7 +237,7 @@ Running Puppeteer smoothly on CircleCI requires the following steps:
|
||||
|
||||
## Running Puppeteer in Docker
|
||||
|
||||
> 👋 We use [Cirrus Ci](https://cirrus-ci.org/) to run our tests for Puppeteer in a Docker container - see our [`Dockerfile.linux`](https://github.com/puppeteer/puppeteer/blob/master/.ci/node10/Dockerfile.linux) for reference.
|
||||
> 👋 We use [Cirrus Ci](https://cirrus-ci.org/) to run our tests for Puppeteer in a Docker container - see our [`Dockerfile.linux`](https://github.com/puppeteer/puppeteer/blob/main/.ci/node10/Dockerfile.linux) for reference.
|
||||
|
||||
Getting headless Chrome up and running in Docker can be tricky.
|
||||
The bundled Chromium that Puppeteer installs is missing the necessary
|
||||
|
@ -4,7 +4,7 @@
|
||||
"description": "Puppeteer API for Firefox",
|
||||
"main": "index.js",
|
||||
"repository": "github:puppeteer/puppeteer",
|
||||
"homepage": "https://github.com/puppeteer/puppeteer/tree/master/experimental/puppeteer-firefox",
|
||||
"homepage": "https://github.com/puppeteer/puppeteer/tree/main/experimental/puppeteer-firefox",
|
||||
"engines": {
|
||||
"node": ">=10.18.1"
|
||||
},
|
||||
|
@ -221,7 +221,7 @@ function waitForWSEndpoint(
|
||||
(error ? ' ' + error.message : ''),
|
||||
stderr,
|
||||
'',
|
||||
'TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md',
|
||||
'TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md',
|
||||
'',
|
||||
].join('\n')
|
||||
)
|
||||
|
@ -2,11 +2,11 @@ const path = require('path');
|
||||
const fs = require('fs');
|
||||
const execSync = require('child_process').execSync;
|
||||
|
||||
// Compare current HEAD to upstream master SHA.
|
||||
// Compare current HEAD to upstream main SHA.
|
||||
// If they are not equal - refuse to publish since
|
||||
// we're not tip-of-tree.
|
||||
const upstream_sha = execSync(
|
||||
`git ls-remote https://github.com/puppeteer/puppeteer --tags master | cut -f1`
|
||||
`git ls-remote https://github.com/puppeteer/puppeteer --tags main | cut -f1`
|
||||
).toString('utf8');
|
||||
const current_sha = execSync(`git rev-parse HEAD`).toString('utf8');
|
||||
if (upstream_sha.trim() !== current_sha.trim()) {
|
||||
|
@ -50,17 +50,17 @@ describe('doclint preprocessor specs', function () {
|
||||
[API](https://github.com/puppeteer/puppeteer/blob/v1.3.0/docs/api.md#class-page)
|
||||
`);
|
||||
});
|
||||
it('should keep master links intact', function () {
|
||||
it('should keep main branch links intact', function () {
|
||||
const source = new Source(
|
||||
'doc.md',
|
||||
`
|
||||
[API](https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#class-page)
|
||||
[API](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#class-page)
|
||||
`
|
||||
);
|
||||
const messages = ensureReleasedAPILinks([source], '1.3.0');
|
||||
expect(messages.length).toBe(0);
|
||||
expect(source.text()).toBe(`
|
||||
[API](https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#class-page)
|
||||
[API](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#class-page)
|
||||
`);
|
||||
});
|
||||
});
|
||||
|
@ -8,7 +8,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/puppeteer/puppeteer/tree/master/utils/testserver"
|
||||
"url": "https://github.com/puppeteer/puppeteer/tree/main/utils/testserver"
|
||||
},
|
||||
"author": "The Chromium Authors",
|
||||
"license": "Apache-2.0"
|
||||
|
Loading…
Reference in New Issue
Block a user