Skip to content

chore(examples): drop provides: [] from composition roots - #31

Merged
btravers merged 2 commits into
mainfrom
chore/drop-empty-provides
Aug 13, 2026
Merged

chore(examples): drop provides: [] from composition roots#31
btravers merged 2 commits into
mainfrom
chore/drop-empty-provides

Conversation

@btravers

Copy link
Copy Markdown
Contributor

Follow-up to btravstack/di#9: provides turned out to be optional in Module() since di 0.1.0 — the published version this repo already uses — so the provides: [] line in every composition root was pure ceremony. This drops all 12 occurrences (the four deployment modules, their needs-gate type tests, and test fixtures).

No di release needed; btravstack/di#11 adds the regression test pinning the optionality.

Typecheck and tests pass across all four examples (27 turbo tasks, including the AMQP and Temporal integration suites).

🤖 Generated with Claude Code

@btravstack/di 0.1.0 already makes provides optional (btravstack/di#9,
pinned by btravstack/di#11) — the empty key was pure ceremony.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 13, 2026 19:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes redundant provides: [] entries from the @btravstack/di Module(...)({ ... }) composition roots across the four order-* example deployments, aligning the examples with di >= 0.1.0 where provides is optional.

Changes:

  • Drop provides: [] from each example’s main composition root module.
  • Drop provides: [] from each example’s runtime-needs gate type test (needs-gate.test-d.ts).
  • Drop provides: [] from each example’s local stub composition root in test-fixtures.ts.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
examples/order-api/src/module.ts Removes redundant provides: [] from the API composition root.
examples/order-api/src/needs-gate.test-d.ts Removes redundant provides: [] from the API needs-gate type test module.
examples/order-api/src/test-fixtures.ts Removes redundant provides: [] from the API stub module used in fixtures.
examples/order-worker/src/module.ts Removes redundant provides: [] from the worker composition root.
examples/order-worker/src/needs-gate.test-d.ts Removes redundant provides: [] from the worker needs-gate type test module.
examples/order-worker/src/test-fixtures.ts Removes redundant provides: [] from the worker stub module used in fixtures.
examples/order-temporal/src/module.ts Removes redundant provides: [] from the Temporal composition root.
examples/order-temporal/src/needs-gate.test-d.ts Removes redundant provides: [] from the Temporal needs-gate type test module.
examples/order-temporal/src/test-fixtures.ts Removes redundant provides: [] from the Temporal stub module used in fixtures.
examples/order-amqp/src/module.ts Removes redundant provides: [] from the AMQP composition root.
examples/order-amqp/src/needs-gate.test-d.ts Removes redundant provides: [] from the AMQP needs-gate type test module.
examples/order-amqp/src/test-fixtures.ts Removes redundant provides: [] from the AMQP stub module used in fixtures.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread examples/order-api/src/module.ts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@btravers
btravers merged commit 0e699e1 into main Aug 13, 2026
13 checks passed
@btravers
btravers deleted the chore/drop-empty-provides branch August 13, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants