Skip to content

feat(csv-parse): add an async iterator API - #534

Open
Aurantium-47 wants to merge 1 commit into
adaltas:masterfrom
Aurantium-47:codex/parse-async-iterator
Open

Aurantium-47 wants to merge 1 commit into
adaltas:masterfrom
Aurantium-47:codex/parse-async-iterator

Conversation

@Aurantium-47

Copy link
Copy Markdown

Implements the async-generator interface requested in #447 as csv-parse/iterator, with a browser ESM entry and the existing CJS/IIFE/UMD distributions. It reuses the parsing core, yields every record before requesting another input chunk, flushes the final record, and closes the input on consumer cancellation or parser limits. Includes non-stream option types, documentation and an executable sample.

Validation: 21 focused tests; 641 package tests passed with 3 existing pending tests; build, types and focused lint passed. Packed ESM/CJS consumers and NodeNext declarations passed. Real file roundtrips use one-byte chunks, and Edge runs the packed ESM/IIFE/UMD entries with native fetch, Unicode/BOM splits, cancellation and error checks. The Windows package-suite run uses a temporary path adapter for four existing test/sample fixtures; the new focused and packed/browser checks run without it.

One existing assertion changes only an boolean to a boolean, matching the production message already accepted in #525. The full error-code/message assertion remains intact; production normalization is unchanged.

Implemented and tested with AI assistance (Codex). No performance improvement is claimed.

Parse asynchronous chunk iterables with the existing CSV core, including EOF, early termination, types, packaged distributions, tests and documentation.

Refs: adaltas#447

Assisted-by: OpenAI GPT-6 <noreply@openai.com>
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.

1 participant