Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/github-workflows",
"version": "0.1.5",
"version": "0.1.6",
"private": true,
"engines": {
"node": ">=24.0"
Expand Down
240 changes: 120 additions & 120 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/monorepo",
"version": "0.1.5",
"version": "0.1.6",
"description": "Streams made easy.",
"private": true,
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions packages/aws/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/aws",
"version": "0.1.5",
"version": "0.1.6",
"description": "AWS service streaming integrations for S3, DynamoDB, Lambda, SNS, and SQS",
"type": "module",
"engines": {
Expand Down Expand Up @@ -122,7 +122,7 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5"
"@datastream/core": "0.1.6"
},
"peerDependencies": {
"@aws-sdk/client-dynamodb": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/base64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/base64",
"version": "0.1.5",
"version": "0.1.6",
"description": "Base64 encoding and decoding transform streams",
"type": "module",
"engines": {
Expand Down Expand Up @@ -60,6 +60,6 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5"
"@datastream/core": "0.1.6"
}
}
4 changes: 2 additions & 2 deletions packages/charset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/charset",
"version": "0.1.5",
"version": "0.1.6",
"description": "Character encoding detection, decoding, and conversion streams",
"type": "module",
"engines": {
Expand Down Expand Up @@ -108,7 +108,7 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5",
"@datastream/core": "0.1.6",
"charset-detector": "0.0.2",
"iconv-lite": "0.7.2"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/compress/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/compress",
"version": "0.1.5",
"version": "0.1.6",
"description": "Compression and decompression streams for gzip, deflate, brotli, and zstd",
"type": "module",
"engines": {
Expand Down Expand Up @@ -140,7 +140,7 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5"
"@datastream/core": "0.1.6"
},
"peerDependencies": {
"brotli-wasm": "3.0.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/index.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@ export const createTransformStream = (transform, flush, streamOptions) => {
{
start() {},
async transform(chunk, controller) {
const enqueue = (chunk, encoding) => {
controller.enqueue(chunk, encoding);
const enqueue = (chunk) => {
controller.enqueue(chunk);
};
await transform(chunk, enqueue);
},
async flush(controller) {
if (flush) {
const enqueue = (chunk, encoding) => {
controller.enqueue(chunk, encoding);
const enqueue = (chunk) => {
controller.enqueue(chunk);
};
await flush(enqueue);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/core",
"version": "0.1.5",
"version": "0.1.6",
"description": "Stream creation utilities and pipeline functions for Web Streams API and Node.js streams",
"type": "module",
"engines": {
Expand Down Expand Up @@ -61,6 +61,6 @@
"homepage": "https://datastream.js.org",
"dependencies": {},
"devDependencies": {
"@datastream/object": "0.1.5"
"@datastream/object": "0.1.6"
}
}
5 changes: 0 additions & 5 deletions packages/csv/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ const csvParseInline = (text, ctx, isFlushing, enqueue) => {

if (closeQ === -1) {
// Unterminated quote
pos = len;
if (isFlushing) {
trackError("UnterminatedQuote", "Unterminated quoted field");
const raw = text.substring(contentStart);
Expand Down Expand Up @@ -339,7 +338,6 @@ const csvParseInline = (text, ctx, isFlushing, enqueue) => {

if (closeQ === -1) {
// Unterminated quote
pos = len;
const raw = text.substring(contentStart);
const field = hasEscape ? raw.replaceAll(escapedQuote, quoteChar) : raw;
if (isFlushing) {
Expand Down Expand Up @@ -455,7 +453,6 @@ const csvParseInline = (text, ctx, isFlushing, enqueue) => {
rowEnd = text.indexOf(newlineChar, pos);
}
if (pos >= len) {
pos = len;
break;
}
// Partial row without newline: fall through to regular path
Expand All @@ -481,7 +478,6 @@ const csvParseInline = (text, ctx, isFlushing, enqueue) => {
fieldStart = pos;
fields = rowTpl.slice();
if (pos >= len) {
pos = len;
break;
}
// Re-enter the fast path via continue outer
Expand Down Expand Up @@ -522,7 +518,6 @@ const csvParseInline = (text, ctx, isFlushing, enqueue) => {
continue;
}

pos = len;
break;
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/csv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/csv",
"version": "0.1.5",
"version": "0.1.6",
"description": "CSV parsing and formatting transform streams",
"type": "module",
"engines": {
Expand Down Expand Up @@ -63,7 +63,7 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5",
"@datastream/object": "0.1.5"
"@datastream/core": "0.1.6",
"@datastream/object": "0.1.6"
}
}
4 changes: 2 additions & 2 deletions packages/digest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/digest",
"version": "0.1.5",
"version": "0.1.6",
"description": "Cryptographic hash digest pass-through streams",
"type": "module",
"engines": {
Expand Down Expand Up @@ -60,7 +60,7 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5",
"@datastream/core": "0.1.6",
"hash-wasm": "4.12.0"
}
}
2 changes: 1 addition & 1 deletion packages/fetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const nextLinkRegExp = /<(.*?)>; rel="next"/;

async function* fetchJson(options, streamOptions) {
const { dataPath, nextPath } = options;
let { url } = options;
let url;

while (options.url) {
const response =
Expand Down
4 changes: 2 additions & 2 deletions packages/fetch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/fetch",
"version": "0.1.5",
"version": "0.1.6",
"description": "HTTP fetch-based readable and writable streams with pagination and rate limiting",
"type": "module",
"engines": {
Expand Down Expand Up @@ -60,6 +60,6 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5"
"@datastream/core": "0.1.6"
}
}
12 changes: 5 additions & 7 deletions packages/file/index.perf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { unlinkSync, writeFileSync } from "node:fs";
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import test from "node:test";
Expand All @@ -10,14 +10,15 @@ import { Bench } from "tinybench";

const time = Number(process.env.BENCH_TIME ?? 5_000);

const tmpFile = join(tmpdir(), "datastream-perf-test.csv");
const tmpDir = mkdtempSync(join(tmpdir(), "datastream-perf-"));
const tmpFile = join(tmpDir, "test.csv");
const bigString = Array.from(
{ length: 10_000 },
(_, i) => `${i},item_${i},${Math.random()}`,
).join("\n");
writeFileSync(tmpFile, bigString);

const tmpOutFile = join(tmpdir(), "datastream-perf-test-out.csv");
const tmpOutFile = join(tmpDir, "test-out.csv");

// -- Tests --

Expand Down Expand Up @@ -65,9 +66,6 @@ test("perf: fileReadStream → fileWriteStream roundtrip", async () => {
// Cleanup
test("cleanup temp files", () => {
try {
unlinkSync(tmpFile);
} catch {}
try {
unlinkSync(tmpOutFile);
rmSync(tmpDir, { recursive: true });
} catch {}
});
4 changes: 2 additions & 2 deletions packages/file/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/file",
"version": "0.1.5",
"version": "0.1.6",
"description": "File system readable and writable streams with extension type enforcement",
"type": "module",
"engines": {
Expand Down Expand Up @@ -60,6 +60,6 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5"
"@datastream/core": "0.1.6"
}
}
4 changes: 2 additions & 2 deletions packages/indexeddb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/indexeddb",
"version": "0.1.5",
"version": "0.1.6",
"description": "IndexedDB readable and writable streams for browser storage",
"type": "module",
"engines": {
Expand Down Expand Up @@ -60,7 +60,7 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5",
"@datastream/core": "0.1.6",
"idb": "8.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/ipfs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/ipfs",
"version": "0.1.5",
"version": "0.1.6",
"description": "IPFS get and add streaming operations",
"type": "module",
"engines": {
Expand Down Expand Up @@ -61,6 +61,6 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5"
"@datastream/core": "0.1.6"
}
}
4 changes: 2 additions & 2 deletions packages/object/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/object",
"version": "0.1.5",
"version": "0.1.6",
"description": "Object transform streams for picking, omitting, pivoting, batching, and key mapping",
"type": "module",
"engines": {
Expand Down Expand Up @@ -60,6 +60,6 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5"
"@datastream/core": "0.1.6"
}
}
4 changes: 2 additions & 2 deletions packages/string/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/string",
"version": "0.1.5",
"version": "0.1.6",
"description": "String transform streams for splitting, replacing, counting, and deduplication",
"type": "module",
"engines": {
Expand Down Expand Up @@ -60,6 +60,6 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5"
"@datastream/core": "0.1.6"
}
}
4 changes: 2 additions & 2 deletions packages/validate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datastream/validate",
"version": "0.1.5",
"version": "0.1.6",
"description": "JSON Schema validation transform streams using Ajv",
"type": "module",
"engines": {
Expand Down Expand Up @@ -60,7 +60,7 @@
},
"homepage": "https://datastream.js.org",
"dependencies": {
"@datastream/core": "0.1.5",
"@datastream/core": "0.1.6",
"ajv-cmd": "0.10.0"
}
}
2 changes: 1 addition & 1 deletion websites/datastream.js.org/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "datastream.js.org",
"description": "SvelteKit SSR",
"private": true,
"version": "0.1.5",
"version": "0.1.6",
"type": "module",
"scripts": {
"start": "vite dev",
Expand Down
Loading