From b52be49cbfb876926d79610fff4d7fc731e0597f Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Sun, 9 Oct 2016 23:04:35 +0200 Subject: [PATCH] =?UTF-8?q?Update=20all=20dependencies=20=F0=9F=8C=B4=20(#?= =?UTF-8?q?369)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(package): update dependencies https://greenkeeper.io/ * Updated some usage * Fix _.template and semver usage --- lib/Version.js | 2 +- lib/versions.js | 2 +- package.json | 16 +++++++++------- test/utils.js | 2 +- test/versions.js | 6 ++++-- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/Version.js b/lib/Version.js index 384098a8a..d3787a2bd 100644 --- a/lib/Version.js +++ b/lib/Version.js @@ -23,7 +23,7 @@ module.exports = function Version(args){ var platformUrls = {}; supportedPlatforms.forEach(function (supportedPlatform) { flavors.forEach(function(flavor) { - platformUrls[supportedPlatform + '-' + flavor] = args.downloadUrl + _.template(platforms[supportedPlatform].versionNameTemplate, result); + platformUrls[supportedPlatform + '-' + flavor] = args.downloadUrl + _.template(platforms[supportedPlatform].versionNameTemplate)(result); }); }); return platformUrls; diff --git a/lib/versions.js b/lib/versions.js index 1f43b1701..9ebdd714f 100644 --- a/lib/versions.js +++ b/lib/versions.js @@ -39,7 +39,7 @@ function getLegacyVersions(downloadUrl, flavor){ // scrapes valid semver versions from apache directory listing while ((searchRes = scrapePtrn.exec(body)) !== null) { searchRes = searchRes[1]; - if( semver.valid(searchRes) && !_.contains(versions, searchRes) ) { + if( semver.valid(searchRes) && !_.includes(versions, searchRes) ) { versions.push(searchRes); } } diff --git a/package.json b/package.json index 2032d621c..0ee392c13 100644 --- a/package.json +++ b/package.json @@ -37,33 +37,35 @@ "application" ], "devDependencies": { + "eol": "~0.3.0", "nock": "^8.0.0", "tape": "~4.6.2", "redtape": "~1.0.0", - "eol": "~0.2.0" + "tap-spec": "^4.1.1" }, "dependencies": { "archiver": "^1.0.0", "bluebird": "^3.4.0", "decompress-zip": "0.3.0", - "deprecate": "~0.1.0", + "deprecate": "~1.0.0", "graceful-fs-extra": "^2.0.0", "graceful-ncp": "^3.0.0", "inherits": "~2.0.1", - "lodash": "~2.4.1", + "lodash": "~4.16.2", "optimist": "^0.6.1", "platform-overrides": "~1.0.1", - "plist": "^1.0.0", + "plist": "^2.0.1", "progress": "~1.1.7", - "rcedit": "^0.5.0", + "rcedit": "^0.7.0", "recursive-readdir-sync": "^1.0.6", - "request": "^2.74.0", + "request": "~2.75.0", "rimraf": "^2.5.2", "semver": "^2.3.2", "simple-glob": "~0.1.0", "tar-fs": "^1.13.0", "temp": "~0.7.0", - "update-notifier": "^0.7.0", + "update-notifier": "^1.0.2", "winresourcer": "^0.9.0" } } + diff --git a/test/utils.js b/test/utils.js index 8e0ff03ea..84519b8f7 100644 --- a/test/utils.js +++ b/test/utils.js @@ -147,7 +147,7 @@ test('should zip the app and create the app.nw file + log it', function (t) { }, { "src" : path.normalize("test/fixtures/nwapp/package.json"), "dest": path.normalize("package.json") - }], expected = _.pluck(files, 'dest').sort(); + }], expected = _.map(files, 'dest').sort(); var _evt = new EventEmitter(); _evt.on('log', function (logging) { diff --git a/test/versions.js b/test/versions.js index 6bec167fb..a46f7deeb 100644 --- a/test/versions.js +++ b/test/versions.js @@ -293,8 +293,7 @@ test('getVersion (legacy)', function (t) { versions.getVersion({ desiredVersion: '0.10.2', downloadUrl:'http://dl.nwjs.io/', - flavor:'sdk' - + flavor:'sdk' }).then(function(result){ t.equal(result.version, '0.10.2'); t.equal(result.name, 'node-webkit'); @@ -306,6 +305,9 @@ test('getVersion (legacy)', function (t) { 'win32-sdk': 'http://dl.nwjs.io/v0.10.2/node-webkit-v0.10.2-win-ia32.zip', 'win64-sdk': 'http://dl.nwjs.io/v0.10.2/node-webkit-v0.10.2-win-x64.zip' }); + }) + .catch(function(err){ + t.end(err); }); });