@autobusal/common 1.33.12 → 1.33.13

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,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.33.13
4
+
5
+ ### Fixed
6
+
7
+ - **`RouteItem` no longer advertises "From 0.00"**: zero-fare rows are unpriced legs search never sells, so they no longer count toward the cheapest-of figure. (Audit RT-11b.)
8
+
3
9
  ## 1.33.12
4
10
 
5
11
  ### Added
@@ -25,8 +25,12 @@ const RouteItem = ({ type, route, t }: Props): JSX.Element => {
25
25
  // reformatting `adult` itself - the server already applied this label's
26
26
  // currency symbol/decimal convention, and re-deriving that here would
27
27
  // risk disagreeing with every other price on the site.
28
- const cheapest = route.prices.length > 0
29
- ? route.prices.reduce((min, price) => (price.adult < min.adult ? price : min))
28
+ // Claude - 2026-08-22 (audit finding RT-11b): zero-fare rows are
29
+ // unpriced legs search never sells - see RouteView's matching note.
30
+ const priced = route.prices.filter(price => price.adult > 0);
31
+
32
+ const cheapest = priced.length > 0
33
+ ? priced.reduce((min, price) => (price.adult < min.adult ? price : min))
30
34
  : null;
31
35
 
32
36
  return (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/common",
3
- "version": "1.33.12",
3
+ "version": "1.33.13",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"