gtfs 4.8.0 → 4.9.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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.9.0] - 2024-03-12
9
+
10
+ ### Updated
11
+
12
+ - Close DB if not :memory: from CLI after import
13
+
8
14
  ## [4.8.0] - 2024-03-10
9
15
 
10
16
  ### Added
@@ -5,7 +5,7 @@ import { hideBin } from 'yargs/helpers';
5
5
 
6
6
  import { getConfig } from '../lib/file-utils.js';
7
7
  import { formatError } from '../lib/log-utils.js';
8
- import { importGtfs } from '../lib/gtfs.js';
8
+ import { closeDb, importGtfs, openDb } from '../lib/gtfs.js';
9
9
 
10
10
  const { argv } = yargs(hideBin(process.argv))
11
11
  .usage('Usage: $0 --configPath ./config.json')
@@ -38,6 +38,11 @@ const handleError = (error) => {
38
38
  const setupImport = async () => {
39
39
  const config = await getConfig(argv);
40
40
  await importGtfs(config);
41
+
42
+ const db = openDb(config);
43
+ if (db.name !== ':memory:') {
44
+ closeDb(db);
45
+ }
41
46
  process.exit();
42
47
  };
43
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtfs",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "Import GTFS transit data into SQLite and query routes, stops, times, fares and more",
5
5
  "keywords": [
6
6
  "transit",