Skip to content

fix(csv-generate): allow numeric and null column return types - #529

Closed
xiehuanyi wants to merge 3 commits into
adaltas:masterfrom
xiehuanyi:fix/generate-column-result-types-round3
Closed

xiehuanyi wants to merge 3 commits into
adaltas:masterfrom
xiehuanyi:fix/generate-column-result-types-round3

Conversation

@xiehuanyi

@xiehuanyi xiehuanyi commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

ColumnsFunction requires a string result even though the generator supports strings, numbers and null. Match the declaration to those supported return values and regenerate the distributed declarations.

Convert the existing options.columns.js suite to TypeScript, retaining its string/null/number and invalid-return runtime coverage. This replaces the redundant added API test. The converted suite also exercises the existing Generator.end() method, so its missing end(): void declaration is included.

Validation: restoring the previous ColumnsFunction return type makes the existing converted column test fail to typecheck. npm test --workspace csv-generate passes typechecking and 79 tests (2 existing pending Web Stream tests); npm run lint:check --workspace csv-generate passes with the 2 existing pending-test warnings; npm run build --workspace csv-generate passes.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 18:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread packages/csv-generate/test/api.types.ts Outdated
Comment thread packages/csv-generate/test/options.columns.ts Outdated
@xiehuanyi xiehuanyi closed this Oct 11, 2026
@wdavidw

wdavidw commented Oct 12, 2026

Copy link
Copy Markdown
Member

@xiehuanyi why did you close the PR ?

@xiehuanyi

Copy link
Copy Markdown
Contributor Author

@wdavidw I closed it after the latest CI run failed and I reached my repair time limit. I should have explained that at the time.

Both requested review changes are in aaac3ac: the existing column tests were converted to TypeScript, and the extra runtime guard was removed. The csv-generate tests passed. The failed Node 22 job was in csv-parse, where group_columns_by_name expected “an boolean” but received “a boolean”. I stopped without clearing and verifying that failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants