Skip to content

test: pin that a composition root can omit provides - #11

Merged
btravers merged 1 commit into
mainfrom
fix/optional-provides
Aug 13, 2026
Merged

test: pin that a composition root can omit provides#11
btravers merged 1 commit into
mainfrom
fix/optional-provides

Conversation

@btravers

Copy link
Copy Markdown
Contributor

Investigating #9: provides — like imports and exports — has been optional in Module() since the initial commit, and the published 0.1.0 ships that. The issue's exact composition-root shape (imports + port re-exports, no provides key) already typechecks; the provides: [] lines in start's examples are ceremony start can drop today, no di release needed (companion PR in btravstack/start).

What was missing here is a test guaranteeing it stays that way: the existing facade test only covered whole-module re-export without provides. This adds a type test for the deployment-module shape from the issue.

Closes #9

🤖 Generated with Claude Code

Closes #9

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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

Adds a type-level regression test to ensure Module() continues to allow “composition root” modules (imports + re-exported ports) to omit provides entirely, matching the published behavior and the acceptance criteria from #9.

Changes:

  • Added a module.test-d.ts case that constructs a module with imports + exports only (no provides key).
  • Asserted the resulting module’s type channels (Exports, Error, Needs) remain correctly inferred for that shape.

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

@btravers
btravers merged commit bcd8e53 into main Aug 13, 2026
14 checks passed
@btravers
btravers deleted the fix/optional-provides branch August 13, 2026 19:49
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.

Make provides optional in Module() — composition roots pay a provides: [] line

2 participants