Skip to content

Commit

Permalink
chore!: dropped Node 10 support (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
bizob2828 committed Jun 5, 2023
1 parent 961fa2a commit f8ee1ff
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1,426 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18]
node: [12, 14, 16, 18]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
cache: npm
- run: npm ci
- run: npm test
Expand All @@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run coverage
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const os = process.platform === 'darwin' ? 'OSXy' /* c8 ignore next */ : 'Window
## Supported Node.js Versions

c8 uses [native V8 coverage](https://github.com/nodejs/node/pull/22527),
make sure you're running Node.js `>= 10.12.0`.
make sure you're running Node.js `>= 12`.

## Contributing to `c8`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"typescript": "^4.6.2"
},
"engines": {
"node": ">=10.12.0"
"node": ">=12"
},
"files": [
"index.js",
Expand Down
8 changes: 0 additions & 8 deletions test/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ require('chai')

before(cb => rimraf('tmp', cb))

const nodeMajorVersion = Number(process.version.slice(1).split('.')[0])
beforeEach(function () {
// Node 10 is missing some of the patches to V8 that improve coverage in
// newer Node.js versions, for this reason it requires its own snapshot file.
if (nodeMajorVersion === 10) {
const file = this.currentTest.file
this.currentTest.file = `${file}_10`
}
chaiJestSnapshot.configureUsingMochaContext(this)
})

Expand Down Expand Up @@ -298,7 +291,6 @@ beforeEach(function () {

describe('ESM Modules', () => {
it('collects coverage for ESM modules', () => {
if (nodeMajorVersion === 10) return
const { output } = spawnSync(nodePath, [
c8Path,
'--exclude="test/*.js"',
Expand Down
Loading

0 comments on commit f8ee1ff

Please sign in to comment.