@hebcal/geo-sqlite 5.7.2 → 5.7.4
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/dist/index.js +8 -7
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/geo-sqlite v5.7.
|
|
1
|
+
/*! @hebcal/geo-sqlite v5.7.4 */
|
|
2
2
|
import Database from 'better-sqlite3';
|
|
3
3
|
import QuickLRU from 'quick-lru';
|
|
4
4
|
import { Location, Locale } from '@hebcal/core';
|
|
@@ -511,7 +511,7 @@ function munge(s) {
|
|
|
511
511
|
}
|
|
512
512
|
|
|
513
513
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
514
|
-
const version = '5.7.
|
|
514
|
+
const version = '5.7.4';
|
|
515
515
|
|
|
516
516
|
const GEONAME_SQL = `SELECT
|
|
517
517
|
g.name as name,
|
|
@@ -730,6 +730,7 @@ class GeoDb {
|
|
|
730
730
|
*/
|
|
731
731
|
lookupGeoname(geonameid) {
|
|
732
732
|
geonameid = +geonameid;
|
|
733
|
+
if (!geonameid) return null;
|
|
733
734
|
if (geonameid === 293396) {
|
|
734
735
|
geonameid = 293397;
|
|
735
736
|
}
|
|
@@ -768,10 +769,10 @@ class GeoDb {
|
|
|
768
769
|
if (countryName === 'United States') countryName = 'USA';
|
|
769
770
|
if (countryName === 'United Kingdom') countryName = 'UK';
|
|
770
771
|
let cityDescr = cityName;
|
|
771
|
-
if (countryName !== 'Israel' && admin1 && admin1.
|
|
772
|
+
if (countryName !== 'Israel' && admin1 && !admin1.includes(cityName)) {
|
|
772
773
|
const tlitCityName = transliterate(cityName);
|
|
773
774
|
const tlitAdmin1 = transliterate(admin1);
|
|
774
|
-
if (tlitAdmin1.
|
|
775
|
+
if (!tlitAdmin1.includes(tlitCityName)) {
|
|
775
776
|
cityDescr += ', ' + admin1;
|
|
776
777
|
}
|
|
777
778
|
}
|
|
@@ -795,7 +796,7 @@ class GeoDb {
|
|
|
795
796
|
const location = new Location(
|
|
796
797
|
result.latitude,
|
|
797
798
|
result.longitude,
|
|
798
|
-
result.cc
|
|
799
|
+
result.cc === 'IL',
|
|
799
800
|
result.timezone,
|
|
800
801
|
cityDescr,
|
|
801
802
|
result.cc,
|
|
@@ -808,7 +809,7 @@ class GeoDb {
|
|
|
808
809
|
if (admin1) {
|
|
809
810
|
location.admin1 = admin1;
|
|
810
811
|
}
|
|
811
|
-
if (result.cc
|
|
812
|
+
if (result.cc === 'IL' && admin1.startsWith('Jerusalem') && result.name.startsWith('Jerualem')) {
|
|
812
813
|
location.jersualem = true;
|
|
813
814
|
}
|
|
814
815
|
if (result.population) {
|
|
@@ -933,7 +934,7 @@ class GeoDb {
|
|
|
933
934
|
const admin1 = res.admin || loc.admin1 || '';
|
|
934
935
|
const obj = {
|
|
935
936
|
id: res.geonameid,
|
|
936
|
-
value:
|
|
937
|
+
value: loc.getName(),
|
|
937
938
|
admin1,
|
|
938
939
|
country,
|
|
939
940
|
cc,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/geo-sqlite",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.4",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hebcal"
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@hebcal/cities": "^6.1.0",
|
|
39
|
-
"@hebcal/core": "^6.0.
|
|
40
|
-
"better-sqlite3": "^12.
|
|
39
|
+
"@hebcal/core": "^6.0.8",
|
|
40
|
+
"better-sqlite3": "^12.6.2",
|
|
41
41
|
"minimist": "^1.2.8",
|
|
42
|
-
"pino": "^10.1
|
|
42
|
+
"pino": "^10.3.1",
|
|
43
43
|
"pino-pretty": "^13.1.3",
|
|
44
44
|
"quick-lru": "^7.3.0",
|
|
45
|
-
"transliteration": "^2.6.
|
|
45
|
+
"transliteration": "^2.6.1"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build:rollup": "rollup -c",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"ava": "^6.4.1",
|
|
67
67
|
"eslint": "^9.39.2",
|
|
68
68
|
"eslint-config-google": "^0.14.0",
|
|
69
|
-
"eslint-plugin-n": "^17.23.
|
|
70
|
-
"globals": "^
|
|
69
|
+
"eslint-plugin-n": "^17.23.2",
|
|
70
|
+
"globals": "^17.3.0",
|
|
71
71
|
"jsdoc": "^4.0.5",
|
|
72
72
|
"jsdoc-to-markdown": "^9.1.3",
|
|
73
|
-
"rollup": "^4.
|
|
73
|
+
"rollup": "^4.57.1"
|
|
74
74
|
}
|
|
75
75
|
}
|