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