Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use csv-parse's sync API throughout the scripts #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bickelj
Copy link
Collaborator

@bickelj bickelj commented Jun 27, 2023

Without this change there would be two CSV reading libraries in use and two scripts would continue to have race conditions. We do not need the sophistication of a stream API because we have yet to see any CSVs larger than a few MiB. This change uses the technique already present in the postProposalVersions.ts script in the older two scripts.

Because there would be repeated boilerplate otherwise, a new csv.ts has the commonly used type and type assertion guard.

Issue #25 Race between row and EOF events for forms and proposals

Without this change there would be two CSV reading libraries in use
and two scripts would continue to have race conditions. We do not need
the sophistication of a stream API because we have yet to see any CSVs
larger than a few MiB. This change uses the technique already present in
the `postProposalVersions.ts` script in the older two scripts.

Because there would be repeated boilerplate otherwise, a new `csv.ts`
has the commonly used type and type assertion guard.

Issue #25 Race between row and EOF events for forms and proposals
@bickelj bickelj requested a review from jasonaowen June 27, 2023 20:13
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.

None yet

1 participant