Skip to content

Commit

Permalink
feat: Upgrade to lodash 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Erik Støwer committed Jan 31, 2016
1 parent 0d3bee4 commit a3dfaf0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/file-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Object.defineProperty(List.prototype, 'files', {
})

var uniqFlat = function (list) {
return _.uniq(_.flatten(list), 'path')
return _.uniqBy(_.flatten(list), 'path')
}

return {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
"graceful-fs": "^4.1.2",
"http-proxy": "^1.13.0",
"isbinaryfile": "^3.0.0",
"lodash": "^3.8.0",
"lodash": "^4.0.0",
"log4js": "^0.6.28",
"mime": "^1.3.4",
"minimatch": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions test/unit/file-list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var config = require('../../lib/config')
var patterns = (...strings) => strings.map(str => new config.Pattern(str))

function pathsFrom (files) {
return _.pluck(from(files), 'path')
return _.map(from(files), 'path')
}

function findFile (path, files) {
Expand Down Expand Up @@ -268,7 +268,7 @@ describe('FileList', () => {

it('cancels refreshs', () => {
var checkResult = files => {
expect(_.pluck(files.served, 'path')).to.contain('/some/a.js', '/some/b.js', '/some/c.js')
expect(_.map(files.served, 'path')).to.contain('/some/a.js', '/some/b.js', '/some/c.js')
}

var p1 = list.refresh().then(checkResult)
Expand Down

0 comments on commit a3dfaf0

Please sign in to comment.