gtfs 4.12.0 → 4.13.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.
Files changed (199) hide show
  1. package/README.md +27 -5
  2. package/dist/bin/gtfs-export.d.ts +1 -0
  3. package/dist/bin/gtfs-export.js +3646 -0
  4. package/dist/bin/gtfs-export.js.map +1 -0
  5. package/dist/bin/gtfs-import.d.ts +1 -0
  6. package/dist/bin/gtfs-import.js +4146 -0
  7. package/dist/bin/gtfs-import.js.map +1 -0
  8. package/dist/bin/gtfsrealtime-update.d.ts +1 -0
  9. package/dist/bin/gtfsrealtime-update.js +3802 -0
  10. package/dist/bin/gtfsrealtime-update.js.map +1 -0
  11. package/dist/index.d.ts +169 -0
  12. package/dist/index.js +5205 -0
  13. package/dist/index.js.map +1 -0
  14. package/package.json +26 -12
  15. package/.eslintrc.json +0 -28
  16. package/.github/workflows/nodejs.yml +0 -21
  17. package/.husky/pre-commit +0 -4
  18. package/@types/index.d.ts +0 -606
  19. package/@types/tests.ts +0 -31
  20. package/@types/tsconfig.json +0 -17
  21. package/CHANGELOG.md +0 -905
  22. package/bin/gtfs-export.js +0 -42
  23. package/bin/gtfs-import.js +0 -52
  24. package/bin/gtfsrealtime-update.js +0 -35
  25. package/config-sample-full.json +0 -20
  26. package/config-sample-rtupdates.json +0 -16
  27. package/config-sample.json +0 -8
  28. package/docs/images/node-gtfs-logo.svg +0 -18
  29. package/index.js +0 -1
  30. package/lib/advancedQuery.js +0 -36
  31. package/lib/db.js +0 -92
  32. package/lib/export.js +0 -141
  33. package/lib/file-utils.js +0 -103
  34. package/lib/geojson-utils.js +0 -138
  35. package/lib/gtfs/agencies.js +0 -32
  36. package/lib/gtfs/areas.js +0 -27
  37. package/lib/gtfs/attributions.js +0 -32
  38. package/lib/gtfs/booking-rules.js +0 -32
  39. package/lib/gtfs/calendar-dates.js +0 -32
  40. package/lib/gtfs/calendars.js +0 -32
  41. package/lib/gtfs/fare-attributes.js +0 -32
  42. package/lib/gtfs/fare-leg-rules.js +0 -32
  43. package/lib/gtfs/fare-media.js +0 -32
  44. package/lib/gtfs/fare-products.js +0 -32
  45. package/lib/gtfs/fare-rules.js +0 -32
  46. package/lib/gtfs/fare-transfer-rules.js +0 -32
  47. package/lib/gtfs/feed-info.js +0 -32
  48. package/lib/gtfs/frequencies.js +0 -32
  49. package/lib/gtfs/levels.js +0 -27
  50. package/lib/gtfs/location-group-stops.js +0 -32
  51. package/lib/gtfs/location-groups.js +0 -32
  52. package/lib/gtfs/locations.js +0 -32
  53. package/lib/gtfs/networks.js +0 -32
  54. package/lib/gtfs/pathways.js +0 -32
  55. package/lib/gtfs/route-networks.js +0 -32
  56. package/lib/gtfs/routes.js +0 -72
  57. package/lib/gtfs/shapes.js +0 -119
  58. package/lib/gtfs/stop-areas.js +0 -32
  59. package/lib/gtfs/stop-times.js +0 -32
  60. package/lib/gtfs/stops.js +0 -136
  61. package/lib/gtfs/timeframes.js +0 -32
  62. package/lib/gtfs/transfers.js +0 -32
  63. package/lib/gtfs/translations.js +0 -32
  64. package/lib/gtfs/trips.js +0 -27
  65. package/lib/gtfs-plus/calendar-attributes.js +0 -32
  66. package/lib/gtfs-plus/directions.js +0 -32
  67. package/lib/gtfs-plus/route-attributes.js +0 -32
  68. package/lib/gtfs-plus/stop-attributes.js +0 -32
  69. package/lib/gtfs-realtime/service-alerts.js +0 -34
  70. package/lib/gtfs-realtime/stop-time-updates.js +0 -32
  71. package/lib/gtfs-realtime/trip-updates.js +0 -32
  72. package/lib/gtfs-realtime/vehicle-positions.js +0 -32
  73. package/lib/gtfs-ride/board-alights.js +0 -32
  74. package/lib/gtfs-ride/ride-feed-infos.js +0 -32
  75. package/lib/gtfs-ride/rider-trips.js +0 -32
  76. package/lib/gtfs-ride/riderships.js +0 -32
  77. package/lib/gtfs-ride/trip-capacities.js +0 -32
  78. package/lib/gtfs.js +0 -261
  79. package/lib/import.js +0 -803
  80. package/lib/log-utils.js +0 -73
  81. package/lib/non-standard/timetable-notes-references.js +0 -32
  82. package/lib/non-standard/timetable-notes.js +0 -32
  83. package/lib/non-standard/timetable-pages.js +0 -32
  84. package/lib/non-standard/timetable-stop-order.js +0 -32
  85. package/lib/non-standard/timetables.js +0 -32
  86. package/lib/non-standard/trips-dated-vehicle-journey.js +0 -32
  87. package/lib/ods/deadhead-times.js +0 -32
  88. package/lib/ods/deadheads.js +0 -32
  89. package/lib/ods/ops-locations.js +0 -32
  90. package/lib/ods/run-events.js +0 -32
  91. package/lib/ods/runs-pieces.js +0 -32
  92. package/lib/utils.js +0 -178
  93. package/models/gtfs/agency.js +0 -49
  94. package/models/gtfs/areas.js +0 -19
  95. package/models/gtfs/attributions.js +0 -68
  96. package/models/gtfs/booking-rules.js +0 -92
  97. package/models/gtfs/calendar-dates.js +0 -34
  98. package/models/gtfs/calendar.js +0 -76
  99. package/models/gtfs/fare-attributes.js +0 -48
  100. package/models/gtfs/fare-leg-rules.js +0 -55
  101. package/models/gtfs/fare-media.js +0 -26
  102. package/models/gtfs/fare-products.js +0 -35
  103. package/models/gtfs/fare-rules.js +0 -34
  104. package/models/gtfs/fare-transfer-rules.js +0 -56
  105. package/models/gtfs/feed-info.js +0 -50
  106. package/models/gtfs/frequencies.js +0 -46
  107. package/models/gtfs/levels.js +0 -25
  108. package/models/gtfs/location-group-stops.js +0 -22
  109. package/models/gtfs/location-groups.js +0 -19
  110. package/models/gtfs/locations.js +0 -12
  111. package/models/gtfs/networks.js +0 -20
  112. package/models/gtfs/pathways.js +0 -74
  113. package/models/gtfs/route-networks.js +0 -21
  114. package/models/gtfs/routes.js +0 -79
  115. package/models/gtfs/shapes.js +0 -41
  116. package/models/gtfs/stop-areas.js +0 -20
  117. package/models/gtfs/stop-times.js +0 -120
  118. package/models/gtfs/stops.js +0 -85
  119. package/models/gtfs/timeframes.js +0 -29
  120. package/models/gtfs/transfers.js +0 -56
  121. package/models/gtfs/translations.js +0 -48
  122. package/models/gtfs/trips.js +0 -70
  123. package/models/gtfs-plus/calendar-attributes.js +0 -22
  124. package/models/gtfs-plus/directions.js +0 -29
  125. package/models/gtfs-plus/route-attributes.js +0 -34
  126. package/models/gtfs-plus/stop-attributes.js +0 -35
  127. package/models/gtfs-realtime/service-alert-targets.js +0 -37
  128. package/models/gtfs-realtime/service-alerts.js +0 -60
  129. package/models/gtfs-realtime/stop-time-updates.js +0 -85
  130. package/models/gtfs-realtime/trip-updates.js +0 -75
  131. package/models/gtfs-realtime/vehicle-positions.js +0 -135
  132. package/models/gtfs-ride/board-alight.js +0 -132
  133. package/models/gtfs-ride/ride-feed-info.js +0 -40
  134. package/models/gtfs-ride/rider-trip.js +0 -113
  135. package/models/gtfs-ride/ridership.js +0 -127
  136. package/models/gtfs-ride/trip-capacity.js +0 -51
  137. package/models/models.js +0 -120
  138. package/models/non-standard/timetable-notes-references.js +0 -50
  139. package/models/non-standard/timetable-notes.js +0 -24
  140. package/models/non-standard/timetable-pages.js +0 -23
  141. package/models/non-standard/timetable-stop-order.js +0 -32
  142. package/models/non-standard/timetables.js +0 -144
  143. package/models/non-standard/trips-dated-vehicle-journey.js +0 -34
  144. package/models/ods/deadhead-times.js +0 -65
  145. package/models/ods/deadheads.js +0 -60
  146. package/models/ods/ops-locations.js +0 -46
  147. package/models/ods/run-events.js +0 -70
  148. package/models/ods/runs-pieces.js +0 -59
  149. package/test/fixture/caltrain_20160406.zip +0 -0
  150. package/test/mocha/advanced-query.js +0 -74
  151. package/test/mocha/delete-db.js +0 -62
  152. package/test/mocha/export-gtfs.js +0 -147
  153. package/test/mocha/fare-transfer-rules.js +0 -32
  154. package/test/mocha/get-agencies.js +0 -90
  155. package/test/mocha/get-areas.js +0 -27
  156. package/test/mocha/get-attributions.js +0 -27
  157. package/test/mocha/get-board-alights.js +0 -28
  158. package/test/mocha/get-booking-rules.js +0 -28
  159. package/test/mocha/get-calendar-attributes.js +0 -33
  160. package/test/mocha/get-calendar-dates.js +0 -107
  161. package/test/mocha/get-calendars.js +0 -94
  162. package/test/mocha/get-directions.js +0 -28
  163. package/test/mocha/get-fare-attributes.js +0 -51
  164. package/test/mocha/get-fare-leg-rules.js +0 -27
  165. package/test/mocha/get-fare-media.js +0 -27
  166. package/test/mocha/get-fare-products.js +0 -27
  167. package/test/mocha/get-fare-rules.js +0 -50
  168. package/test/mocha/get-feed-info.js +0 -28
  169. package/test/mocha/get-frequencies.js +0 -28
  170. package/test/mocha/get-levels.js +0 -28
  171. package/test/mocha/get-location-group-stops.js +0 -33
  172. package/test/mocha/get-location-groups.js +0 -28
  173. package/test/mocha/get-locations.js +0 -69
  174. package/test/mocha/get-networks.js +0 -28
  175. package/test/mocha/get-pathways.js +0 -28
  176. package/test/mocha/get-ride-feed-infos.js +0 -24
  177. package/test/mocha/get-rider-trips.js +0 -28
  178. package/test/mocha/get-riderships.js +0 -28
  179. package/test/mocha/get-route-attributes.js +0 -33
  180. package/test/mocha/get-route-networks.js +0 -28
  181. package/test/mocha/get-routes.js +0 -143
  182. package/test/mocha/get-shapes-as-geojson.js +0 -92
  183. package/test/mocha/get-shapes.js +0 -240
  184. package/test/mocha/get-stop-attributes.js +0 -28
  185. package/test/mocha/get-stops-as-geojson.js +0 -87
  186. package/test/mocha/get-stops.js +0 -343
  187. package/test/mocha/get-stoptimes.js +0 -67
  188. package/test/mocha/get-timeframes.js +0 -28
  189. package/test/mocha/get-timetable-pages.js +0 -28
  190. package/test/mocha/get-timetable-stop-orders.js +0 -33
  191. package/test/mocha/get-timetables.js +0 -28
  192. package/test/mocha/get-transfers.js +0 -28
  193. package/test/mocha/get-translations.js +0 -28
  194. package/test/mocha/get-trip-capacities.js +0 -28
  195. package/test/mocha/get-trips.js +0 -53
  196. package/test/mocha/import-gtfs.js +0 -173
  197. package/test/mocha/open-db.js +0 -149
  198. package/test/mocha/raw-query.js +0 -34
  199. package/test/test-config.js +0 -12
package/CHANGELOG.md DELETED
@@ -1,905 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [4.12.0] - 2024-06-17
9
-
10
- ### Added
11
-
12
- - Support for `service_id` in `getRoutes`
13
-
14
- ### Changed
15
-
16
- - Use tempy for temporary directory creation
17
-
18
- ## [4.11.3] - 2024-06-13
19
-
20
- ### Fixed
21
-
22
- - Better tests for locations.geojson
23
- - Handle unknown filename extensions in models
24
-
25
- ## [4.11.2] - 2024-06-13
26
-
27
- ### Added
28
-
29
- - Support for [locations.geojson](https://gtfs.org/schedule/reference/#locationsgeojson)
30
-
31
- ### Updated
32
-
33
- - Update sqlite type for all models
34
- - Dependency updates
35
-
36
- ## [4.11.1] - 2024-06-05
37
-
38
- ### Changed
39
-
40
- - Don't throw error on GTFS-Realtime import HTTP error
41
-
42
- ### Updated
43
-
44
- - Remove recursive-copy module
45
- - Dependency updates
46
-
47
- ## [4.11.0] - 2024-06-01
48
-
49
- ### Added
50
-
51
- - Support for [GTFS Flex](https://mobilitydata.org/🎉-gtfs-flex-is-officially-adopted-everything-you-need-to-know/)
52
- - Support for [booking_rules.txt](https://gtfs.org/schedule/reference/#booking_rulestxt)
53
- - Support for [location_groups.txt](https://gtfs.org/schedule/reference/#location_groupstxt)
54
- - Support for [location_group_stops.txt](https://gtfs.org/schedule/reference/#location_group_stopstxt)
55
- - Add `rule_priority` field to `fare_leg_rules.txt`
56
-
57
- ### Updated
58
-
59
- - Dependency updates
60
-
61
- ## [4.10.4] - 2024-05-14
62
-
63
- ### Updated
64
-
65
- - Improved error messages
66
- - Don't use pretty-error globally
67
- - Dependency updates
68
-
69
- ## [4.10.3] - 2024-05-12
70
-
71
- ### Added
72
-
73
- - Additional GTFS-RT vehiclePosition fields
74
- - deleteDb method
75
-
76
- ### Updated
77
-
78
- - Dependency updates
79
-
80
- ## [4.10.2] - 2024-04-02
81
-
82
- ### Added
83
-
84
- - Better error message for `gtfsrealtime-update` command
85
- - Support additional fields for vehiclePosition GTFS-Realtime data
86
-
87
- ### Updated
88
-
89
- - Dependency updates
90
-
91
- ## [4.10.1] - 2024-03-29
92
-
93
- ### Updated
94
-
95
- - Dependency updates
96
-
97
- ## [4.10.0] - 2024-03-29
98
-
99
- ### Added
100
-
101
- - Support for [fare_media.txt](https://gtfs.org/schedule/reference/#fare_mediatxt)
102
- - Support for [networks.txt](https://gtfs.org/schedule/reference/#networkstxt)
103
- - Support for [route_networks.txt](https://gtfs.org/schedule/reference/#route_networkstxt)
104
- - Support for [timeframes.txt](https://gtfs.org/schedule/reference/#timeframestxt)
105
-
106
- ## [4.9.0] - 2024-03-12
107
-
108
- ### Updated
109
-
110
- - Close DB if not :memory: from CLI after import
111
-
112
- ## [4.8.0] - 2024-03-10
113
-
114
- ### Added
115
-
116
- - `ignoreErrors` config option
117
- - `downloadTimeout` config option
118
- - `db` config option
119
-
120
- ## [4.7.2] - 2024-03-05
121
-
122
- ### Updated
123
-
124
- - Show info about ignoreDuplicates option when primary key constraint issue happens
125
- - Dependency updates
126
-
127
- ## [4.7.1] - 2024-02-18
128
-
129
- ### Updated
130
-
131
- - Support null arrival and departure in StopTimeUpdate
132
-
133
- ## [4.7.0] - 2024-02-09
134
-
135
- ### Added
136
-
137
- - Added `bounding_box_side_m` option to `getStops` and `getStopsAsGeoJSON` to find all stops within a bounding box.
138
-
139
- ### Updated
140
-
141
- - Dependency updates
142
-
143
- ## [4.6.0] - 2024-01-17
144
-
145
- ### Changed
146
-
147
- - Renamed `getStopTimesUpdates` to `getStopTimeUpdates`.
148
-
149
- ### Added
150
- - Added `schedule_relationship`, `trip_start_time`, `direction_id` and `route_id` fields to stop_time_updates and trip_updates tables.
151
-
152
- ### Updated
153
-
154
- - Dependency updates
155
-
156
- ## [4.5.1] - 2023-11-09
157
-
158
- ### Updated
159
-
160
- - Dependency updates
161
- - Use path to types file instead of directory in package.json
162
-
163
- ### Fixed
164
-
165
- - Exclude agency_id from export if empty
166
-
167
- ## [4.5.0] - 2023-08-23
168
-
169
- ### Updated
170
-
171
- - Increase `maxInsertVariables` to 32,000
172
- - Dependency updates
173
-
174
- ## [4.4.3] - 2023-07-18
175
-
176
- ### Updated
177
-
178
- - Dependency updates
179
-
180
- ## [4.4.2] - 2023-07-08
181
-
182
- ### Changed
183
-
184
- - Added index to stoptimes table for stop_id field
185
- - Updated node.js versions for tests
186
-
187
- ## [4.4.1] - 2023-07-07
188
-
189
- ### Changed
190
-
191
- - Use lint-staged instead of pretty-quick
192
-
193
- ### Updated
194
-
195
- - Dependency updates
196
-
197
- ## [4.4.0] - 2023-06-16
198
-
199
- ### Changed
200
-
201
- - Pad leading zeros of timestamp columns
202
-
203
- ## [4.3.2] - 2023-06-14
204
-
205
- ### Updated
206
-
207
- - Dependency updates
208
- - node-csv `relax_quotes` config
209
-
210
- ## [4.3.1] - 2023-06-06
211
-
212
- ### Added
213
-
214
- - Ignore system directories within zip file
215
-
216
- ### Updated
217
-
218
- - Dependency updates
219
-
220
- ## [4.3.0] - 2023-05-04
221
-
222
- ### Updated
223
-
224
- - Updated Readme to add closeDb documentation
225
- - Use node-stream-zip instead of unzipper
226
-
227
- ### Added
228
-
229
- - Support for prefixes when importing multiple GTFS files
230
-
231
- ## [4.2.0] - 2023-04-13
232
-
233
- ### Updated
234
-
235
- - Add route_attributes to getShapesAsGeoJSON() function as geojson properties
236
- - Add stop_attributes to getStopsAsGeoJSON() function as geojson properties
237
- - Support for multi-column primary keys
238
-
239
- ## [4.1.1] - 2023-04-12
240
-
241
- ### Added
242
-
243
- - Support for GTFS+ Files
244
-
245
- ### Updated
246
-
247
- - Dependency updates
248
-
249
- ## [4.1.0] - 2023-02-25
250
-
251
- ### Added
252
-
253
- - Support for Operational Data Standard (ODS) Files
254
-
255
- ### Updated
256
-
257
- - Dependency updates
258
-
259
- ## [4.0.3] - 2023-02-04
260
-
261
- ### Changed
262
-
263
- - Updates to sqlite journal mode
264
-
265
- ### Updated
266
-
267
- - Dependency updates
268
-
269
- ## [4.0.2] - 2023-01-15
270
-
271
- ### Changed
272
-
273
- - In getStopsAsGeoJSON only return stops that are part of a route.
274
-
275
- ### Updated
276
-
277
- - Dependency updates
278
-
279
- ## [4.0.1] - 2022-12-31
280
-
281
- ### Updated
282
-
283
- - Update types info
284
- - Improved readme
285
- - Improved queries
286
-
287
- ## [4.0.0] - 2022-12-30
288
-
289
- ### Changed
290
-
291
- - Use better-sqlite3 library
292
- - Make all query methods synchronous
293
- - Remove `runRawQuery` (use Raw SQLite query instead)
294
- - Remove `execRawQuery` (use Raw SQLite query instead)
295
- - Remove `getDb` (use `openDb` instead)
296
-
297
- ## [3.8.0] - 2022-12-22
298
-
299
- ### Updated
300
-
301
- - Dependency updates
302
- - Add Node 18 tests
303
-
304
- ### Changed
305
-
306
- - Make transfer_type not required in transfers.txt
307
-
308
- ## [3.7.0] - 2022-11-17
309
-
310
- ### Updated
311
-
312
- - Dependency updates
313
-
314
- ### Added
315
-
316
- - Add ignoreDuplicates config option
317
-
318
- ## [3.6.1] - 2022-11-08
319
-
320
- ### Updated
321
-
322
- - Support for querying null values as part of an array
323
-
324
- ## [3.6.0] - 2022-08-08
325
-
326
- ### Added
327
-
328
- - GTFS Fares v2 and new transfers.txt fields
329
-
330
- ### Updated
331
-
332
- - Dependency updates
333
- - Better examples in readme
334
-
335
- ## [3.5.1] - 2022-07-26
336
-
337
- ### Updated
338
-
339
- - Dependency updates
340
-
341
- ## [3.5.0] - 2022-07-10
342
-
343
- ### Updated
344
-
345
- - Use yoctocolors instead of chalk
346
- - Dependency updates
347
-
348
- ### Fixed
349
-
350
- - Support untildify in sqlitePath config variable
351
-
352
- ## [3.4.0] - 2022-06-12
353
-
354
- ### Updated
355
-
356
- - Dependency updates
357
- - Documentation updates
358
- - Added default:, and source: keywords in the models to describe a default value and a source to transform from for GTFS-Realtime
359
- - Filtering all models belonging to GTFS-Realtime from import (but not export) in GTFS
360
-
361
- ### Added
362
-
363
- - Added trips-dates-vehicle-journey.txt model
364
- - GTFS-Realtime Support for VehiclePositions, TripUpdates and ServiceAlerts
365
- - gtfsrealtime-update script - does selective refresh of only GTFS-Realtime data without deleting the database
366
- - updateGtfsRealtime() method - does selective refresh of only GTFS-Realtime data without deleting the database
367
- - getServiceAlerts(..), getStopTimesUpdates(..), getTripUpdates(..), and getVehicleLocations(..) added methods
368
- - advancedQuery, runRawQuery and execRawQuery methods to perform direct database queries
369
-
370
- ## [3.3.1] - 2022-04-29
371
-
372
- ### Added
373
-
374
- - Add support for querying by shape_id
375
-
376
- ## [3.3.0] - 2022-04-26
377
-
378
- ### Changed
379
-
380
- - Switched back to sqlite3 module
381
-
382
- ### Updated
383
-
384
- - Dependency Updates
385
-
386
- ## [3.2.5] - 2022-04-09
387
-
388
- ### Updated
389
-
390
- - Dependency Updates
391
-
392
- ## [3.2.4] - 2022-01-21
393
-
394
- ### Updated
395
-
396
- - Dependency Updates
397
-
398
- ## [3.2.3] - 2022-01-16
399
-
400
- ### Added
401
-
402
- - Implemented case-insensitive columns on import
403
-
404
- ### Updated
405
-
406
- - Dependency Updates
407
-
408
- ## [3.2.2] - 2021-12-28
409
-
410
- ### Updated
411
-
412
- - Dependency Updates
413
-
414
- ## [3.2.1] - 2021-11-26
415
-
416
- ### Updated
417
-
418
- - Updated sqlite3 dependency to use @vscode/sqlite3 for npm audit warning
419
- - Downgraded dtslint to 3.4.2 for npm audit warning
420
-
421
- ## [3.2.0] - 2021-11-21
422
-
423
- ### Added
424
-
425
- - Support for opening multiple sqlite databases
426
- - Basic TypeScript support (Matt Moran)
427
-
428
- ### Updated
429
-
430
- - Readme updates
431
- - Dependency updates
432
-
433
- ## [3.1.4] - 2021-10-17
434
-
435
- ### Added
436
-
437
- - Husky and Prettier
438
-
439
- ### Update
440
-
441
- - Downgraded node-sqlite3 library to released version
442
-
443
- ## [3.1.3] - 2021-10-17
444
-
445
- ### Added
446
-
447
- - Added release-it
448
-
449
- ### Updated
450
-
451
- - Updated pinned node-sqlite3 library
452
-
453
- ## [3.1.2] - 2021-09-25
454
-
455
- ### Changed
456
-
457
- - Switch to recursive-copy library
458
- - Change pinned node-sqlite path
459
-
460
- ### Updated
461
-
462
- - Dependency updates
463
-
464
- ## [3.1.1] - 2021-09-013
465
-
466
- ### Updated
467
-
468
- - Dependency updates - pinned sqlite3 version to solve security issue: https://github.com/mapbox/node-sqlite3/issues/1483
469
-
470
- ## [3.1.0] - 2021-08-02
471
-
472
- ### Changed
473
-
474
- - Added database optimizations to greatly speed up import.
475
-
476
- ### Fixed
477
-
478
- - Fix for timetable_notes_references schema
479
-
480
- ### Updated
481
-
482
- - Dependency updates
483
-
484
- ## [3.0.4] - 2021-06-23
485
-
486
- ### Fixed
487
-
488
- - Fix for timetable_notes_references schema
489
-
490
- ### Updated
491
-
492
- - Dependency updates
493
-
494
- ## [3.0.3] - 2021-06-15
495
-
496
- ### Updated
497
-
498
- - Dependency updates
499
- - Use eslint instead of xo
500
-
501
- ## [3.0.2] - 2021-05-26
502
-
503
- ### Fixed
504
-
505
- - Agency assignment for multi-agency GTFS in getShapesAsGeoJSON
506
-
507
- ### Updated
508
-
509
- - Dependency updates
510
-
511
- ## [3.0.1] - 2021-05-15
512
-
513
- ### Fixed
514
-
515
- - Better error messages for missing config
516
- - Better error messages for invalid paths in config
517
-
518
- ### Changed
519
-
520
- - Updated minimum node.js verstion to 14.17.0
521
- - Added github action tests for node 16
522
- - Dropped github action tests for node 12
523
-
524
- ### Added
525
-
526
- - Tests for invalid path in config
527
-
528
- ### Updated
529
-
530
- - Use copy-dir library
531
- - Dependency updates
532
-
533
- ## [3.0.0] - 2021-05-13
534
-
535
- ### Breaking Changes
536
-
537
- - Converted to ES Module
538
- - Renamed `gtfs.import` to `gtfs.importGtfs`
539
- - Renamed `gtfs.export` to `gtfs.exportGtfs`
540
-
541
- ### Changed
542
-
543
- - Converted to ES Module
544
-
545
- ### Updated
546
-
547
- - Dependency updates
548
-
549
- ## [2.4.4] - 2021-05-07
550
-
551
- ### Updated
552
-
553
- - Dependency updates
554
-
555
- ## [2.4.3] - 2021-03-23
556
-
557
- ### Added
558
-
559
- - Tests for GTFS-ride methods and models
560
-
561
- ### Updated
562
-
563
- - Dependency updates
564
-
565
- ## [2.4.2] - 2021-02-19
566
-
567
- ### Fixed
568
-
569
- - Exclude timestamp fields from export
570
-
571
- ### Updated
572
-
573
- - Dependency updates
574
-
575
- ## [2.4.1] - 2021-02-09
576
-
577
- ### Fixed
578
-
579
- - Updated transfers.txt model
580
-
581
- ### Updated
582
-
583
- - Dependency updates
584
-
585
- ## [2.4.0] - 2021-02-04
586
-
587
- ### Added
588
-
589
- - Support for `gtfsPath`, `gtfsUrl`, `exportPath` and `sqlitePath` parameters for `gtfs-import` and `gtfs-export` scripts.
590
-
591
- ### Changed
592
-
593
- - Removed need for `agency_key` in config.json - use sanitized version of first `agency_name` in agencies.txt
594
-
595
- ### Updated
596
-
597
- - Dependency updates
598
-
599
- ## [2.3.0] - 2021-01-20
600
-
601
- ### Fixed
602
-
603
- - Update getDB test to handle unlimited serviceIds
604
-
605
- ### Updated
606
-
607
- - Readme updates
608
- - Reorganize table creation
609
- - Better SQLite escaping
610
- - Dependency updates
611
-
612
- ### Added
613
-
614
- - GTFS-ride models and methods
615
- - Support for exportPath config option
616
- - Use pluralize library
617
-
618
- ## [2.2.4] - 2020-12-21
619
-
620
- ### Updated
621
-
622
- - Updated github actions to test PRs and node 14.x
623
- - Better default sqlitePath
624
- - Detect TTY and use \n if not
625
- - Better error message when sqlitePath is invalid
626
- - Dependency updates
627
-
628
- ## [2.2.3] - 2020-12-12
629
-
630
- ### Updated
631
-
632
- - Better default GTFS in config-sample.json
633
- - Skip creating tables for excluded files
634
-
635
- ## [2.2.2] - 2020-12-10
636
-
637
- ### Updated
638
-
639
- - Dependency updates (fixes https://github.com/advisories/GHSA-qqgx-2p2h-9c37)
640
-
641
- ## [2.2.1] - 2020-12-06
642
-
643
- ### Updated
644
-
645
- - Improved shapes query
646
-
647
- ## [2.2.0] - 2020-12-05
648
-
649
- ### Updated
650
-
651
- - Use unzipper library to handle poorly formed zip files
652
- - Dependency updates
653
-
654
- ## [2.1.1] - 2020-11-27
655
-
656
- ### Fixed
657
-
658
- - Don't log missing non-standard GTFS files
659
- - Support for multiple agencies in one config file
660
- - Dependency updates
661
-
662
- ## [2.1.0] - 2020-11-10
663
-
664
- ### Added
665
-
666
- - Support for timetable_notes.txt and timetable_notes_references.txt
667
-
668
- ## [2.0.9] - 2020-11-10
669
-
670
- ### Changed
671
-
672
- - Expand model character limit
673
- - Don't require stop_name in stops.txt
674
- - Dependency updates
675
-
676
- ## [2.0.8] - 2020-10-14
677
-
678
- ### Changed
679
-
680
- - Improved validation on import
681
-
682
- ## [2.0.7] - 2020-10-13
683
-
684
- ### Added
685
-
686
- - Support for extended GTFS route types
687
-
688
- ## [2.0.6] - 2020-10-13
689
-
690
- ### Changed
691
-
692
- - Dependency updates
693
-
694
- ### Added
695
-
696
- - Better error formatting
697
- - GTFS import validation and better errors
698
-
699
- ## [2.0.5] - 2020-09-24
700
-
701
- ### Fixed
702
-
703
- - Fix for selecting a single field.
704
-
705
- ## [2.0.4] - 2020-09-20
706
-
707
- ### Added
708
-
709
- - Support for non-standard directions.txt file.
710
- - Added getFareAttributes to README
711
-
712
- ## [2.0.3] - 2020-09-14
713
-
714
- ### Fixed
715
-
716
- - Fix for querying for null
717
-
718
- ## [2.0.2] - 2020-09-06
719
-
720
- ### Changed
721
-
722
- - Dependency updates
723
-
724
- ### Fixed
725
-
726
- - Fix geojson property formatting
727
-
728
- ## [2.0.1] - 2020-08-23
729
-
730
- ### Added
731
-
732
- - Updated model fields to latest GTFS spec
733
- - Test for gtfs.getDb()
734
- - Improved geoJSON generation
735
-
736
- ## [2.0.0] - 2020-08-20
737
-
738
- ### Changed
739
-
740
- - Switched to SQLite
741
- - Breaking changes for all queries
742
- - Updated documentation
743
-
744
- ## [1.10.4] - 2020-07-28
745
-
746
- ### Added
747
-
748
- - `start_time` and `end_time` fields in `timetables.txt`
749
-
750
- ## [1.10.3] - 2020-07-15
751
-
752
- ### Added
753
-
754
- - Improved mongo connection documentation
755
-
756
- ### Fixed
757
-
758
- - Dependency updates
759
-
760
- ## [1.10.2] - 2020-06-08
761
-
762
- ### Added
763
-
764
- - Config option `csvOptions` to pass options to `csv-parse`.
765
-
766
- ## [1.10.1] - 2020-05-10
767
-
768
- ### Fixed
769
-
770
- - Support for zipped GTFS files with subdirectories
771
-
772
- ## [1.10.0] - 2020-04-20
773
-
774
- ### Added
775
-
776
- - Support for exporting GTFS zip files
777
-
778
- ## [1.9.1] - 2019-08-09
779
-
780
- ### Changed
781
-
782
- - Better projections on all queries
783
-
784
- ## [1.9.0] - 2019-08-06
785
-
786
- ### Added
787
-
788
- - `dataExpireAfterSeconds` config option
789
- - `created_at` field on each document
790
-
791
- ### Fixed
792
-
793
- - Removed invalid required fields from models
794
- - Removed `date_last_updated` field from agency
795
-
796
- ## [1.8.9] - 2019-08-06
797
-
798
- ### Changed
799
-
800
- - Logging improvements
801
-
802
- ## [1.8.8] - 2019-08-06
803
-
804
- ### Added
805
-
806
- - Config option for custom logging function
807
-
808
- ## [1.8.7] - 2019-05-20
809
-
810
- ### Changed
811
-
812
- - Use better temp directory for files
813
-
814
- ## [1.8.6] - 2019-05-11
815
-
816
- ### Fixes
817
-
818
- - Remove .git from published npm package
819
-
820
- ## [1.8.5] - 2019-04-09
821
-
822
- ### Changed
823
-
824
- - Prevent timeout on all queries
825
-
826
- ## [1.8.4] - 2019-03-31
827
-
828
- ### Added
829
-
830
- - Index on stop_id
831
-
832
- ### Changed
833
-
834
- - Strip byte-order-markers if present when importing
835
-
836
- ## [1.8.3] - 2019-03-26
837
-
838
- ### Added
839
-
840
- - Support for GET headers
841
-
842
- ## [1.8.2] - 2019-03-11
843
-
844
- ### Changed
845
-
846
- - Renamed config variable to `show_trip_continuation`
847
-
848
- ## [1.8.1] - 2019-02-28
849
-
850
- ### Added
851
-
852
- - Changelog
853
-
854
- ### Changed
855
-
856
- - Fixed issue with geojson consolidation
857
-
858
- ## [1.8.0] - 2019-02-28
859
-
860
- ### Changed
861
-
862
- - Updated all methods so that query objects remain unchanged
863
- - Updated dependencies
864
-
865
- ## [1.0.0] - 2017-07-17
866
-
867
- ### Breaking changes in version 1.0.0
868
-
869
- As of version 1.0.0, all `node-gtfs` methods have changed to accept a query object instead of individual arguments. This allows for all fields of all GTFS files to be queried using this library. Most method names have been changed to be more general and more specific methods have been removed. For example, `getRoutes` now replaces `getRoutesByAgency`, `getRoutesById`, `getRoutesByDistance` and `getRoutesByStop`.
870
-
871
- // Old method with individual arguments, no longer supported in `node-gtfs` 1.0.0
872
- gtfs.getRoutesByStop(agency_key, stop_id)
873
- .then(routes => {
874
- // do something with the array of `routes`
875
- })
876
-
877
- // Query in `node-gtfs` version 1.0.0
878
- gtfs.getRoutes({
879
- stop_id: '123'
880
- })
881
- .then(routes => {
882
- // do something with the array of `routes`
883
- })
884
-
885
- ## [0.11.0] - 2017-07-04
886
-
887
- As of version 0.11.0, `node-gtfs` methods don't support callbacks. Use promises instead:
888
-
889
- gtfs.getAgencies()
890
- .then(agencies => {
891
- // do something with the array of `agencies`
892
- })
893
- .catch(err => {
894
- // handle errors here
895
- });
896
-
897
- Or, you use async/await:
898
-
899
- const myAwesomeFunction = async () => {
900
- try {
901
- const agencies = await gtfs.getAgencies();
902
- } catch (error) {
903
- // handle errors here
904
- }
905
- }