{"id":23318555,"url":"https://github.com/ericc-ch/ritzen","last_synced_at":"2026-01-31T10:31:12.027Z","repository":{"id":245721960,"uuid":"819008559","full_name":"ericc-ch/ritzen","owner":"ericc-ch","description":"Fast concurrent file writer powered by Bun","archived":false,"fork":false,"pushed_at":"2024-07-20T12:53:05.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T22:43:05.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ritzen","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericc-ch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-23T14:12:20.000Z","updated_at":"2024-07-20T12:53:08.000Z","dependencies_parsed_at":"2024-07-20T14:05:28.181Z","dependency_job_id":"6febe241-659e-4fb6-a8b9-528feaeefdf7","html_url":"https://github.com/ericc-ch/ritzen","commit_stats":null,"previous_names":["ericc-ch/tulis","ericc-ch/ritzen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericc-ch/ritzen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fritzen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fritzen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fritzen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fritzen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericc-ch","download_url":"https://codeload.github.com/ericc-ch/ritzen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fritzen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28938529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-20T17:17:24.401Z","updated_at":"2026-01-31T10:31:12.014Z","avatar_url":"https://github.com/ericc-ch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ritzen\n\n\u003e Fast concurrent file writer, similar to [steno](https://github.com/typicode/steno)\n\n## Installation\n\n```bash\nbun install ritzen\n```\n\n## Features\n\n- Fast, uses `Bun.write` (Node currently not supported)\n- Type safe, written in TypeScript\n- Lightweight (~4kB)\n- Handles race condition and unnecessary writes\n\n## Usage\n\n```typescript\nimport { Writer } from \"ritzen\";\n\n// Creates a new writer instance\nconst writer = new Writer(\"file.txt\");\n\n// Also supports file URL\nconst writerUrl = new Writer(\"file://file.txt\");\n\n// ritzen will handle the race condition\n// Writes are always in order\nconst promises = Array(1000)\n  .fill(0)\n  .map((_, i) =\u003e ritzen.write(`${data}${i}`));\n\nawait Promise.all(promises);\n```\n\n## Benchmark\n\n`bun run benchmark` (see `scripts/benchmark.ts`)\n\n```plaintext\nWrite 1KB data to the same file x 1000\n[85.90ms] fs\n[5.22ms] ritzen\n\nWrite 1MB data to the same file x 1000\n[722.67ms] fs\n[5.40ms] ritzen\n\nWrite 10MB data to the same file x 1000\n[5.71s] fs\n[35.41ms] ritzen\n\nCheck if the files are identical:  ✓\n```\n\n## FAQ\n\n**Comparison with steno**\nPlease write an issue if missed something\n\n| Feature            | ritzen | steno |\n| ------------------ | ----- | ----- |\n| TypeScript         | ✓     | ✓     |\n| No Race Conditions | ✓     | ✓     |\n| Atomic Writes      | ✗     | ✓     |\n| Automatic Retry    | ✗     | ✓     |\n| Package Size       | 4kB   | 6kB   |\n\n**Will Node.js get supported?**\nYes, when Bun supports [polyfilling `bun:` modules for Node](https://bun.sh/docs/bundler#target)\n\n**Why this instead of steno?**\nritzen uses `Bun.write` instead of Node's `writeFile`, which is faster. See [benchmarks](#benchmark)\n\n## Credits\n\nHeavily inspired by [steno](https://github.com/typicode/steno)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericc-ch%2Fritzen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericc-ch%2Fritzen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericc-ch%2Fritzen/lists"}