• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 32018797734
89%

Build:
DEFAULT BRANCH: main
Ran 17 Aug 2026 10:12AM UTC
Jobs 9
Files 104
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Aug 2026 10:09AM UTC coverage: 88.253%. Remained the same
32018797734

push

github

web-flow
fix(realtime): parse whole-number doubles in toInt transformer (#1718)

## What kind of change does this PR introduce?

Bug fix / hardening.

## What is the current behavior?

The `toInt` transformer in
`packages/realtime_client/lib/src/transformers.dart` falls back to
`int.tryParse(value.toString())`, which returns null for whole-number
doubles such as `1.0` or the string `'1.0'`. In practice Postgres does
not send `1.0` for `int4`/`int8` columns, so this has not caused issues,
but the transformer silently dropped such values instead of converting
them.

## What is the new behavior?

- `double` inputs that are whole numbers (for example `1.0`) now convert
to `int`. Non-finite values and values outside the 64-bit integer range
return null instead of clamping.
- String inputs still try `int.tryParse` first, then accept an integer
with an all-zero decimal fraction (for example `'10.0'` or `'-3.000'`).
The integer part is parsed directly, so values above 2^53 keep exact
precision instead of being rounded through `double`.
- Non-integral values (`10.5`, `'10.5'`), scientific notation (`'1e3'`),
`NaN`, and infinities return null rather than silently truncating or
rounding.

Test cases were added for all of the above, including regression
coverage above 2^53 and outside the 64-bit integer range.

## Additional context

No public API changes, `toInt` is `@internal`.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved numeric conversion for whole-number decimal values, decimal
strings, and scientific notation.
* Invalid, fractional, infinite, out-of-range, and non-numeric values
are now safely rejected.

* **Tests**
* Expanded coverage for valid and invalid numeric formats, including
large values, fractional values, scientific notation, and non-finite
numbers.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

7 of 7 new or added lines in 1 file covered. (100.0%)

5732 of 6495 relevant lines covered (88.25%)

4.11 hits per line

Jobs
ID Job ID Ran Files Coverage
9 supabase_flutter - 32018797734.9 17 Aug 2026 10:12AM UTC 10
81.87
GitHub Action Run
9 supabase_auth - 32009240063.9 17 Aug 2026 08:16AM UTC 27
89.72
GitHub Action Run
9 supabase - 31805117378.9 14 Aug 2026 01:37PM UTC 13
87.19
GitHub Action Run
4 yet_another_json_isolate - 31785069647.4 14 Aug 2026 08:44AM UTC 1
94.44
GitHub Action Run
5 storage_client - 31804163356.5 14 Aug 2026 01:23PM UTC 13
85.03
GitHub Action Run
8 postgrest - 31804163356.8 14 Aug 2026 01:23PM UTC 10
85.46
GitHub Action Run
9 realtime_client - 31804163356.9 14 Aug 2026 01:24PM UTC 11
90.51
GitHub Action Run
6 functions_client - 31804163356.6 14 Aug 2026 01:21PM UTC 3
97.75
GitHub Action Run
4 supabase_common - 31804163356.4 14 Aug 2026 01:21PM UTC 16
99.48
GitHub Action Run
Source Files on build 32018797734
  • Tree
  • List 104
  • Changed 25
  • Source Changed 25
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32018797734
  • 4ccef162 on github
  • Prev Build on main (#32018494325)
  • Next Build on main (#32019233882)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc