This repository prepares two publishable npm packages under dist/npm/:
@prisma/streams-local@prisma/streams-server
@prisma/streams-local is the Node/Bun local runtime intended for @prisma/dev
and other trusted local workflows.
@prisma/streams-server is the Bun-only self-hosted server package and CLI.
Release branch policy:
- Always cut and publish releases from
mainonly. - Do not run
release.ymlagainst feature branches or temporary release branches. - Merge the release changes into
mainfirst, then dispatch the release workflow frommain.
- Ensure npm trusted publishing is configured for both packages:
@prisma/streams-local@prisma/streams-server
For each package on npmjs.com, add a GitHub Actions trusted publisher with:
- Organization or user:
prisma - Repository:
streams - Workflow filename:
release.yml
The workflow cannot publish new versions until both packages trust this repository workflow.
- Run repository verification:
bun run verify
bun run test:conformance
bun run test:conformance:local- Run the package-level smoke tests:
bun run test:node-local-package
bun run test:bun-local-package
bun run test:bun-server-packageThese tests build the generated package directories, pack them, install them into temporary consumers, and verify:
- Node end-to-end usage of
@prisma/streams-local - Bun end-to-end usage of
@prisma/streams-localon Bun1.2.xand newer, including the live/touch/*path - stateful local-runtime reopen flows that must read
/_schemaand skip duplicate first-schema installs when the registry already matches - local package exposure of
GET /v1/server/_detailsandGET /v1/stream/{name}/_routing_keys - Bun CLI startup for
@prisma/streams-server - package exposure of the
@prisma/streams-server/computeCompute entrypoint
- Build the publishable package directories:
bun run build:npm-packagesThis produces:
dist/README.mddist/local/*.jsdist/touch/processor_worker.jsdist/types/local/*.d.tsdist/npm/streams-local/**dist/npm/streams-server/**
- Inspect the package contents:
(cd ./dist/npm/streams-local && bun pm pack --dry-run)
(cd ./dist/npm/streams-server && bun pm pack --dry-run)- Publish the packages:
npm publish --access public ./dist/npm/streams-local
npm publish --access public ./dist/npm/streams-serverOr use the repository release workflow from main only:
gh workflow run release.yml --ref mainThe GitHub workflow builds, validates, and publishes both packages with npm trusted publishing and provenance enabled.
The workflow currently runs the full repository validation on ubuntu-latest
and package smoke checks on macOS. This avoids a Bun teardown crash seen on the
macOS GitHub Actions runner while still verifying that the publishable package
shapes work on macOS before release.
The release pipeline is intentionally split:
scripts/build-local-node.mjsgenerates the local runtime artifacts indist/scripts/build-npm-packages.mjsassembles the publishable package directories indist/npm/@prisma/streams-localpublishes only generated local runtime artifacts, local API declarations, runtime dependencies, and package docs@prisma/streams-serverpublishes a Bun CLI wrapper plus the Bun-oriented source runtime needed by the full server
For @prisma/streams-local, the build intentionally:
- emits shared chunks under
dist/local/soindex.jsanddaemon.jsdo not each embed their own copy of the runtime - keeps the local runtime Bun-compatible even though the generated bundle targets the Node module surface
- publishes a local-package Bun engine floor of
>=1.2.0while keeping the full server on the repository Bun floor - pins the embedded local runtime to the built-in
1024 MBauto-tune preset so Prisma CLI gets a predictable cache and concurrency budget - keeps npm dependencies external instead of rebundling them into the local package tarball
- publishes only the runtime dependency subset the local package actually
imports, rather than copying the repository-wide dependency list into
@prisma/streams-local
@prisma/dev should not depend on the full Bun server package when it only
needs the local runtime.
The split gives you:
@prisma/streams-localfor Node and Bun local embedding@prisma/streams-serverforbunxand Bun-based self-hosting
@prisma/streams-localsupports Bun>=1.2.0and Node>=22@prisma/streams-local/internal/daemonis intentionally internal@prisma/streams-serveris Bun-only@prisma/streams-server/computestarts the Compute server entrypoint from a package consumer and injects the Compute object-store and auto-tune defaults- the root repository package is still private and is not the publish target