Skip to content

Commit

Permalink
feat: drop Node 6 support (#169)
Browse files Browse the repository at this point in the history
Node 6.x became maintenance LTS since 2018-04-30.
Stopping old Node support leads to less maintenance cost.
For details, see <https://github.com/nodejs/Release>.

BREAKING CHANGE:

Stop supporting Node 6.x which is maintenance LTS.
  • Loading branch information
ybiquitous authored May 16, 2018
1 parent 8814ab0 commit 4d5364e
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 314 deletions.
5 changes: 1 addition & 4 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
module.exports = {
presets: [['@babel/preset-env', { targets: { node: '6' } }]],

plugins: ['@babel/plugin-proposal-object-rest-spread'],

env: {
test: {
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
plugins: ['istanbul'],
},
},
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,3 @@ typings/

# dotenv environment variables file
.env

# @std/esm
.esm-cache

# build directory
/lib/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node
8
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: node_js
node_js:
- 10
- 8
- 6

cache:
yarn: true
Expand All @@ -12,9 +11,7 @@ cache:

script:
- commitlint-travis
- npm run build
- npm test
- npm run test:coverage

deploy:
provider: npm
Expand All @@ -23,7 +20,7 @@ deploy:
skip_cleanup: true
on:
tags: true
node: 6
node: 8

notifications:
email: false
4 changes: 2 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
const dir = require('../src/select-dir')
const cli = require(`../lib/cli`)

require(`../${dir}/cli`)() // eslint-disable-line import/no-dynamic-require
cli()
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
const dir = require('./src/select-dir')

// eslint-disable-next-line import/no-dynamic-require
const init = require(`./${dir}/init`)
const init = require(`./lib/init`)

module.exports = { init }
File renamed without changes.
File renamed without changes.
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
"files": [
"bin",
"lib",
"src",
"templates",
".editorconfig"
],
"engines": {
"node": ">=6"
"node": ">=8"
},
"dependencies": {
"@commitlint/cli": "^6.0.2",
Expand All @@ -37,12 +36,10 @@
"markdownlint-cli": "^0.8.0",
"npm-run-all": "^4.1.2",
"prettier": "^1.10.2",
"semver": "^5.5.0",
"standard-version": "^4.3.0",
"yargs": "^11.0.0"
},
"devDependencies": {
"@babel/cli": "7.0.0-beta.47",
"@babel/core": "7.0.0-beta.47",
"@babel/preset-env": "7.0.0-beta.47",
"@babel/register": "7.0.0-beta.47",
Expand All @@ -51,10 +48,9 @@
"nyc": "11.8.0"
},
"scripts": {
"build": "babel src/ -d lib/",
"test": "nyc --check-coverage mocha",
"test:watch": "mocha --watch",
"test:coverage": "nyc report --reporter=text-lcov > coverage.lcov",
"test": "NODE_ENV=test nyc --check-coverage mocha",
"test:watch": "NODE_ENV=test mocha --watch",
"test:coverage": "NODE_ENV=test nyc report --reporter=text-lcov > coverage.lcov",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "markdownlint --ignore node_modules --ignore CHANGELOG.md \"**/*.md\"",
Expand All @@ -81,6 +77,8 @@
]
},
"browserslist": [
"> 5%"
"> 1%",
"not ie 11",
"not op_mini all"
]
}
3 changes: 0 additions & 3 deletions src/select-dir.js

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/package-empty_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"test": "test",
"test:watch": "test --watch",
"test:coverage": "echo \"unsupported.\" && exit 1",
"build": "babel src/ -d lib/",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "markdownlint --ignore node_modules --ignore CHANGELOG.md \"**/*.md\"",
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/package-normal_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .",
"test:watch": "abc --watch",
"test:coverage": "echo \"unsupported.\" && exit 1",
"build": "babel src/ -d lib/",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "markdownlint --ignore node_modules --ignore CHANGELOG.md \"**/*.md\"",
"lint": "npm-run-all --print-name --print-label --parallel lint:*",
Expand Down
Loading

0 comments on commit 4d5364e

Please sign in to comment.