-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(catalog): split to separate files, add tests #1467
refactor(catalog): split to separate files, add tests #1467
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
Codecov ReportBase: 74.04% // Head: 74.04% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## next #1467 +/- ##
=======================================
Coverage 74.04% 74.04%
=======================================
Files 75 78 +3
Lines 1961 1961
Branches 526 523 -3
=======================================
Hits 1452 1452
+ Misses 386 385 -1
- Partials 123 124 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
df28bce
to
50ac2a7
Compare
@Martin005 @andrii-bodnar any updates? |
packages/cli/src/api/catalog.ts
was a big god module doing everything. I slowly split it to separate atomic functions covered with unit tests to make them more resusable and testable.Key changes:
format.write()
orformat.read()
without additional boilerplate to handle ENOENT or EEXIST errors. Make usage cleaner. Corresponding tests added.getCatalogs
family methods extracted to separate file. Removed code duplication between them.Catalog.make
methodCatalog
file to separate file.