Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bcoe/c8
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eaf8456d88d5a407bd79641b7e71b9cb50ad4434
Choose a base ref
...
head repository: bcoe/c8
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 128bee23366cb35106f5e163e99ca2ab33dafba6
Choose a head ref
Loading
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enforce Unix newlines
* text=auto eol=lf
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ the requirements below.
Bug fixes and new features should include tests and possibly benchmarks.
Contributors guide: https://github.com/bcoe/c8/blob/master/CONTRIBUTING.md
Contributors guide: https://github.com/bcoe/c8/blob/main/CONTRIBUTING.md
-->

##### Checklist
32 changes: 18 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -3,37 +3,41 @@ on:
branches:
- main
pull_request:
types: [ assigned, opened, synchronize, reopened, labeled ]
types: [assigned, opened, synchronize, reopened, labeled]
workflow_dispatch:
name: ci
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [10, 12, 14, 16]
node: [14, 16, 18, 20]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: node --version
- run: npm install --engine-strict
cache: npm
- run: npm ci --engine-strict
- run: npm test
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
- run: npm install
node-version: lts/*
cache: npm
- run: npm ci
- run: npm test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
- run: npm install
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run coverage
13 changes: 6 additions & 7 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -6,24 +6,23 @@ name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
if: github.repository == 'bcoe/c8'
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: c8
# The logic below handles the npm publication:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16
registry-url: 'https://external-dot-oss-automation.appspot.com'
if: ${{ steps.release.outputs.release_created }}
- run: npm ci
cache: npm
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
18 changes: 9 additions & 9 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"reporter": [
"html",
"text"
],
"lines": 95,
"branches": "82",
"statements": "95"
}
{
"reporter": [
"html",
"text"
],
"lines": 95,
"branches": "82",
"statements": "95"
}
77 changes: 77 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,83 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [9.0.0](https://github.com/bcoe/c8/compare/v8.0.1...v9.0.0) (2024-01-03)


### ⚠ BREAKING CHANGES

* **build:** minimum Node.js version is now 14.14.0

### Features

* **build:** minimum Node.js version is now 14.14.0 ([2cdc86b](https://github.com/bcoe/c8/commit/2cdc86bd0ac67ecf0f700212dc5f8a830ff9164f))
* **deps:** update foreground-child to promise API ([#512](https://github.com/bcoe/c8/issues/512)) ([b46b640](https://github.com/bcoe/c8/commit/b46b6401274488db5b1027a78090257095ae4f72))
* **deps:** use Node.js built in rm ([2cdc86b](https://github.com/bcoe/c8/commit/2cdc86bd0ac67ecf0f700212dc5f8a830ff9164f))

## [8.0.1](https://github.com/bcoe/c8/compare/v8.0.0...v8.0.1) (2023-07-25)


### Bug Fixes

* **deps:** update istanbul deps ([#485](https://github.com/bcoe/c8/issues/485)) ([3be8bd9](https://github.com/bcoe/c8/commit/3be8bd97c3fb38b575a48871c170dd5e5041b9a8)), closes [#478](https://github.com/bcoe/c8/issues/478)

## [8.0.0](https://github.com/bcoe/c8/compare/v7.14.0...v8.0.0) (2023-06-05)


### ⚠ BREAKING CHANGES

* dropped Node 10 support ([#475](https://github.com/bcoe/c8/issues/475))

### Miscellaneous Chores

* dropped Node 10 support ([#475](https://github.com/bcoe/c8/issues/475)) ([f8ee1ff](https://github.com/bcoe/c8/commit/f8ee1ffeba0f7b9b36e328226b23e9999f6481e7))

## [7.14.0](https://github.com/bcoe/c8/compare/v7.13.0...v7.14.0) (2023-05-26)


### Features

* added a new CLI arg `--merge-async` to asynchronously and incrementally merge process coverage files to avoid OOM due to heap exhaustion ([#469](https://github.com/bcoe/c8/issues/469)) ([45f2f84](https://github.com/bcoe/c8/commit/45f2f84e0fa3a10fde718111f57c5352de01d9d1))

## [7.13.0](https://github.com/bcoe/c8/compare/v7.12.0...v7.13.0) (2023-02-14)


### Features

* add `skipFull` and `excludeNodeModules` to type definitions ([#417](https://github.com/bcoe/c8/issues/417)) ([b93b9c0](https://github.com/bcoe/c8/commit/b93b9c06b2efb4b894406b9aa3cfdf4c8bef419e))
* support passing reporter options ([#423](https://github.com/bcoe/c8/issues/423)) ([bc347a9](https://github.com/bcoe/c8/commit/bc347a91f06a3fea7b7425c4affd66d7f8b9d416))
* **types:** add typings for reporterOptions ([#446](https://github.com/bcoe/c8/issues/446)) ([3646e6e](https://github.com/bcoe/c8/commit/3646e6eb3762574d8f70907d7637e47dd9dfac25))

## [7.12.0](https://github.com/bcoe/c8/compare/v7.11.3...v7.12.0) (2022-07-19)


### Features

* use process.stdout.columns for reporter maxCols ([#409](https://github.com/bcoe/c8/issues/409)) ([7731574](https://github.com/bcoe/c8/commit/77315744b219b90eb6a02efc9d26e5400f99af62))

### [7.11.3](https://github.com/bcoe/c8/compare/v7.11.2...v7.11.3) (2022-05-16)


### Bug Fixes

* `--all` now respects `--extension` flag. ([#357](https://github.com/bcoe/c8/issues/357)) ([a5deb27](https://github.com/bcoe/c8/commit/a5deb278dcdd7293e8e758ca892d0a44c6d9bba4))

### [7.11.2](https://github.com/bcoe/c8/compare/v7.11.1...v7.11.2) (2022-04-20)


### Bug Fixes

* **perf:** cache `this.exclude.shouldInstrument` for improved performance ([#388](https://github.com/bcoe/c8/issues/388)) ([8b36f23](https://github.com/bcoe/c8/commit/8b36f23c253742d3ef1c9d52c8e843fff63cdacd))

### [7.11.1](https://github.com/bcoe/c8/compare/v7.11.0...v7.11.1) (2022-04-20)


### Bug Fixes

* **deps:** update deps to latest ([#384](https://github.com/bcoe/c8/issues/384)) ([78eac8c](https://github.com/bcoe/c8/commit/78eac8c8ddaf034e25e2525db12d40356d9e6162)), closes [#375](https://github.com/bcoe/c8/issues/375)
* **deps:** v8-to-istanbul with fixes for Node 10/18 ([d5f642a](https://github.com/bcoe/c8/commit/d5f642a31b5de2053fd798b5b1327004be565dfa))
* fix package.json `test:snap` script to use cross-env ([#366](https://github.com/bcoe/c8/issues/366)) ([5d2981c](https://github.com/bcoe/c8/commit/5d2981c056a8c666c9fdd6847d07c7be38abf181))

## [7.11.0](https://github.com/bcoe/c8/compare/v7.10.0...v7.11.0) (2021-12-30)


64 changes: 38 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -14,37 +14,49 @@ Pull Requests are the way concrete changes are made to the code, documentation,
### Setting up your local environment

1. Make sure you have installed the latest version of Node.js
1. Fork this project on Github and clone your fork locally:
```
$ git clone git@github.com:username/c8.git
$ cd c8
$ git remote add upstream https://github.com/bcoe/c8.git
$ git fetch upstream
```
1. Create local branches to work within. These should also be created directly off of the master branch:
```
$ git checkout -b my-branch -t upstream/master
```
1. Fork this project on GitHub and clone your fork locally:

```sh
git clone git@github.com:username/c8.git
cd c8
git remote add upstream https://github.com/bcoe/c8.git
git fetch upstream
```

1. Create local branches to work within. These should also be created directly off of the main branch:

```sh
git checkout -b my-branch -t upstream/main
```

1. Make your changes
1. Run tests to make sure all is okay (everything should pass except snapshot):
```
$ npm test
```

```sh
npm test
```

1. Now update the snapshot
```
$ npm run test:snap
```
2. If all is passing, commit your changes.
3. As a best practice, once you have committed your changes, it is a good idea to use git rebase (not git merge) to synchronize your work with the main repository:
```
$ git fetch upstream
$ git rebase upstream/master
```

```sh
npm run test:snap
```

1. If all is passing, commit your changes.
1. As a best practice, once you have committed your changes, it is a good idea to use git rebase (not git merge) to synchronize your work with the main repository:

```sh
git fetch upstream
git rebase upstream/main
```

1. Run tests again to make sure all is okay
1. Push:
```
$ npm test
```

```sh
npm test
```

1. Open the pull request, see details in the template.
1. Make any necessary changes after review.

4 changes: 2 additions & 2 deletions MAINTAINERS_GUIDE.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@
- Label the issues appropriately, see the list of labels and their description [here](https://github.com/bcoe/c8/labels)
- Be welcoming to first-time contributors, identified by the GitHub `first-time contributor` badge.
- At least 1 - 2 _collaborators_ must approve a pull request before the pull request lands.
- PRs with commits that don't follow the [conventional commits standard](https://www.conventionalcommits.org) should be re-written when merging (squash and merge).
- Use Github's _squash and merge_ when landing PRs.
- PRs with commits that don't follow the [conventional commits standard](https://www.conventionalcommits.org/) should be re-written when merging (squash and merge).
- Use GitHub's _squash and merge_ when landing PRs.
- CI must pass before landing PRs.
Loading