Skip to content

Commit

Permalink
feat: require Node.js 6
Browse files Browse the repository at this point in the history
BREAKING CHANGE: remove support for Node.js < 6
  • Loading branch information
pvdlg committed May 4, 2018
1 parent e1627e6 commit 5127305
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
language: node_js

node_js:
- 9
- 10
- 8
- 6
- 4

branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion lib/format-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = (answers, options, config) => {
};
// Parentheses are only needed when a scope is present
const scope = answers.scope ? answers.scope.trim() : '';
const isAlias = !Object.prototype.hasOwnProperty.call(options.types, answers.type);
const isAlias = !Reflect.apply(Object.prototype.hasOwnProperty, options.types, [answers.type]);
const type = isAlias ? options.aliases[answers.type].type : answers.type;
const emoji = config.emoji ? (isAlias ? options.aliases[answers.type].emoji : options.types[type].emoji) : '';
// Limit head to maxSubjectLength (including the trailing emoji)
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"xo": "^0.21.0"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"files": [
"lib",
Expand Down Expand Up @@ -60,8 +60,6 @@
},
"prettier": {
"printWidth": 120,
"singleQuote": true,
"bracketSpacing": false,
"trailingComma": "es5"
},
"publishConfig": {
Expand Down

0 comments on commit 5127305

Please sign in to comment.