Skip to content

Commit 97ff359

Browse files
mathiasbynensaslushnikov
authored andcommitted
docs(CONTRIBUTING.md): fix some typos (#4917)
As someone who's new to the project, I read the contributing guide and spotted some things that confused me. Hopefully this patch helps to reduces the confusion for others!
1 parent c2651c2 commit 97ff359

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* [Public API Coverage](#public-api-coverage)
1313
* [Debugging Puppeteer](#debugging-puppeteer)
1414
- [For Project Maintainers](#for-project-maintainers)
15-
* [Releasing to NPM](#releasing-to-npm)
16-
* [Updating NPM dist tags](#updating-npm-dist-tags)
15+
* [Releasing to npm](#releasing-to-npm)
16+
* [Updating npm dist tags](#updating-npm-dist-tags)
1717
<!-- gen:stop -->
1818

1919
# How to Contribute
@@ -76,6 +76,7 @@ npm run lint
7676
## API guidelines
7777

7878
When authoring new API methods, consider the following:
79+
7980
- Expose as little information as needed. When in doubt, don’t expose new information.
8081
- Methods are used in favor of getters/setters.
8182
- The only exception is namespaces, e.g. `page.keyboard` and `page.coverage`
@@ -123,9 +124,9 @@ To deliver to a different location, use "deliver" option:
123124

124125
## Writing Documentation
125126

126-
All public API should have a descriptive entry in the [docs/api.md](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md). There's a [documentation linter](https://github.com/GoogleChrome/puppeteer/tree/master/utils/doclint) which makes sure documentation is aligned with the codebase.
127+
All public API should have a descriptive entry in [`docs/api.md`](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md). There's a [documentation linter](https://github.com/GoogleChrome/puppeteer/tree/master/utils/doclint) which makes sure documentation is aligned with the codebase.
127128

128-
To run documentation linter, use:
129+
To run the documentation linter, use:
129130

130131
```bash
131132
npm run doc
@@ -147,7 +148,7 @@ A barrier for introducing new installation dependencies is especially high:
147148
- Tests should be *hermetic*. Tests should not depend on external services.
148149
- Tests should work on all three platforms: Mac, Linux and Win. This is especially important for screenshot tests.
149150

150-
Puppeteer tests are located in [test/test.js](https://github.com/GoogleChrome/puppeteer/blob/master/test/test.js)
151+
Puppeteer tests are located in [`test/test.js`](https://github.com/GoogleChrome/puppeteer/blob/master/test/test.js)
151152
and are written with a [TestRunner](https://github.com/GoogleChrome/puppeteer/tree/master/utils/testrunner) framework.
152153
Despite being named 'unit', these are integration tests, making sure public API methods and events work as expected.
153154

@@ -178,7 +179,7 @@ npm run unit -- --break-on-failure
178179
fit('should work', async function({server, page}) {
179180
const response = await page.goto(server.EMPTY_PAGE);
180181
expect(response.ok).toBe(true);
181-
})
182+
});
182183
```
183184

184185
- To disable a specific test, substitute the `it` with `xit` (mnemonic rule: '*cross it*'):
@@ -189,7 +190,7 @@ npm run unit -- --break-on-failure
189190
xit('should work', async function({server, page}) {
190191
const response = await page.goto(server.EMPTY_PAGE);
191192
expect(response.ok).toBe(true);
192-
})
193+
});
193194
```
194195

195196
- To run tests in non-headless mode:
@@ -218,7 +219,7 @@ node --inspect-brk test/test.js
218219

219220
## Public API Coverage
220221

221-
Every public API method or event should be called at least once in tests. To ensure this, there's a coverage command which tracks calls to public API and reports back if some methods/events were not called.
222+
Every public API method or event should be called at least once in tests. To ensure this, there's a `coverage` command which tracks calls to public API and reports back if some methods/events were not called.
222223

223224
Run coverage:
224225

@@ -232,42 +233,44 @@ See [Debugging Tips](README.md#debugging-tips) in the readme.
232233

233234
# For Project Maintainers
234235

235-
## Releasing to NPM
236+
## Releasing to npm
237+
238+
Releasing to npm consists of the following phases:
236239

237-
Releasing to NPM consists of 3 phases:
238240
1. Source Code: mark a release.
239241
1. Bump `package.json` version following the SEMVER rules and send a PR titled `'chore: mark version vXXX.YYY.ZZZ'` ([example](https://github.com/GoogleChrome/puppeteer/commit/808bf8e5582482a1d849ff22a51e52024810905c)).
240242
2. Make sure the PR passes **all checks**.
241243
- **WHY**: there are linters in place that help to avoid unnecessary errors, e.g. [like this](https://github.com/GoogleChrome/puppeteer/pull/2446)
242244
3. Merge the PR.
243245
4. Once merged, publish release notes using the "create new tag" option.
244-
- **NOTE**: tag names are prefixed with `'v'`, e.g. for version `1.4.0` tag is `v1.4.0`.
245-
2. Publish `puppeteer` to NPM.
246+
- **NOTE**: tag names are prefixed with `'v'`, e.g. for version `1.4.0` the tag is `v1.4.0`.
247+
2. Publish `puppeteer` to npm.
246248
1. On your local machine, pull from [upstream](https://github.com/GoogleChrome/puppeteer) and make sure the last commit is the one just merged.
247249
2. Run `git status` and make sure there are no untracked files.
248-
- **WHY**: this is to avoid bundling unnecessary files to NPM package
250+
- **WHY**: this is to avoid adding unnecessary files to the npm package.
249251
3. Run [`pkgfiles`](https://www.npmjs.com/package/pkgfiles) to make sure you don't publish anything unnecessary.
250-
4. Run `npm publish`. This will publish `puppeteer` package.
251-
3. Publish `puppeteer-core` to NPM.
252-
1. Run `./utils/prepare_puppeteer_core.js`. The script will change the name inside `package.json` to `puppeteer-core`.
253-
2. Run `npm publish`. This will publish `puppeteer-core` package.
252+
4. Run `npm publish`. This publishes the `puppeteer` package.
253+
3. Publish `puppeteer-core` to npm.
254+
1. Run `./utils/prepare_puppeteer_core.js`. The script changes the name inside `package.json` to `puppeteer-core`.
255+
2. Run `npm publish`. This publishes the `puppeteer-core` package.
254256
3. Run `git reset --hard` to reset the changes to `package.json`.
255257
4. Source Code: mark post-release.
256258
1. Bump `package.json` version to `-post` version and send a PR titled `'chore: bump version to vXXX.YYY.ZZZ-post'` ([example](https://github.com/GoogleChrome/puppeteer/commit/d02440d1eac98028e29f4e1cf55413062a259156))
257259
- **NOTE**: make sure to update the "released APIs" section in the top of `docs/api.md`.
258260
- **NOTE**: no other commits should be landed in-between release commit and bump commit.
259261

260-
## Updating NPM dist tags
262+
## Updating npm dist tags
263+
264+
For both `puppeteer` and `puppeteer-core` we maintain the following npm tags:
261265

262-
For both `puppeteer` and `puppeteer-firefox` we maintain the following NPM Tags:
263-
- `chrome-*` tags, e.g. `chrome-75` and so on. These tags match Puppeteer version that corresponds to the `chrome-*` release.
264-
- `chrome-stable` tag. This tag points to the Puppeteer version that works with current Chrome stable.
266+
- `chrome-*` tags, e.g. `chrome-75` and so on. These tags match the Puppeteer version that corresponds to the `chrome-*` release.
267+
- `chrome-stable` tag. This tag points to the Puppeteer version that works with the current Chrome stable release.
265268

266269
These tags are updated on every Puppeteer release.
267270

268271
> **NOTE**: due to Chrome's rolling release, we take [omahaproxy's linux stable version](https://omahaproxy.appspot.com/) as *stable*.
269272
270-
Manging tags 101:
273+
Managing tags 101:
271274

272275
```bash
273276
# list tags

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy