Skip to content

Commit

Permalink
Merge pull request #484 from piwonesien/master
Browse files Browse the repository at this point in the history
Update dependencies, travis and fix test
  • Loading branch information
kessler authored May 28, 2018
2 parents 6837b59 + cf5a7cd commit 0925370
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ language: node_js
node_js:
- "4.0"
- "6.0"
- "7.0"
- "lts/*"
notifications:
webhooks:
urls:
Expand Down
4 changes: 2 additions & 2 deletions lib/Version.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var semver = require('semver');
module.exports = function Version(args){
var generatePlatformUrls,
result = {
isLegacy: semver.satisfies(args.version, '<0.12.3'),
name: semver.satisfies(args.version, '>=0.12.0 || ~0.12.0-alpha') ? 'nwjs' : 'node-webkit',
isLegacy: semver.lt(args.version, '0.12.3'),
name: semver.gte(args.version, '0.12.0') || semver.satisfies(args.version, '~0.12.0-alpha') ? 'nwjs' : 'node-webkit',
version: args.version
};

Expand Down
17 changes: 10 additions & 7 deletions lib/downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ module.exports = {
});

if (extention === '.zip') {
stream = temp.createWriteStream();
rq.on('response', function(res) {
if(res.statusCode !== 200) return;
stream = temp.createWriteStream();

stream.on('finish', function() {
self.extractZip(stream.path, cachepath).then(self.stripRootFolder).then(function(files) {
resolve(files);
});
});
stream.on('finish', function() {
self.extractZip(stream.path, cachepath).then(self.stripRootFolder).then(function(files) {
resolve(files);
});
});

rq.pipe(stream);
rq.pipe(stream);
});
}

else if (extention === '.gz') {
Expand Down
9 changes: 1 addition & 8 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,9 @@ module.exports = {
}
else
{
filesBulk.push({
src: file.src,
data: { name: path.basename(file.dest) },
expand: true,
flatten: true,
dest: path.dirname(file.dest)
});
archive.file(file.src, {name: file.dest});
}
});
archive.bulk(filesBulk);

// Some logs
archive.on('entry', function (file) {
Expand Down
2 changes: 1 addition & 1 deletion lib/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function getVersionsFromManifest(downloadUrl, manifestUrl, flavor){
* @returns {boolean}
*/
function isLegacyVersion(version){
return semver.satisfies(version, '<0.12.3');
return semver.lte(version, '0.12.3');
}

module.exports = {
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
"application"
],
"devDependencies": {
"decompress-zip": "0.3.0",
"decompress-zip": "0.3.1",
"eol": "^0.9.0",
"nock": "^9.0.5",
"redtape": "~1.0.0",
"tap-spec": "^4.1.1",
"tape": "~4.6.2"
"tape": "~4.9.0"
},
"dependencies": {
"archiver": "^1.3.0",
"archiver": "^2.1.1",
"boxen": "^1.1.0",
"chalk": "^1.1.3",
"chalk": "^2.3.2",
"deprecate": "~1.0.0",
"extract-zip": "^1.6.5",
"graceful-fs-extra": "^2.0.0",
Expand All @@ -57,18 +57,18 @@
"lodash": "~4.17.4",
"optimist": "^0.6.1",
"platform-overrides": "~1.0.1",
"plist": "^2.0.1",
"progress": "~1.1.7",
"rcedit": "^0.9.0",
"plist": "^3.0.1",
"progress": "~2.0.0",
"rcedit": "^1.0.0",
"recursive-readdir-sync": "^1.0.6",
"request": "~2.81.0",
"request": "~2.85.0",
"rimraf": "^2.5.2",
"semver": "^2.3.2",
"simple-glob": "~0.1.0",
"semver": "^5.5.0",
"simple-glob": "~0.2.0",
"tar-fs": "^1.13.0",
"temp": "github:adam-lynch/node-temp#remove_tmpdir_dep",
"thenify": "^3.3.0",
"update-notifier": "^1.0.3",
"update-notifier": "^2.4.0",
"winresourcer": "^0.9.0"
}
}
6 changes: 3 additions & 3 deletions test/nwBuilder.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0925370

Please sign in to comment.