SIGN IN SIGN UP

refactor(insights): share download data normalization (#4770)

## Description

JSON.stringify previously handled invalid Date values as null through
Date.toJSON before its replacer ran. Normalize
Insights columns and row values once instead so CSV and JSON share
explicit date validation while preserving their existing output: CSV
presents null as an empty field and JSON presents it as null.

```
    Insights result -> normalized export rows --> CSV presenter
                                              \-> JSON presenter
```

## Release note

<!-- User-facing release note. Use "None" if this does not need release
notes. -->
None.

## Migration note

<!-- Upgrade, deployment, config, schema, or compatibility notes. Use
"None" if none. -->
None.

*[Check our Pull Request
Guidelines](https://github.com/inngest/inngest/blob/main/docs/PULL_REQUEST_GUIDELINES.md)*

Co-authored-by: Albert Chae <albertchae@users.noreply.github.com>
A
albertchae committed
1139eb6125101b74d4b30962b0bf2239a0797c1f
Parent: 1f2cf63
Committed by GitHub <noreply@github.com> on 8/24/2026, 5:27:49 PM