minotor 11.5.0 → 11.5.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- # [11.5.0](https://github.com/aubryio/minotor/compare/v11.4.0...v11.5.0) (2026-07-25)
1
+ ## [11.5.1](https://github.com/aubryio/minotor/compare/v11.5.0...v11.5.1) (2026-10-19)
2
2
 
3
3
 
4
- ### Features
4
+ ### Bug Fixes
5
5
 
6
- * sibling stops transfers ([#75](https://github.com/aubryio/minotor/issues/75)) ([22919e5](https://github.com/aubryio/minotor/commit/22919e5fb411b066ff5305c928dd00ce677dda25)), closes [#59](https://github.com/aubryio/minotor/issues/59)
6
+ * fastest route should pick the earliest departure in case of tie. ([#77](https://github.com/aubryio/minotor/issues/77)) ([25144b9](https://github.com/aubryio/minotor/commit/25144b9ac4ec4ce268007a2f29233bc2a8e65658))
package/dist/cli.mjs CHANGED
@@ -22925,9 +22925,9 @@ class RangeResult {
22925
22925
  * the shortest travel duration (arrival time − origin departure time) across
22926
22926
  * all Pareto-optimal runs.
22927
22927
  *
22928
- * Unlike {@link bestRoute}, which returns the route that departs as late as
22929
- * possible while still arriving early, this method minimizes total time
22930
- * spent traveling.
22928
+ * When durations tie, the earliest departure is preferred.
22929
+ * Unlike {@link bestRoute}, which minimizes arrival time, this method
22930
+ * minimizes total time spent traveling.
22931
22931
  *
22932
22932
  * Defaults to this result's own destination stop(s) when `to` is omitted.
22933
22933
  * Always pass an explicit `to` stop when operating in full-network mode
@@ -22947,7 +22947,10 @@ class RangeResult {
22947
22947
  if (arrival === undefined)
22948
22948
  continue;
22949
22949
  const duration = arrival.arrival - run.departureTime;
22950
- if (duration < shortestDuration) {
22950
+ if (duration < shortestDuration ||
22951
+ (duration === shortestDuration &&
22952
+ fastestRun !== undefined &&
22953
+ run.departureTime < fastestRun.departureTime)) {
22951
22954
  shortestDuration = duration;
22952
22955
  fastestRun = run;
22953
22956
  }