minotor 12.0.1 → 13.0.1

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 (48) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/README.md +7 -4
  3. package/dist/cli/perf.d.ts +4 -4
  4. package/dist/cli.mjs +1558 -1488
  5. package/dist/cli.mjs.map +1 -1
  6. package/dist/gtfs/__tests__/logging.test.d.ts +1 -0
  7. package/dist/gtfs/logging.d.ts +8 -0
  8. package/dist/parser.cjs.js +108 -98
  9. package/dist/parser.cjs.js.map +1 -1
  10. package/dist/parser.d.ts +4 -2
  11. package/dist/parser.esm.js +108 -99
  12. package/dist/parser.esm.js.map +1 -1
  13. package/dist/router.cjs.js +1 -1
  14. package/dist/router.cjs.js.map +1 -1
  15. package/dist/router.d.ts +2 -1
  16. package/dist/router.esm.js +1 -1
  17. package/dist/router.esm.js.map +1 -1
  18. package/dist/router.umd.js +1 -1
  19. package/dist/router.umd.js.map +1 -1
  20. package/dist/routing/rangeResult.d.ts +34 -25
  21. package/dist/routing/result.d.ts +28 -9
  22. package/dist/routing/resultInternals.d.ts +4 -0
  23. package/dist/routing/routingResult.d.ts +29 -0
  24. package/package.json +1 -1
  25. package/src/cli/minotor.ts +4 -12
  26. package/src/cli/perf.ts +5 -5
  27. package/src/cli/repl.ts +1 -1
  28. package/src/gtfs/__tests__/logging.test.ts +100 -0
  29. package/src/gtfs/frequencies.ts +1 -2
  30. package/src/gtfs/logging.ts +15 -0
  31. package/src/gtfs/parser.ts +1 -2
  32. package/src/gtfs/routes.ts +1 -2
  33. package/src/gtfs/stops.ts +1 -2
  34. package/src/gtfs/transfers.ts +1 -2
  35. package/src/gtfs/trips.ts +1 -2
  36. package/src/parser.ts +4 -0
  37. package/src/router.ts +3 -0
  38. package/src/routing/__tests__/plotter.test.ts +0 -11
  39. package/src/routing/__tests__/rangeResult.test.ts +1470 -46
  40. package/src/routing/__tests__/rangeRouter.test.ts +14 -8
  41. package/src/routing/__tests__/result.test.ts +375 -76
  42. package/src/routing/plainRouter.ts +1 -6
  43. package/src/routing/plotter.ts +6 -5
  44. package/src/routing/rangeResult.ts +67 -52
  45. package/src/routing/rangeRouter.ts +3 -8
  46. package/src/routing/result.ts +95 -36
  47. package/src/routing/resultInternals.ts +5 -0
  48. package/src/routing/routingResult.ts +34 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- ## [12.0.1](https://github.com/aubryio/minotor/compare/v12.0.0...v12.0.1) (2026-10-24)
1
+ ## [13.0.1](https://github.com/aubryio/minotor/compare/v13.0.0...v13.0.1) (2026-11-18)
2
2
 
3
3
 
4
- ### Performance Improvements
4
+ ### Bug Fixes
5
5
 
6
- * memory quick wins (reduce retained buffers, array allocations, etc.) ([#80](https://github.com/aubryio/minotor/issues/80)) ([d8371f6](https://github.com/aubryio/minotor/commit/d8371f6150b328c00cc9466e057bebf5cac0a8a0))
6
+ * expose parser logging settings ([#83](https://github.com/aubryio/minotor/issues/83)) ([212105b](https://github.com/aubryio/minotor/commit/212105bbf7cbbbe4d21d0230033671f2fd8149b7))
package/README.md CHANGED
@@ -126,6 +126,8 @@ const route = result.bestRoute(); // Route | undefined
126
126
 
127
127
  // Earliest arrival at any individual stop (useful for isochrone computation)
128
128
  const arrival = result.arrivalAt(stop.id); // { arrival: Time, legNumber: number } | undefined
129
+ // Earliest arrival at every reachable stop
130
+ const arrivals = result.arrivals();
129
131
  ```
130
132
 
131
133
  Query options:
@@ -166,11 +168,12 @@ for (const { departureTime, result } of rangeResult) {
166
168
  const earliest = rangeResult.bestRoute(); // earliest arrival
167
169
  const latest = rangeResult.latestDepartureRoute(); // latest possible departure
168
170
  const fastest = rangeResult.fastestRoute(); // shortest travel duration
169
- const all = rangeResult.getRoutes(); // all routes, earliest-departure-first
171
+ const all = rangeResult.routes(); // lazy iterator, earliest-departure-first
170
172
 
171
- // Earliest arrival at every reachable stop across all runs
172
- const arrivals = rangeResult.allEarliestArrivals(); // Map<StopId, Arrival>
173
- const durations = rangeResult.allShortestDurations(); // Map<StopId, DurationArrival>
173
+ // Earliest arrival at every reachable stop
174
+ const arrivals = rangeResult.arrivals();
175
+ // Shortest duration to every reachable stop
176
+ const durations = rangeResult.shortestDurations();
174
177
  ```
175
178
 
176
179
  ### CLI Usage
@@ -87,18 +87,18 @@ export declare const testBestRoutePerformance: (router: Router, tasks: Query[],
87
87
  */
88
88
  export declare const testRangeRouterPerformance: (router: Router, tasks: RangeQuery[], iterations: number, stopsIndex: StopsIndex) => PerformanceResult[];
89
89
  /**
90
- * Benchmarks {@link RangeResult.getRoutes} — the full Pareto-frontier
90
+ * Benchmarks {@link RangeResult.routes} — the full Pareto-frontier
91
91
  * reconstruction phase — independently of the range routing phase.
92
92
  *
93
93
  * @param router - The router instance used to produce the range results that
94
- * are then fed into `getRoutes`.
94
+ * are then fed into `routes`.
95
95
  * @param tasks - The list of range queries to benchmark. One
96
96
  * {@link PerformanceResult} is produced per query.
97
- * @param iterations - Number of times `getRoutes` is called per query.
97
+ * @param iterations - Number of times `routes` is fully consumed per query.
98
98
  * @param stopsIndex - Used to resolve stop names for result labels.
99
99
  * @returns An array of {@link PerformanceResult} objects, one per query, each
100
100
  * containing the mean wall-clock time (µs) and mean heap and ArrayBuffer deltas (MiB) for the
101
- * `getRoutes` call alone.
101
+ * full `routes` iteration alone.
102
102
  */
103
103
  export declare const testRangeResultPerformance: (router: Router, tasks: RangeQuery[], iterations: number, stopsIndex: StopsIndex) => PerformanceResult[];
104
104
  /**