Skip to content

Commit 005592a

Browse files
committed
chore: drop support for Node.js 4
BREAKING CHANGE Drop Node.js 4 support
1 parent 3154cdb commit 005592a

File tree

8 files changed

+41
-9
lines changed

8 files changed

+41
-9
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: node_js
22
node_js:
3+
- '10'
34
- '8'
45
- '6'
5-
- '4'
66
install:
77
- npm install -g npx
88
- npx yarn install

@commitlint/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@
8484
"get-stdin": "5.0.1",
8585
"lodash.merge": "4.6.1",
8686
"lodash.pick": "4.4.0",
87-
"meow": "4.0.0"
87+
"meow": "^5.0.0"
8888
}
8989
}

@commitlint/resolve-extends/src/index.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,13 @@ function resolveConfig(raw, context = {}) {
8989

9090
function resolveId(id, context = {}) {
9191
const cwd = context.cwd || process.cwd();
92-
const localPath = resolveFrom.silent(cwd, id);
92+
const localPath = resolveFromSilent(cwd, id);
9393

9494
if (typeof localPath === 'string') {
9595
return localPath;
9696
}
9797

98-
const resolveGlobal = requireUncached('resolve-global');
99-
const globalPath = resolveGlobal.silent(id);
98+
const globalPath = resolveGlobalSilent(id);
10099

101100
if (typeof globalPath === 'string') {
102101
return globalPath;
@@ -106,3 +105,16 @@ function resolveId(id, context = {}) {
106105
err.code = 'MODULE_NOT_FOUND';
107106
throw err;
108107
}
108+
109+
function resolveFromSilent(cwd, id) {
110+
try {
111+
return resolveFrom(cwd, id);
112+
} catch (err) {}
113+
}
114+
115+
function resolveGlobalSilent(id) {
116+
try {
117+
const resolveGlobal = requireUncached('resolve-global');
118+
return resolveGlobal(id);
119+
} catch (err) {}
120+
}

@packages/babel-preset-commitlint/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function preset() {
2828
{
2929
debug: process.env.DEBUG === 'true',
3030
exclude: ['transform-regenerator', 'transform-async-to-generator'],
31-
targets: {node: '4.8'}
31+
targets: {node: '6'}
3232
}
3333
]
3434
]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ is room and need for improvement. The items on the roadmap should enhance `commi
124124

125125
## Version Support
126126

127-
* Node.js [LTS](https://github.com/nodejs/LTS#lts-schedule) `>= 4.8`
127+
* Node.js [LTS](https://github.com/nodejs/LTS#lts-schedule) `>= 6`
128128
* git `>= 2`
129129

130130
## Related projects

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
environment:
22
matrix:
3-
- nodejs_version: '6'
3+
- nodejs_version: '8'
44
install:
55
- ps: Install-Product node $env:nodejs_version
66
- set CI=true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"@packages/*"
6767
],
6868
"engines": {
69-
"node": ">=4"
69+
"node": ">=6"
7070
},
7171
"repository": {
7272
"type": "git",

yarn.lock

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5135,6 +5135,20 @@ [email protected], meow@^4.0.0:
51355135
redent "^2.0.0"
51365136
trim-newlines "^2.0.0"
51375137

5138+
meow@^5.0.0:
5139+
version "5.0.0"
5140+
resolved "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4"
5141+
dependencies:
5142+
camelcase-keys "^4.0.0"
5143+
decamelize-keys "^1.0.0"
5144+
loud-rejection "^1.0.0"
5145+
minimist-options "^3.0.1"
5146+
normalize-package-data "^2.3.4"
5147+
read-pkg-up "^3.0.0"
5148+
redent "^2.0.0"
5149+
trim-newlines "^2.0.0"
5150+
yargs-parser "^10.0.0"
5151+
51385152
51395153
version "1.2.1"
51405154
resolved "https://registry.npmjs.org/merge2/-/merge2-1.2.1.tgz#271d2516ff52d4af7f7b710b8bf3e16e183fef66"
@@ -7983,6 +7997,12 @@ yargonaut@^1.1.2:
79837997
figlet "^1.1.1"
79847998
parent-require "^1.0.0"
79857999

8000+
yargs-parser@^10.0.0:
8001+
version "10.0.0"
8002+
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.0.0.tgz#c737c93de2567657750cb1f2c00be639fd19c994"
8003+
dependencies:
8004+
camelcase "^4.1.0"
8005+
79868006
yargs-parser@^5.0.0:
79878007
version "5.0.0"
79888008
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a"

0 commit comments

Comments
 (0)