chore(examples): drop provides: [] from composition roots - #31
Merged
Conversation
@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>
There was a problem hiding this comment.
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 intest-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.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to btravstack/di#9:
providesturned out to be optional inModule()since di 0.1.0 — the published version this repo already uses — so theprovides: []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