Hashem Abounajmi
1 min readSep 22, 2023

--

Cost is introducing a new tool (Melos) to maintain the project packages. the goal is reduce human cost as the project grows.

It's better to think about all packages as just a folder in your monolith project. each folder has barrel file in it that expose only relevant files. if you want to use the folder in other projects its good to create a package, otherwise I avoid it.

You can write custom lint to enforce imports only from barrel files or in folder local files. so you have clear physical boundary.

Another issue is Imagine you have 2000 tests and you have 30 packages when you run your tests with Melos as your tests are scattered in packages your test duration takes 1 hour. but if you have a monolith structure it can run less than 10 minutes or less. the reason is each package has its own cold start to run the tests.

if you are working at enterprise level (40 mobile developers) using Melos can be considered.

--

--

Hashem Abounajmi
Hashem Abounajmi

No responses yet