@hebcal/geo-sqlite 3.4.3 → 3.6.1

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 CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/geo-sqlite v3.4.3 */
1
+ /*! @hebcal/geo-sqlite v3.6.0 */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -55,6 +55,7 @@ FROM ZIPCodes_Primary`;
55
55
  const ZIP_COMPLETE_SQL = `SELECT ZipCode,CityMixedCase,State,Latitude,Longitude,TimeZone,DayLightSaving
56
56
  FROM ZIPCodes_Primary
57
57
  WHERE ZipCode LIKE ?
58
+ ORDER BY Population DESC
58
59
  LIMIT 10`;
59
60
  const GEONAME_COMPLETE_SQL = `SELECT geonameid, asciiname, admin1, country,
60
61
  population, latitude, longitude, timezone
@@ -244,6 +245,7 @@ class GeoDb {
244
245
  latitude: res.Latitude,
245
246
  longitude: res.Longitude,
246
247
  timezone: core.Location.getUsaTzid(res.State, res.TimeZone, res.DayLightSaving),
248
+ population: res.Population,
247
249
  geo: 'zip'
248
250
  };
249
251
  return obj;
@@ -454,7 +456,7 @@ function filterPlacesHebrew(a) {
454
456
  const firstchar = name[0];
455
457
 
456
458
  if (firstchar >= '\u05D0' && firstchar <= '\u05EA') {
457
- a[1] = name; // replace 'name' field with Hebrew
459
+ a[1] = core.Locale.hebrewStripNikkud(name); // replace 'name' field with Hebrew
458
460
 
459
461
  return true;
460
462
  }
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- /*! @hebcal/geo-sqlite v3.4.3 */
1
+ /*! @hebcal/geo-sqlite v3.6.0 */
2
2
  import Database from 'better-sqlite3';
3
- import { Location } from '@hebcal/core';
3
+ import { Location, Locale } from '@hebcal/core';
4
4
  import pino from 'pino';
5
5
  import events from 'events';
6
6
  import fs from 'fs';
@@ -43,6 +43,7 @@ FROM ZIPCodes_Primary`;
43
43
  const ZIP_COMPLETE_SQL = `SELECT ZipCode,CityMixedCase,State,Latitude,Longitude,TimeZone,DayLightSaving
44
44
  FROM ZIPCodes_Primary
45
45
  WHERE ZipCode LIKE ?
46
+ ORDER BY Population DESC
46
47
  LIMIT 10`;
47
48
  const GEONAME_COMPLETE_SQL = `SELECT geonameid, asciiname, admin1, country,
48
49
  population, latitude, longitude, timezone
@@ -232,6 +233,7 @@ class GeoDb {
232
233
  latitude: res.Latitude,
233
234
  longitude: res.Longitude,
234
235
  timezone: Location.getUsaTzid(res.State, res.TimeZone, res.DayLightSaving),
236
+ population: res.Population,
235
237
  geo: 'zip'
236
238
  };
237
239
  return obj;
@@ -442,7 +444,7 @@ function filterPlacesHebrew(a) {
442
444
  const firstchar = name[0];
443
445
 
444
446
  if (firstchar >= '\u05D0' && firstchar <= '\u05EA') {
445
- a[1] = name; // replace 'name' field with Hebrew
447
+ a[1] = Locale.hebrewStripNikkud(name); // replace 'name' field with Hebrew
446
448
 
447
449
  return true;
448
450
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/geo-sqlite",
3
- "version": "3.4.3",
3
+ "version": "3.6.1",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal"
@@ -28,10 +28,10 @@
28
28
  "geo-sqlite.d.ts"
29
29
  ],
30
30
  "dependencies": {
31
- "@hebcal/core": "^3.26.3",
32
- "better-sqlite3": "^7.4.3",
33
- "pino": "^6.13.0",
34
- "pino-pretty": "^5.1.3"
31
+ "@hebcal/core": "^3.32.0",
32
+ "better-sqlite3": "^7.4.6",
33
+ "pino": "^7.6.2",
34
+ "pino-pretty": "^7.3.0"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "rollup -c",
@@ -60,19 +60,19 @@
60
60
  "license": "BSD-2-Clause",
61
61
  "devDependencies": {
62
62
  "@ava/babel": "^2.0.0",
63
- "@babel/core": "^7.15.5",
63
+ "@babel/core": "^7.16.7",
64
64
  "@babel/polyfill": "^7.12.1",
65
- "@babel/preset-env": "^7.15.6",
66
- "@babel/register": "^7.15.3",
65
+ "@babel/preset-env": "^7.16.7",
66
+ "@babel/register": "^7.16.7",
67
67
  "@rollup/plugin-babel": "^5.3.0",
68
- "@rollup/plugin-commonjs": "^20.0.0",
68
+ "@rollup/plugin-commonjs": "^21.0.1",
69
69
  "@rollup/plugin-json": "^4.1.0",
70
- "@rollup/plugin-node-resolve": "^13.0.5",
70
+ "@rollup/plugin-node-resolve": "^13.1.3",
71
71
  "ava": "^3.15.0",
72
- "eslint": "^7.32.0",
72
+ "eslint": "^8.6.0",
73
73
  "eslint-config-google": "^0.14.0",
74
74
  "jsdoc": "^3.6.7",
75
- "jsdoc-to-markdown": "^7.0.1",
76
- "rollup": "^2.57.0"
75
+ "jsdoc-to-markdown": "^7.1.0",
76
+ "rollup": "^2.63.0"
77
77
  }
78
78
  }
package/zips-dummy.sql CHANGED
@@ -6,5 +6,5 @@ CREATE TABLE ZIPCodes_Primary (
6
6
  Longitude decimal(12, 6),
7
7
  TimeZone char(2) NULL,
8
8
  DayLightSaving char(1) NULL,
9
- Elevation int NULL
9
+ Population int NULL
10
10
  );