eik-lib / issues

Issues and discussions that span all of Eik
https://eik.dev
1 stars 0 forks source link

Replace usage of common package with more granular common packages #19

Closed trygve-lie closed 1 month ago

trygve-lie commented 1 year ago

Eik consist of multiple packages and some of these packages contain similar functionality. To avoid duplication there is a common package which contain a set of objects and functions other packages reuse.

This common package has one main export which exports multiple objects or functions: https://github.com/eik-lib/common/blob/master/lib/index.js

Though; this package have grown a bit over time and some methods are used in a lot of other packages while others are used in less or not even at all in some. Some methods in the common package which some other packages does not use do pull in a rather larger set of dependencies. And pulling in not needed dependencies is not optimal.

Its also become a bit hard to maintain and follow the structure in the common package.

To improve on this there has been work done to split the common package in to multiple smaller common packages with more specific targets. These packages are more or less the exported methods in the main in the common packages split into multiple packages where each package exports one object or function.

But; This work has be started on but are not 100% finished. These split out packages is a NPM workspace and currently live in the next branch: https://github.com/eik-lib/common/tree/next/packages

These packages is set up to be published at next releases and are already available in NPM. Example: https://www.npmjs.com/package/@eik/common-config-loader

At the moment this is a bit in limbo since no other packages is using these more granular common packages and are still using the one common package. This should be resolved.

Tasks to resolve are:

wkillerud commented 1 month ago

We decided to postpone this in https://github.com/eik-lib/common/issues/305