@streamr/geoip-location 102.0.0 → 102.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamr/geoip-location",
|
|
3
|
-
"version": "102.
|
|
3
|
+
"version": "102.1.0",
|
|
4
4
|
"description": "Library for getting location information from IP addresses based on MaxMind GeoLite2 databases",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test-unit": "jest test/unit"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@streamr/utils": "102.
|
|
28
|
+
"@streamr/utils": "102.1.0",
|
|
29
29
|
"eventemitter3": "^5.0.0",
|
|
30
30
|
"long-timeout": "^0.1.1",
|
|
31
31
|
"mmdb-lib": "^2.1.1",
|
|
@@ -101,7 +101,7 @@ describe('GeoIpLocator', () => {
|
|
|
101
101
|
expect(location).toBeDefined()
|
|
102
102
|
|
|
103
103
|
// Helsinki, Finland
|
|
104
|
-
expect(location!.latitude).
|
|
105
|
-
expect(location!.longitude).
|
|
104
|
+
expect(location!.latitude).toBeCloseTo(60.1719, 1)
|
|
105
|
+
expect(location!.longitude).toBeCloseTo(24.9347, 1)
|
|
106
106
|
}, 60000)
|
|
107
107
|
})
|
|
@@ -48,8 +48,8 @@ describe('GeoIpLocatorNoNetworkAtMonthly', () => {
|
|
|
48
48
|
expect(location).toBeDefined()
|
|
49
49
|
|
|
50
50
|
// Helsinki, Finland
|
|
51
|
-
expect(location!.latitude).
|
|
52
|
-
expect(location!.longitude).
|
|
51
|
+
expect(location!.latitude).toBeCloseTo(60.1719, 1)
|
|
52
|
+
expect(location!.longitude).toBeCloseTo(24.9347, 1)
|
|
53
53
|
|
|
54
54
|
}, 60000)
|
|
55
55
|
})
|
|
@@ -39,8 +39,8 @@ describe('GeoIpLocator', () => {
|
|
|
39
39
|
expect(location).toBeDefined()
|
|
40
40
|
|
|
41
41
|
// Helsinki, Finland
|
|
42
|
-
expect(location!.latitude).
|
|
43
|
-
expect(location!.longitude).
|
|
42
|
+
expect(location!.latitude).toBeCloseTo(60.1719, 1)
|
|
43
|
+
expect(location!.longitude).toBeCloseTo(24.9347, 1)
|
|
44
44
|
|
|
45
45
|
locator.stop()
|
|
46
46
|
fs.unlinkSync(dbDir + '/GeoLite2-City.mmdb')
|
|
@@ -75,8 +75,8 @@ describe('GeoIpLocator', () => {
|
|
|
75
75
|
expect(location).toBeDefined()
|
|
76
76
|
|
|
77
77
|
// Helsinki, Finland
|
|
78
|
-
expect(location!.latitude).
|
|
79
|
-
expect(location!.longitude).
|
|
78
|
+
expect(location!.latitude).toBeCloseTo(60.1719, 1)
|
|
79
|
+
expect(location!.longitude).toBeCloseTo(24.9347, 1)
|
|
80
80
|
|
|
81
81
|
locator.stop()
|
|
82
82
|
fs.unlinkSync(dbDir + '/GeoLite2-City.mmdb')
|
|
@@ -97,8 +97,8 @@ describe('GeoIpLocator', () => {
|
|
|
97
97
|
expect(location).toBeDefined()
|
|
98
98
|
|
|
99
99
|
// Helsinki, Finland
|
|
100
|
-
expect(location!.latitude).
|
|
101
|
-
expect(location!.longitude).
|
|
100
|
+
expect(location!.latitude).toBeCloseTo(60.1719, 1)
|
|
101
|
+
expect(location!.longitude).toBeCloseTo(24.9347, 1)
|
|
102
102
|
|
|
103
103
|
locator.stop()
|
|
104
104
|
fs.unlinkSync(dbDir + '/GeoLite2-City.mmdb')
|