Workspaces refactor #86
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/workspaces"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR aims to refactor the FoundKey repo to use Yarn Workspaces.
Notably,
foundkey-js
(fork ofmisskey-js
) has been added as a workspace.I'm not sure how much work it'll be to adopt workspaces, but it does seem like Misskey already does use sub-packages so this should hopefully not be too hard.
Help in refactoring would be very much appreciated.
Useful information on workspaces:
Once done, should resolve #24, #12, and #13
npm ci
to improve CI performance 2ffff0fa61The large amount of commits is because these are originally from the misskey.js repo plus a few more that I added in my fork.
I used
git-subtree
to import the repo and its commit history as a subdirectory of this repo.Ok, so server finally starts and all, but like the icons are missing for some reason...
Seems like more import paths needs fixing...
Also wondering if we should jump to Yarn 2.x+ or stick to 1.x
I think I brought that up on IRC a bit ago because there is a PR by thatonecalculator to bring misskey to yarn 2 if I remember correctly. But we have probably changed quite a lot from misskey already that we couldn't just merge that one in.
Yeah, there's a bunch of stuff that hardcodes to various paths that I had to change to make things work in this refactor. Moving to yarn 2 would probably require more of those sorts of changes.
7ee8034909
to90adbfb2c2
Judging by calckey's package.json it seems like they're already using workspaces, and also the use of workspaces seems to have eliminated much of the need for the various scripts, so I'll see which we can remove.
Finally gotten the build step to work properly. The
yarn workspaces foreach
command also supports--parallel
and it does work locally on my own machine, but I'm not sure if it would be too much to handle on a small VPS...That could be made into a separate
build-parallel
script if needed be.WIP: Workspaces refactorto Workspaces refactorI think everything works now. This should be ready for review.
You may want to rebase this - I somehow doubt all 100 ancient syuilo commits are relevant.
@toast I belive those are from misskey.js:
This is a lot of stuff, thanks for doing this! 🙏
Didn't see anything that would be obviously wrong, but since its so much I'm also trusting that you tested it and it works. :)