β¨ Highlights
π Streaming upload
FilesAPI.upload() now streams a chunked multipart/form-data body instead of buffering the entire payload in memory. No more OOM cliff at ~200 MB. Safe for arbitrarily large files.
π Fixed: task.type is no longer empty
client.getTask(id) previously hardcoded task.type = "". With api 1.38.5+, the SDK reads the new type field from /v1/tasks/{id} and populates the Task instance correctly. Older API deployments still fall back to "" gracefully.
π§ New public API
HttpClient.postStream(path, body, contentType, extraHeaders?)β streaming POST. Skips retry (consumed streams can't be replayed).- New named exports:
buildMultipartStream,sanitizeFilename. TaskStatusResponse.type?: stringtyped for the new API response shape.
β οΈ Behaviour change
Uploads previously could be retried up to 3 times on transient network failures because the body was a fully-buffered FormData. Streamed uploads cannot be replayed, so a failed upload now surfaces the error immediately. All other operations retain the existing retry behaviour (3 retries, exponential backoff on 408/500/502/503/504).
π§ͺ Tests
90 tests passing (12 new streaming tests covering binary byte preservation, chunk boundaries, large-input streaming, source-stream error propagation, sanitized filename, multipart envelope structure).
π Security
- 0 npm audit vulnerabilities (vite 7.3.1 β 7.3.2, postcss 8.5.6 β 8.5.15, brace-expansion transitive bump).
π¦ Install
npm install conversiontools@2.1.0Full Changelog: v2.0.4...v2.1.0