Skip to content

feat(di): report injection-site inspection failures through Unit - #1176

Draft
omermorad wants to merge 9 commits into
feat/v5-diagnostic-policyfrom
feat/v5-di-inspection-results
Draft

omermorad wants to merge 9 commits into
feat/v5-diagnostic-policyfrom
feat/v5-di-inspection-results

Conversation

@omermorad

Copy link
Copy Markdown
Collaborator

Move DI inspection failures across the adapter boundary as data. Unit can then identify the root and injection site, preserve the original cause, and distinguish an undefined dependency (ER30) from an undefined token (ER31). Third-party v5 DI adapters must return the new result.

The first Jest consumer cases preserve the regressions from #1147. Related to #1064.

@omermorad
omermorad added this pull request to stack #1168 November 27, 2026 17:36
@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.44221% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.23%. Comparing base (1915f9d) to head (82304cf).

Files with missing lines Patch % Lines
packages/core/src/services/dependency-resolver.ts 63.15% 6 Missing and 8 partials ⚠️
...ckages/di/injection-js/src/class-ctor-reflector.ts 85.71% 4 Missing and 4 partials ⚠️
packages/di/inversify/src/dependencies-adapter.ts 96.00% 0 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (88.44%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@                      Coverage Diff                      @@
##           feat/v5-diagnostic-policy    #1176      +/-   ##
=============================================================
+ Coverage                      94.06%   94.23%   +0.17%     
=============================================================
  Files                             34       33       -1     
  Lines                            926      920       -6     
  Branches                         174      192      +18     
=============================================================
- Hits                             871      867       -4     
+ Misses                            24       19       -5     
- Partials                          31       34       +3     
Flag Coverage Δ
core.unit 92.54% <63.15%> (-2.35%) ⬇️
di.injectionjs 89.18% <86.88%> (-10.82%) ⬇️
di.inversify 97.59% <98.24%> (+9.62%) ⬆️
di.nestjs 100.00% <100.00%> (+12.38%) ⬆️
doubles.jest 100.00% <ø> (ø)
doubles.vitest 97.82% <ø> (ø)
unit 98.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@omermorad omermorad added the target: v5 Deferred changes requiring a future major release label Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target: v5 Deferred changes requiring a future major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant