Skip to content

Commit

Permalink
fix: remove unneeded lodash.defaultTo dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
JaKXz committed Feb 22, 2017
1 parent 04308f8 commit a760e55
Show file tree
Hide file tree
Showing 3 changed files with 229 additions and 234 deletions.
4 changes: 2 additions & 2 deletions lib/lint-dirty-modules-plugin.js
@@ -1,7 +1,7 @@
'use strict';

var assign = require('object-assign');
var defaultTo = require('lodash.defaultto');
var defaultTo = require('ramda').defaultTo;
var minimatch = require('minimatch');
var runCompilation = require('./run-compilation');

Expand Down Expand Up @@ -67,7 +67,7 @@ LintDirtyModulesPlugin.prototype.getChangedFiles = function getChangedFiles (fil
};

function hasFileChanged (filename, timestamp) {
return defaultTo(this.prevTimestamps[filename], this.startTime) < defaultTo(timestamp, Infinity);
return defaultTo(this.startTime)(this.prevTimestamps[filename]) < defaultTo(Infinity)(timestamp);
}

module.exports = LintDirtyModulesPlugin;
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -36,7 +36,6 @@
"dependencies": {
"arrify": "^1.0.1",
"chalk": "^1.1.3",
"lodash.defaultto": "^4.14.0",
"minimatch": "^3.0.3",
"object-assign": "^4.1.0",
"ramda": "^0.23.0",
Expand Down

0 comments on commit a760e55

Please sign in to comment.