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
69 changes: 69 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,75 @@ In the spirit of Open Source Software, everyone is very welcome to contribute to
Before contributing to the project, make sure to have a look at our [Code of Conduct](/.github/CODE_OF_CONDUCT.md).


## Development Setup

### Prerequisites

- Node.js >= 24
- npm (comes with Node.js)

### Getting Started

```bash
git clone https://github.com/willfarrell/datastream.git
cd datastream
npm install
```

This installs all dependencies across all workspaces (`packages/*`, `websites/*`, `.github`).


## Project Structure

```
packages/ # npm packages (core, csv, compress, encrypt, etc.)
websites/ # documentation website (datastream.js.org)
.github/ # CI workflows, workflow-specific dependencies
bin/ # build scripts
docs/ # additional documentation
```

Each package in `packages/` has both a Node.js stream implementation (`index.node.js`) and a Web Streams API implementation (`index.web.js`), selected via conditional exports.


## Testing

```bash
# Run all checks (lint, unit, types, sast, perf, dast)
npm test

# Run specific test suites
npm run test:lint # Biome linting
npm run test:unit # Unit tests (both Node.js and Web stream variants)
npm run test:unit:node # Unit tests (Node.js streams only)
npm run test:unit:web # Unit tests (Web Streams API only)
npm run test:types # TypeScript type checking (tstyche)
npm run test:perf # Performance benchmarks (tinybench)
npm run test:dast # Fuzz tests (fast-check)

# Run tests for a single package
node --test ./packages/core
```

Unit tests use Node.js built-in `node:test`. Both `--conditions=node` and `--conditions=webstream` are tested to cover both stream implementations.


## Building

```bash
npm run build
```

Produces dual ESM builds per package via esbuild: `*.node.mjs` (Node.js) and `*.web.mjs` (Web Streams API), both with external source maps.


## Code Style

- Formatting and linting are handled by [Biome](https://biomejs.dev/) (`biome.json`)
- Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/) enforced by commitlint
- Husky pre-commit hooks run linting and tests automatically


## Licence

Licensed under [MIT Licence](LICENSE). Copyright (c) 2026 [will Farrell](https://github.com/willfarrell), and the [datastream team](https://github.com/willfarrell/datastream/graphs/contributors).
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.2.0",
"version": "0.3.1",
"private": true,
"engines": {
"node": ">=24.0"
Expand Down
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

12 changes: 0 additions & 12 deletions docs/PassThrough.md

This file was deleted.

24 changes: 0 additions & 24 deletions docs/Readable.md

This file was deleted.

37 changes: 0 additions & 37 deletions docs/Transform.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/Writable.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/img/datastream-logo.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
72 changes: 0 additions & 72 deletions docs/packages/_example.md

This file was deleted.

Loading
Loading