In my company, we are dealing with significant technical debt and have decided to create small, reusable libraries (e.g., HTTP client, database client, logging client) to be used in future projects. The idea is to facilitate the replacement of older external libraries with newer, more powerful ones and to add custom behaviors like logging and type checking.
Recently, we encountered a question: if we create a package that wraps around an existing library but only redefines its structure without overloading its functions, is it worth it ? Does this really make it easier to transition from one library to another, avoid technical debt?
For example, we are currently using Node.js’s fs for logging but are considering switching to winston for its Elasticsearch compatibilities. Our custom library would essentially just wrap around winston without adding new functionality but code abstraction and a different more generic structure.
Marius is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.