Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
Require Node.js 8
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 9, 2019
1 parent 8711e3a commit e6ec7cb
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
yarn.lock
temp
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- '12'
- '10'
- '8'
- '6'
2 changes: 1 addition & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = class extends Generator {
type: 'confirm',
default: false,
when: x => (x.nyc || this.options.coverage) && (this.options.codecov === undefined)
}]).then(props => {
}]).then(props => { // eslint-disable-line promise/prefer-await-to-then
const or = (option, prop) => this.options[option] === undefined ? props[prop || option] : this.options[option];

const cli = or('cli');
Expand Down
10 changes: 5 additions & 5 deletions app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},<% if (cli) { %>
"bin": "cli.js",<% } %>
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && <% if (nyc) { %>nyc <% } %>ava"
Expand All @@ -29,10 +29,10 @@
"meow": "^5.0.0"
<% } %>},
"devDependencies": {
"ava": "^0.25.0",<% if (codecov) { %>
"codecov": "^3.0.0",<% } %><% if (nyc) { %>
"nyc": "^12.0.0",<% } %>
"xo": "^0.21.0"
"ava": "^1.4.1",<% if (codecov) { %>
"codecov": "^3.4.0",<% } %><% if (nyc) { %>
"nyc": "^14.1.0",<% } %>
"xo": "^0.24.0"
}<% if (codecov) { %>,
"nyc": {
"reporter": [
Expand Down
2 changes: 1 addition & 1 deletion app/templates/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Lorem ipsum.

#### options

Type: `Object`
Type: `object`

##### foo

Expand Down
8 changes: 5 additions & 3 deletions app/templates/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import test from 'ava';
import <%= camelModuleName %> from '.';

test('title', t => {
const err = t.throws(() => {
t.throws(() => {
<%= camelModuleName %>(123);
}, TypeError);
t.is(err.message, 'Expected a string, got number');
}, {
instanceOf: TypeError,
message: 'Expected a string, got number'
});

t.is(<%= camelModuleName %>('unicorns'), 'unicorns & rainbows');
});
4 changes: 2 additions & 2 deletions app/templates/travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- '12'
- '10'
- '8'
- '6'<% if (codecov) { %>
- '8'<% if (codecov) { %>
after_script:
- './node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov'<% } %>
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && ava"
Expand All @@ -32,17 +32,17 @@
"sindre"
],
"dependencies": {
"humanize-url": "^1.0.1",
"is-scoped": "^1.0.0",
"normalize-url": "^3.3.0",
"superb": "^3.0.0",
"humanize-url": "^2.1.0",
"is-scoped": "^2.1.0",
"normalize-url": "^4.3.0",
"superb": "^4.0.0",
"underscore.string": "^3.0.3",
"yeoman-generator": "^3.1.1"
"yeoman-generator": "^4.0.0"
},
"devDependencies": {
"ava": "*",
"ava": "^1.4.1",
"pify": "^4.0.1",
"xo": "*",
"xo": "^0.24.0",
"yeoman-assert": "^3.0.0",
"yeoman-test": "^1.0.0"
},
Expand Down

0 comments on commit e6ec7cb

Please sign in to comment.