Conversation
Codecov Report
@@ Coverage Diff @@
## main #225 +/- ##
==========================================
+ Coverage 72.54% 73.00% +0.45%
==========================================
Files 103 103
Lines 5150 5126 -24
Branches 407 407
==========================================
+ Hits 3736 3742 +6
+ Misses 1396 1366 -30
Partials 18 18
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
sehyod
left a comment
There was a problem hiding this comment.
I didn't know about this tool, it's really nice. Thanks for setting it up!
| export async function getUploadsDir() { | ||
| return join(await getBaseDir(), UPLOADS_DIR); | ||
| } | ||
| export async function ensureProjectFileStructure() { |
There was a problem hiding this comment.
I'm a bit surprised we aren't using this anymore 🤔
@cguedes is this intentional?
There was a problem hiding this comment.
@sehyod no! I'm also a bit surprised. I think that this is a great gateway to have some (proper) initial/demo structure for RefStudio.
What do you think of calling this method from the settings to reset the editor data?
There was a problem hiding this comment.
I think we have to call it on start, because we need to create the base directory for the app when the app starts for the first time: await createDir(baseDir, { recursive: true });
I'm not sure it would work as a reset function, because it wouldn't remove created and uploaded files
There was a problem hiding this comment.
Sure, we would need to improve that for the "initial/demo/reset" feature (in a new issue).
For now I will push a commit to use it in the app startup.
EDIT: I'm also updating the file names in that function to be .refstudio instead of .tiptap.
cguedes
left a comment
There was a problem hiding this comment.
We should agree on what to do with these two functions.
| export async function getUploadsDir() { | ||
| return join(await getBaseDir(), UPLOADS_DIR); | ||
| } | ||
| export async function ensureProjectFileStructure() { |
There was a problem hiding this comment.
@sehyod no! I'm also a bit surprised. I think that this is a great gateway to have some (proper) initial/demo structure for RefStudio.
What do you think of calling this method from the settings to reset the editor data?
Knip is a new tool I've been meaning to try out for detecting unused code and dependencies in JS/TS projects. It seems pretty low configuration and comes with a bunch of plugins for tracking dependencies around particular tools, e.g. vitest and prettier.
For an example of what a failure looks like, see https://github.com/refstudio/refstudio/actions/runs/5414908438/jobs/9842668221?pr=225