Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wget-improved

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wget-improved - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

1

lib/wget.js

@@ -45,2 +45,3 @@ 'use strict'

proxy: options?options.proxy:undefined,
auth: options.auth?options.auth:undefined,
method: 'GET'

@@ -47,0 +48,0 @@ }, function(res) {

{
"name": "wget-improved",
"version": "1.4.0",
"version": "1.5.0",
"description": "wget in nodejs, forked from wuchengwei/node-wget to add improvements and help maintain the project",
"keywords": ["download", "http", "https", "ftp", "proxy", "wget"],
"keywords": [
"download",
"http",
"https",
"ftp",
"proxy",
"wget"
],
"author": "Michael Barajas <michael.a.barajas@gmail.com>",
"repository":{
"repository": {
"type": "git",

@@ -24,3 +31,10 @@ "url": "git://github.com/bearjaws/node-wget.git"

},
"engines": { "node": ">= 0.6.18" }
"engines": {
"node": ">= 0.6.18"
},
"license": "MIT",
"devDependencies": {
"chai": "^4.0.2",
"mocha": "^3.4.2"
}
}

44

test/test.js

@@ -1,18 +0,30 @@

var wget = require('../lib/wget');
let wget = require('../lib/wget');
let expect = require('chai').expect;
var download = wget.download('https://www.npmjs.com/static/images/npm-logo.svg', '/tmp/README.md');
// with a proxy:
// var download = wget.download('https://raw.github.com/Fyrd/caniuse/master/data.json', '/tmp/README.md', {proxy: 'http://proxyhost:port'});
download.on('error', function(err) {
console.log(err);
});
download.on('start', function(fileSize) {
console.log(fileSize);
});
download.on('end', function(output) {
console.log(output);
process.exit();
});
download.on('progress', function(progress) {
console.log(progress);
describe("Download Tests", function() {
// with a proxy:
it("Should be able to download the NPM logo", function(done) {
let download = wget.download('https://www.npmjs.com/static/images/npm-logo.svg', '/tmp/npm-logo.svg');
// @todo upgrade these tests to use a more consistent environment, with its own http server and files.
download.on('error', function(err) {
console.log(err);
expect(err).to.be.null;
done();
});
download.on('start', function(fileSize) {
expect(fileSize).to.be.a('string');
fileSize = Number(fileSize);
expect(fileSize).to.be.above(200);
expect(fileSize).to.be.below(500);
});
download.on('end', function(output) {
expect(output).to.equal('Finished writing to disk');
done();
process.exit();
});
download.on('progress', function(progress) {
expect(progress).to.be.above(0);
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc