Skip to content

Commit

Permalink
Require Node.js 8 and upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 23, 2019
1 parent 81c6b67 commit a928bc7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
@@ -1,2 +1 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,5 +1,5 @@
language: node_js
node_js:
- '12'
- '10'
- '8'
- '6'
1 change: 1 addition & 0 deletions gruntfile.js
@@ -1,4 +1,5 @@
'use strict';

module.exports = grunt => {
require('.')(grunt, {
pattern: ['grunt*'],
Expand Down
8 changes: 4 additions & 4 deletions index.js
Expand Up @@ -19,16 +19,16 @@ module.exports = (grunt, options = {}) => {

pattern.push('!grunt', '!grunt-cli');

const names = scope.reduce((result, prop) => {
const deps = config[prop] || [];
return result.concat(Array.isArray(deps) ? deps : Object.keys(deps));
const names = scope.reduce((result, property) => {
const dependencies = config[property] || [];
return result.concat(Array.isArray(dependencies) ? dependencies : Object.keys(dependencies));
}, []);

for (const packageName of multimatch(names, pattern)) {
if (options.requireResolution === true) {
try {
grunt.loadTasks(resolvePkg(path.join(packageName, 'tasks'), {cwd}));
} catch (err) {
} catch (_) {
grunt.log.error(`npm package \`${packageName}\` not found. Is it installed?`);
}
} else {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Expand Up @@ -10,7 +10,7 @@
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && grunt"
Expand All @@ -30,16 +30,16 @@
"tasks"
],
"dependencies": {
"arrify": "^1.0.0",
"multimatch": "^2.0.0",
"pkg-up": "^2.0.0",
"resolve-pkg": "^1.0.0"
"arrify": "^2.0.1",
"multimatch": "^4.0.0",
"pkg-up": "^3.1.0",
"resolve-pkg": "^2.0.0"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-svgmin": "^5.0.0",
"xo": "*"
"grunt-svgmin": "^6.0.0",
"xo": "^0.24.0"
},
"peerDependencies": {
"grunt": ">=1"
Expand Down

0 comments on commit a928bc7

Please sign in to comment.