bcgov / bcgov/range-api

#523 - Replace DataManager dynamic usage with explicit dependencies

Open
#526 0 comments 0 reactions 1 assignee Claimed by @brijesh-amin View on GitHub
Dominant language
TypeScript
Stars
1
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Parent: #523

## Objective
Reduce hidden coupling and improve testability by moving from dynamic DataManager usage to explicit dependencies in targeted paths.

## In scope
- Identify one or two high-traffic controllers/services using `new DataManager(...)`
- Replace with explicit repository/db dependency injection (module-level singleton or constructor-injected, based on repo conventions)
- Remove unused constructor argument patterns and tighten types where touched

## Acceptance criteria
- No new `new DataManager(config)` call sites introduced
- Selected paths use explicit dependencies instead of dynamic proxy behavior
- Tests updated to mock explicit boundaries
- Behavior remains backward-compatible

## Notes
Coordinate with the plan vertical-slice issue to avoid duplicate refactors.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.