New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

geoip-lite

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geoip-lite - npm Package Compare versions

Comparing version 1.1.8 to 1.1.9

21

package.json
{
"name" : "geoip-lite",
"version" : "1.1.8",
"version" : "1.1.9",
"description" : "A light weight native JavaScript implementation of GeoIP API from MaxMind",

@@ -18,9 +18,9 @@ "keywords" : ["geo", "geoip", "ip", "ipv4", "ipv6", "geolookup", "maxmind", "geolite"],

"dependencies": {
"async": "~1.5.2",
"colors": "1.1.2",
"glob": "~7.0.3",
"iconv-lite": "~0.4.13",
"lazy": "~1.0.11",
"rimraf": "~2.5.2",
"unzip": "~0.1.11"
"async": "^2.1.1",
"colors": "^1.1.2",
"glob": "^7.1.1",
"iconv-lite": "^0.4.13",
"lazy": "^1.0.11",
"rimraf": "^2.5.2",
"unzip": "^0.1.11"
},

@@ -31,4 +31,5 @@ "config": {

"devDependencies": {
"nodeunit": "~0.9.1"
}
"nodeunit": "^0.10.2"
},
"license": "Apache-2.0"
}

@@ -142,2 +142,10 @@ GeoIP-lite

You can also run it by doing:
```bash
node ./node_modules/geoip-lite/scripts/updatedb.js
```
Or, if you really want, run the update once by `require('geoip-lite/scripts/updatedb.js')`.
Caveats

@@ -144,0 +152,0 @@ -------

@@ -5,6 +5,2 @@ // fetches and converts maxmind lite databases

if(!process.env.npm_package_config_update){
return;
}
var user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.36 Safari/537.36';

@@ -113,19 +109,19 @@

function getOptions() {
if (process.env.http_proxy) {
var options = url.parse(process.env.http_proxy);
var options = url.parse(downloadUrl);
options.headers = {
'User-Agent': user_agent
};
options.path = downloadUrl;
options.headers = {
Host: url.parse(downloadUrl).host
};
if (process.env.http_proxy || process.env.https_proxy) {
try {
var HttpsProxyAgent = require('https-proxy-agent');
options.agent = new HttpsProxyAgent(process.env.http_proxy || process.env.https_proxy);
}
catch (e) {
console.error("Install https-proxy-agent to use an HTTP/HTTPS proxy");
process.exit(-1)
}
}
return options;
} else {
var options = url.parse(downloadUrl);
options.headers = {
'Host': url.parse(downloadUrl).host,
'User-Agent': user_agent
};
return options;
}
return options;
}

@@ -132,0 +128,0 @@

@@ -19,3 +19,3 @@ var geoip = require('../lib/geoip');

test.done();
},
},

@@ -25,4 +25,4 @@ testUTF8: function(test) {

var ip = "31.17.106.227";
var expected = "Neumünster";
var ip = "95.23.1.184";
var expected = "Logroño";
var actual = geoip.lookup(ip);

@@ -32,3 +32,3 @@

test.equal(actual.city, expected, "UTF8 city name does not match");
test.done();

@@ -53,3 +53,3 @@ },

test.equal(actual.city, "Glen Rose");
test.equal(actual.city, "Granbury");
test.equal(actual.metro, 623);

@@ -56,0 +56,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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