Skip to content

Commit 5fa2692

Browse files
committed
build: drop support for Node 10
BREAKING CHANGE: drop support for Node 10
1 parent a6aea0f commit 5fa2692

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

.babelrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@babel/preset-env",
55
{
66
"targets": {
7-
"node": "10"
7+
"node": "12"
88
}
99
}
1010
]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.0-semantically-released",
44
"description": "CLI toolbox for common scripts for JavaScript + TypeScript projects",
55
"engines": {
6-
"node": ">=10.18",
6+
"node": ">=12",
77
"npm": ">=6",
88
"yarn": ">=1"
99
},

src/index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
let shouldThrow = false
33

44
try {
5-
const [major, minor] = process.version
6-
.slice(1)
7-
.split('.')
8-
.map(Number)
5+
const [major] = process.version.slice(1).split('.').map(Number)
96
shouldThrow =
107
require(`${process.cwd()}/package.json`).name === '@hover/javascript' &&
11-
(major < 10 || (major === 10 && minor < 18))
8+
major < 12
129
} catch (error) {
1310
// ignore
1411
}
1512

1613
if (shouldThrow) {
1714
throw new Error(
18-
'You must use Node version 10.18 or greater to run the scripts within @hover/javascript, because we dogfood the untranspiled version of the scripts.',
15+
'You must use Node version 12 or greater to run the scripts within @hover/javascript, because we dogfood the untranspiled version of the scripts.',
1916
)
2017
}
2118

0 commit comments

Comments
 (0)