All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Use unzipper library to handle poorly formed zip files
- Dependency updates
- Don't log missing non-standard GTFS files
- Support for multiple agencies in one config file
- Dependency updates
- Support for timetable_notes.txt and timetable_notes_references.txt
- Expand model character limit
- Don't require stop_name in stops.txt
- Dependency updates
- Improved validation on import
- Support for extended GTFS route types
- Dependency updates
- Better error formatting
- GTFS import validation and better errors
- Fix for selecting a single field.
- Support for non-standard directions.txt file.
- Added getFareAttributes to README
- Fix for querying for null
- Dependency updates
- Fix geojson property formatting
- Updated model fields to latest GTFS spec
- Test for gtfs.getDb()
- Improved geoJSON generation
- Switched to SQLite
- Breaking changes for all queries
- Updated documentation
start_time
andend_time
fields intimetables.txt
- Improved mongo connection documentation
- Dependency updates
- Config option
csvOptions
to pass options tocsv-parse
.
- Support for zipped GTFS files with subdirectories
- Support for exporting GTFS zip files
- Better projections on all queries
dataExpireAfterSeconds
config optioncreated_at
field on each document
- Removed invalid required fields from models
- Removed
date_last_updated
field from agency
- Logging improvements
- Config option for custom logging function
- Use better temp directory for files
- Remove .git from published npm package
- Prevent timeout on all queries
- Index on stop_id
- Strip byte-order-markers if present when importing
- Support for GET headers
- Renamed config variable to
show_trip_continuation
- Changelog
- Fixed issue with geojson consolidation
- Updated all methods so that query objects remain unchanged
- Updated dependencies
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
.
// Old method with individual arguments, no longer supported in `node-gtfs` 1.0.0
gtfs.getRoutesByStop(agency_key, stop_id)
.then(routes => {
// do something with the array of `routes`
})
// Query in `node-gtfs` version 1.0.0
gtfs.getRoutes({
agency_key: 'caltrain',
stop_id: '123'
})
.then(routes => {
// do something with the array of `routes`
})
As of version 0.11.0, node-gtfs
methods don't support callbacks. Use promises instead:
gtfs.getAgencies()
.then(agencies => {
// do something with the array of `agencies`
})
.catch(err => {
// handle errors here
});
Or, you use async/await:
const myAwesomeFunction = async () => {
try {
const agencies = await gtfs.getAgencies();
} catch (error) {
// handle errors here
}
}