-
Notifications
You must be signed in to change notification settings - Fork 125
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
Move and Refactor convert to Template #2349
Conversation
Hi @WillCWX, sorry for the delay & thanks for the PR! I'll get to reviewing it over the weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @WillCWX! Sorry for the delay 😅
The PR seems to be a straightforward refactor and reshuffle of existing functionalities without changes to the logic, but helpful in the long run for refactoring Site/index.js
. And of course, it should help us get back to #2308!
You can update the branch & it should be good to go 👍
Codecov Report
@@ Coverage Diff @@
## master #2349 +/- ##
==========================================
+ Coverage 44.82% 44.89% +0.06%
==========================================
Files 122 122
Lines 5133 5157 +24
Branches 1082 1085 +3
==========================================
+ Hits 2301 2315 +14
- Misses 2513 2523 +10
Partials 319 319
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi @WillCWX ! Took a look at this. You might not have noticed but codecov/patch is failing - I think the area that you are refactoring did not have tests. In this case since the overall project coverage didn't drop and a manual review of the code on my part looks okay, I'll merge this so that you can work on #2308 . But when you're over there, please check the tests for site.js and try to increase the coverage. While these few lines might seem trivial, adding unit tests to cover them would help greatly especially with refactors like these, reducing the time needed for manual review and increasing our confidence in approving these changes. |
What is the purpose of this pull request?
Helps with #1756
Helps make #2308 less messy
Overview of changes:
Moves
convert
fromSite/index.ts
toSite/template.ts
.Moves
readSiteConfig
fromSite/index.ts
toSiteConfig.ts
.Moves
_
toconstants.ts
Anything you'd like to highlight/discuss:
This reduces Site/index.ts by 130 lines without affecting any functions.
Site/index.ts now has nothing to do with markbind init and markbind convert
template.ts is now more bloated but with the #2308 , it maybe made more streamline.
Testing instructions:
NIL other than
npm run test
Proposed commit message: (wrap lines at 72 characters)
Move and refactor convert to template.ts
Checklist: ☑️