Skip to content

Fix stale in-repo READMEs #255

Closed

Description

@adenhertog

Several READMEs describe APIs that no longer exist, and 6 of the 11 READMEs with TypeScript examples don't compile against master (checked with tsc, strict, nodenext, against the built packages). This issue fixes them and gives every package README the same shape, with the docs site (#250, merged in #318) as the source of truth.

Depends on: #250, merged in #318: VitePress in docs/ (base is /bus/), hosted on GitHub Pages at https://node-ts.github.io/bus, with snippets in docs/snippets/**/*.ts. Start after #295 merges, since it rewrites four of these READMEs.
Blocks: #256, which owns the root README's pitch, above-the-fold example, badges and npm metadata, and #263.

Decisions

README template

# @node-ts/<package>

<One sentence: what it is, and which @node-ts/bus extension point it fills.>

[![npm](https://img.shields.io/npm/v/@node-ts/<package>)](https://www.npmjs.com/package/@node-ts/<package>)

**[Documentation](https://node-ts.github.io/bus/<page for this package>)** · [Changelog](https://github.com/node-ts/bus/blob/master/packages/<package>/CHANGELOG.md)

## Installation

Requires Node.js 24 or later.

    npm i @node-ts/<package> @node-ts/bus-core <required peers>

## Usage

<The smallest complete example, synced from docs/snippets: imports, construct, register with Bus.configure(), build(), initialize(), start().>

## Configuration        <!-- adapters only -->

<An Option | Default | Description table that matches the configuration interface's JSDoc and @default values.>

## Learn more

- <2 to 4 links to the relevant site pages>

Rules:

  • Use only absolute URLs, because npm doesn't resolve relative links. Link to the latest docs.
  • Don't include a Development section, or Discussions, support or community links.
  • Short warnings the user needs before first use stay in, such as "set persistentMessages: true in production". Other behaviour goes on the site.

Findings

Status: ✅ already fixed on master · 🔀 fixed in #295 · ➡️ handed to another issue · blank = to do here.

Status File Issue Fix
🔀 README.md The components list includes bus-class-serializer and is missing bus-cli #295 makes this change
README.md The components list is missing bus-sqs-lambda and bus-test List every published package, one line each
README.md The scripts list names a nonexistent bootstrap and omits test:unit, test:integration, format:check, check:packages Fix the list, or replace it with a link to CONTRIBUTING.md
✅ README.md The original issue said lint doesn't exist #293 added lint, so that entry is now correct
README.md Says "Rabbit MQ" Change to "RabbitMQ"
➡️ README.md No badges, pitch or example #256
🔀 packages/bus-core/README.md Bus.configure().initialize() doesn't compile because BusConfiguration has no initialize Fixed in #295 (use .build(), then bus.initialize() and bus.start())
packages/bus-core/README.md No handler example Add a handlerFor plus send example
packages/bus-core/README.md Claims Azure Queues, SQL Server and Oracle adapters List the real adapters, or just link the site
packages/bus-core/README.md npm i … --save Drop the --save
packages/bus-core/README.md #295's "Dates and classes" section Keep one line and a link; the detail moves to the site's serialization page
packages/bus-messages/README.md Install only, with no example of $name/$version (master) Add a minimal Command/Event example
packages/bus-messages/README.md The ~60-line messages guide added in #295 Move it to the site's Messages page and keep the minimal example
🔀 packages/bus-class-serializer/README.md The .initialize() call and Update (no super(), $name or $version) don't compile #295 deletes the package and its README
packages/bus-rabbitmq/README.md run.catch(...) doesn't compile Change to run().catch(...)
packages/bus-rabbitmq/README.md The example has no bus.start() Add it
packages/bus-rabbitmq/README.md persistentMessages (default false) and deadLetterQueueName (default dead-letter) aren't documented Add them to the options and warn about the non-persistent default
packages/bus-rabbitmq/README.md Options are a list Change to the template's Option/Default/Description table
packages/bus-rabbitmq/README.md Retry topology section Move to the site's RabbitMQ page and keep a one-line summary
✅ packages/bus-sqs/README.md Config table checked accurate (dlq, 10, 30, 10, 14 days, autoProvision: true) Keep it
packages/bus-sqs/README.md "Managing resources yourself" Move to the site with the IAM permissions (#253) and keep one line
packages/bus-sqs/README.md Top-level await only works in ES modules Wrap in async run(), or say it's ES modules only
✅ packages/bus-sqs-lambda/README.md module.exports.handler = bus.receive loses this (issue comment) Already fixed on master: handler = event => bus.receive(event)
packages/bus-sqs-lambda/README.md "Requires @node-ts/bus-core 1.3.4 or later" is stale for 2.0 Remove it, since the peer range is enforced
packages/bus-sqs-lambda/README.md Partial batch failure detail Move to the site's Lambda page (#253) and keep the config line plus the ReportBatchItemFailures warning
packages/bus-postgres/README.md The optional second Pool constructor argument isn't documented Add one line
packages/bus-postgres/README.md The install doesn't list the @node-ts/bus-core peer Add it
packages/bus-mongodb/README.md The optional MongoClient argument (driver 7, server 4.2+) isn't documented Add one line
packages/bus-mongodb/README.md No warning about the 1.x key-encoding change Link MIGRATING.md
packages/bus-mongodb/README.md The install doesn't list the peer Add it
packages/bus-postgres, bus-mongodb, bus-rabbitmq, bus-sqs READMEs Development sections use unpinned docker run images that differ from docker-compose.yml Remove the sections; point to docker compose up in CONTRIBUTING.md (#257)
All package READMEs "🔥 View our docs 🔥" and "🤔" emoji lines Replace with the template's links line
🔀 packages/bus-test/README.md The ClassSerializer paragraph #295 makes this change; the rest is accurate and stays the full reference for adapter authors
packages/bus-cli/README.md (#295) ~150 lines Keep install, generate-message-types usage and the options table; move supported types, limits and programmatic use to the site
packages/bus-core/src/handler/README.md The v0 API: Handler<T> used as a function type with ({ message }), withHandler(Msg, fn), ({ context }), nonexistent @HandlesMessage, run.then Delete it; move the content to the site's Handlers and System messages pages using handlerFor and withCustomHandler(fn, { resolveWith, topicIdentifier })
packages/bus-core/src/workflow/README.md Workflow.configure, .handles, WorkflowData, a free completeWorkflow(), static Bus.send, this.discard(), an undefined event, VuePress front-matter, a mislabelled Snyk badge Delete it; move the concepts, retried startedBy and discardWorkflow content to the site's Workflows pages using the class API (configureWorkflow(mapper), startedBy/when, this.completeWorkflow()). Delete assets/workflow.gif: the site's own public/diagrams/workflow.svg replaces it, and the GIF is a copy of a third-party figure
✅ packages/bus-core/src/workflow/README.md The original issue said the in-memory default has no optimistic locking InMemoryPersistence now checks $version, so the claim is accurate for every persistence; keep it on the site
packages/bus-core/src/workflow/persistence/README.md @node-ts/bus-workflow, inversify, "transport" written for persistence, a 404 link Delete it; move to the site's "Creating a persistence" page, linking persistence.ts and bus-test's workflowStateRoundTripTests
packages/bus-core/src/transport/README.md Inversify, no Receiver/Lambda or bus-test suite Delete it; move to the site's "Creating a transport" page with Receiver and transportTests
packages/bus-core/src/logger/README.md Missing commas (syntax error), npm run index.js, a "@node-ts/bus-core/logger" heading that looks like a deep import Delete it; move to the site's Loggers page, fixing the snippet and using DEBUG=@node-ts/bus-* node index.js
✅ .changeset/README.md Fine No change
➡️ packages/bus-mongodb/package.json, packages/bus-sqs-lambda/package.json Wrong or vague description (mongodb says "@node-ts/bus-workflow"); homepage: null in 7 packages #256

What moves to the docs site (#250)

  • Everything in the five packages/bus-core/src/**/README.md files that's still true:
    • handler semantics, long-running processes, poison messages;
    • custom and system message handlers;
    • workflow concepts, retried startedBy and discarding;
    • logger configuration;
    • implementing a transport or persistence.
  • Adapter deep dives:
    • the RabbitMQ retry topology and the persistentMessages trade-off;
    • SQS autoProvision: false and IAM;
    • Lambda partial batch failures and FIFO behaviour.
  • From generate self-registering message types to restore dates and nested classes without decorators #295: the messages and serialization guide (plain data vs generated types, limits) and bus-cli's supported types and limits.

Acceptance criteria

  • Every package README follows the template, and no packages/bus-core/src/**/README.md remains.
  • Every README TypeScript block is synced from a compiled file in docs/snippets/**/*.ts, using the docs' #region convention, and the sync script's --check mode runs in CI (CircleCI's docs job) after pnpm build.
  • README links are checked in CI with no failures. They point to the latest docs at https://node-ts.github.io/bus/<page>, and none point to bus.node-ts.com or GitBook-only paths.
  • Every adapter README's configuration table matches the options and @defaults in the configuration interface.
  • Each install line lists the package's required peers.
  • Every row of the findings table is resolved, or marked as fixed in generate self-registering message types to restore dates and nested classes without decorators #295 or handed to another issue.
  • Content that moves is added to the docs/ site in the same PR that removes the README text, and each README links to it.

Activity

  1. adenhertog commented on Sep 30, 2026

    @adenhertog
    ContributorAuthor

    Another one for the list:

    • bus-sqs-lambda README. The example module.exports.handler = bus.receive (line 50) passes an unbound method, so this is lost when Lambda calls it. It should be module.exports.handler = event => bus.receive(event).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocs improvementsroadmapPart of the project roadmap

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions