@hebcal/geo-sqlite 5.10.4 → 5.10.5

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.
@@ -2,6 +2,7 @@
2
2
 
3
3
  import {buildGeonamesSqlite} from '@hebcal/geo-sqlite';
4
4
  import {pino} from 'pino';
5
+ import pretty from 'pino-pretty';
5
6
  import minimist from 'minimist';
6
7
 
7
8
  const argv = minimist(process.argv.slice(2), {
@@ -15,13 +16,14 @@ if (argv.help) {
15
16
  process.exit(0);
16
17
  }
17
18
 
18
- const logger = pino({
19
- level: argv.quiet ? 'warn' : 'info',
20
- transport: {
21
- target: 'pino-pretty',
22
- options: {translateTime: 'SYS:standard', ignore: 'pid,hostname'},
23
- },
24
- });
19
+ // Run pino-pretty synchronously as the destination stream rather than via a
20
+ // worker-thread transport. The worker thread (thread-stream) can keep the
21
+ // process alive indefinitely on some platforms (e.g. GitHub Codespaces); a
22
+ // synchronous stream lets the process exit naturally once the work is done.
23
+ const logger = pino({level: argv.quiet ? 'warn' : 'info'}, pretty({
24
+ translateTime: 'SYS:standard',
25
+ ignore: 'pid,hostname',
26
+ }));
25
27
 
26
28
  const args = argv._;
27
29
  if (args.length !== 7) {
package/bin/make-test-dbs CHANGED
@@ -7,6 +7,7 @@
7
7
 
8
8
  import {buildGeonamesSqlite, makeZipsSqlite} from '@hebcal/geo-sqlite';
9
9
  import {pino} from 'pino';
10
+ import pretty from 'pino-pretty';
10
11
  import {statSync} from 'fs';
11
12
  import path from 'path';
12
13
 
@@ -15,13 +16,14 @@ const repoDir = path.join(outDir, 'node_modules/@hebcal/geo-sqlite');
15
16
 
16
17
  const population = process.env.POPULATION ? +process.env.POPULATION : 0;
17
18
 
18
- const logger = pino({
19
- level: 'info',
20
- transport: {
21
- target: 'pino-pretty',
22
- options: {translateTime: 'SYS:standard', ignore: 'pid,hostname'},
23
- },
24
- });
19
+ // Run pino-pretty synchronously as the destination stream rather than via a
20
+ // worker-thread transport. The worker thread (thread-stream) can keep the
21
+ // process alive indefinitely on some platforms (e.g. GitHub Codespaces); a
22
+ // synchronous stream lets the process exit naturally once the work is done.
23
+ const logger = pino({level: 'info'}, pretty({
24
+ translateTime: 'SYS:standard',
25
+ ignore: 'pid,hostname',
26
+ }));
25
27
 
26
28
  const geonamesDb = path.join(outDir, 'geonames.sqlite3');
27
29
  const zipsDb = path.join(outDir, 'zips.sqlite3');
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/geo-sqlite v5.10.4 */
1
+ /*! @hebcal/geo-sqlite v5.10.5 */
2
2
  import { DatabaseSync } from 'node:sqlite';
3
3
  import fs$1, { existsSync } from 'node:fs';
4
4
  import QuickLRU from 'quick-lru';
@@ -512,7 +512,7 @@ function munge(s) {
512
512
  }
513
513
 
514
514
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
515
- const version = '5.10.4';
515
+ const version = '5.10.5';
516
516
 
517
517
  const GEONAME_SQL = `SELECT
518
518
  g.name as name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/geo-sqlite",
3
- "version": "5.10.4",
3
+ "version": "5.10.5",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal"