Skip to content

Commit f8ee1ff

Browse files
authored
chore!: dropped Node 10 support (#475)
1 parent 961fa2a commit f8ee1ff

File tree

5 files changed

+5
-1426
lines changed

5 files changed

+5
-1426
lines changed

.github/workflows/ci.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
node: [10, 12, 14, 16, 18]
15+
node: [12, 14, 16, 18]
1616
steps:
1717
- uses: actions/checkout@v3
1818
- uses: actions/setup-node@v3
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v3
2828
- uses: actions/setup-node@v3
2929
with:
30-
node-version: 16
30+
node-version: lts/*
3131
cache: npm
3232
- run: npm ci
3333
- run: npm test
@@ -37,7 +37,7 @@ jobs:
3737
- uses: actions/checkout@v3
3838
- uses: actions/setup-node@v3
3939
with:
40-
node-version: 16
40+
node-version: lts/*
4141
cache: npm
4242
- run: npm ci
4343
- run: npm run coverage

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const os = process.platform === 'darwin' ? 'OSXy' /* c8 ignore next */ : 'Window
167167
## Supported Node.js Versions
168168

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

172172
## Contributing to `c8`
173173

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"typescript": "^4.6.2"
5858
},
5959
"engines": {
60-
"node": ">=10.12.0"
60+
"node": ">=12"
6161
},
6262
"files": [
6363
"index.js",

test/integration.js

-8
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,7 @@ require('chai')
1717

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

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

@@ -298,7 +291,6 @@ beforeEach(function () {
298291

299292
describe('ESM Modules', () => {
300293
it('collects coverage for ESM modules', () => {
301-
if (nodeMajorVersion === 10) return
302294
const { output } = spawnSync(nodePath, [
303295
c8Path,
304296
'--exclude="test/*.js"',

0 commit comments

Comments
 (0)