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 +3 -3
- package/dist/cli.mjs +7 -4
- package/dist/cli.mjs.map +1 -1
- package/dist/router.cjs.js +1 -1
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.esm.js +1 -1
- package/dist/router.esm.js.map +1 -1
- package/dist/router.umd.js +1 -1
- package/dist/router.umd.js.map +1 -1
- package/dist/routing/rangeResult.d.ts +3 -3
- package/package.json +1 -1
- package/src/routing/__tests__/rangeRouter.test.ts +19 -0
- package/src/routing/rangeResult.ts +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## [11.5.1](https://github.com/aubryio/minotor/compare/v11.5.0...v11.5.1) (2026-10-19)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
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
|
-
*
|
|
22929
|
-
*
|
|
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
|
}
|