fix(parse): preserve strict column mismatch reasons - #1254
Open
11suixing11 wants to merge 1 commit into
Open
Conversation
11suixing11
force-pushed
the
fix/strict-column-reason
branch
from
July 30, 2026 13:14
38dbc1e to
d94cc37
Compare
11suixing11
force-pushed
the
fix/strict-column-reason
branch
from
July 31, 2026 06:20
d94cc37 to
db9b96b
Compare
Author
|
I re-ran this branch after the upstream rebase. Local verification:
GitHub currently reports the Test and dependency-review workflows as |
Author
|
Additional independent verification for this PR:
A direct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
withHeaders.reasonwhen strict column handling marks a parsed row invalid.data-invalidevent and verify rows, reasons, emitted data, and final row count.Fixes #772.
Why
HeaderTransformeralready creates theColumn header mismatch...reason, butCsvParserStream.transformRow()dropped that reason before emittingdata-invalid. Consumers listening for the thirddata-invalidargument therefore receivedundefinedeven though the mismatch reason was known.There was an earlier closed PR (#1112) for the same issue, but current
mainstill reproduces the behavior. This version adds focused coverage for the exact reported path.Verification
corepack pnpm exec jest packages/parse/__tests__/issues/issue772.spec.ts --runInBandcorepack pnpm test(38 suites, 604 tests, and all examples)corepack pnpm run build(7 workspace projects)corepack pnpm run format:checkgit diff --check