Workspaces refactor #86

Merged
norm merged 189 commits from refactor/workspaces into main 2022-08-28 14:46:45 +00:00
Owner

This PR aims to refactor the FoundKey repo to use Yarn Workspaces.
Notably, foundkey-js (fork of misskey-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

This PR aims to refactor the FoundKey repo to use Yarn Workspaces. Notably, `foundkey-js` (fork of `misskey-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: - https://classic.yarnpkg.com/lang/en/docs/workspaces/ (Yarn 1.x) - https://yarnpkg.com/features/workspaces (Yarn 2.x+) Once done, should resolve https://akkoma.dev/FoundKeyGang/FoundKey/issues/24, https://akkoma.dev/FoundKeyGang/FoundKey/issues/12, and https://akkoma.dev/FoundKeyGang/FoundKey/issues/13
norm added 166 commits 2022-08-26 01:50:06 +00:00
148730dac3
Add endpoints (#7)
* Add endpoints

* endpoint

* endpoint: stats

* endpoint
* reset-password
* server-info

* endpoint
* announcements
* drive
* page-push

* page endpoint

* page id
99276028ae
Typed stream (#13)
* Update streaming.ts

* Update streaming.ts

* wip
83b86c745d
update endpoints (#15)
* update endpoints

* add endpoints
* endpoint
* endpoints

* update announcements endpoint

* replace to DateString

* update antennas endpoints

* update app endpoints

* update auth endpoints

* update entity: Antenna

* admin/delete-all-files-of-a-user

* fix

* admin/delete-logs

* update endpoints
* admin/ad/delete
* admin/announcements/delete

* update endpoints
* admin/federation/delete-all-files
* clips/delete

* update endpoints
* drive/files/delete
* drive/folders/delete
* gallery/posts/delete
* i/delete-account
* mute/delete

* update endpoints
* notes/favorites/delete
* notes/reactions/delete
* notes/watching/delete
* users/groups/delete
* users/lists/delete

* specifical id

* update antennas/notes endpoint
fa98dabeec
fix: MessagingMessageの型を修正 (#28)
* fix messaging

* add changelog
f278390012
fix: Notificationsの型を修正 (#27)
* Update entities.ts

* Update entities.ts

* extract

* fix app define
extract

* appの定義を修正

* 改行コード修正

* add changelog

* fix

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
34afa60aff
feat: add type definition for messagingMessage event to main stream channel (#30)
* add: type definition for messagingMessage event

* update: changelog
755189f6f3
Add missing main stream types (#36)
* Add missing main stream types

* changelog, fix

* update api

* fix

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
231ac8e323
UserDetailed, MeDetailed (#34)
* UserDetailed, MeDetailed

* npm run api

* remote: lastFetchedAt

* Update misskey-js.api.md

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
28f244479c
Add comment property to DriveFile
Some components of Misskey like the image viewer use this property, but it hasn't been defined in the type definition itself.
b558716fa1 Add 'packages/foundkey-js/' from commit '637c6f1411c9c03f204f21da12e1f8e390d05cb8'
git-subtree-dir: packages/foundkey-js
git-subtree-mainline: aa144e803c
git-subtree-split: 637c6f1411
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details
3b921ece5d
add workspaces to package.json
Author
Owner

The 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.

The large amount of commits is because these are originally from the [misskey.js repo](https://github.com/misskey-dev/misskey.js) plus a few more that I added in [my fork](https://akkoma.dev/norm/foundkey.js). I used `git-subtree` to import the repo and its commit history as a subdirectory of this repo.
norm added 1 commit 2022-08-26 03:36:34 +00:00
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/test Pipeline failed Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
c1242cfde2
Fix build errors
norm added 1 commit 2022-08-26 04:11:06 +00:00
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/test Pipeline failed Details
ci/woodpecker/pr/lint-client Pipeline failed Details
e8699ff978
Update yarn lockfile
norm added 1 commit 2022-08-26 04:15:26 +00:00
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
b230dc98a9
fix import path for TreeAdapter
Author
Owner

Ok, so server finally starts and all, but like the icons are missing for some reason...

Seems like more import paths needs fixing...

Ok, so server finally starts and all, but like the icons are missing for some reason... Seems like more import paths needs fixing...
Author
Owner

Also wondering if we should jump to Yarn 2.x+ or stick to 1.x

Also wondering if we should jump to Yarn 2.x+ or stick to 1.x
norm added 1 commit 2022-08-26 04:31:25 +00:00
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
33146ffa5e
Fix paths for twemoji and font-awesome
norm added 1 commit 2022-08-26 04:53:29 +00:00
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
7420aab1b6
chore: update foundkey-js package.json
norm added 1 commit 2022-08-26 05:26:10 +00:00
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
a424426857
client: Use foundkey-js instead of misskey-js
norm added 1 commit 2022-08-26 05:30:30 +00:00
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
ebaa1960bf
foundkey-js: remove github files
norm added 2 commits 2022-08-26 05:35:53 +00:00
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
622731d1bd
sw: switch to foundkey-js
Owner

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.

> 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.
Author
Owner

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.

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.
norm added 1 commit 2022-08-26 06:31:46 +00:00
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
99bed3f872
remove install-packages.js
Since we're now using workspaces, the dependencies of all modules in the
repo are automatically fetched.
norm force-pushed refactor/workspaces from 7ee8034909 to 90adbfb2c2 2022-08-26 06:37:19 +00:00 Compare
norm added 1 commit 2022-08-26 06:44:10 +00:00
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
13b2cba980
foundkey-js: mark as module
Author
Owner

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.

Judging by [calckey's package.json](https://codeberg.org/thatonecalculator/calckey/src/branch/develop/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.
norm added 1 commit 2022-08-26 16:49:07 +00:00
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/pr/build Pipeline failed Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
6bccbc0d6d
switch to yarn for scripts and move start to backend
norm added 2 commits 2022-08-26 19:24:43 +00:00
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline failed Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details
ci/woodpecker/pr/lint-foundkey-js Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
6bb3f39c36
migrate to Yarn 3.2.3
norm added 1 commit 2022-08-26 19:33:43 +00:00
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/build Pipeline failed Details
ci/woodpecker/pr/lint-backend Pipeline failed Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/pr/test Pipeline failed Details
b3548cf9a0
fix typo in ci
norm added 1 commit 2022-08-26 19:50:29 +00:00
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/lint-backend Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/pr/test Pipeline failed Details
759d031a5f
ci: combine install and lint/build tasks
norm added 2 commits 2022-08-26 20:38:58 +00:00
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/pr/build Pipeline failed Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
bc0f0bf08f
add foundkey-js to each workspace package.json
norm added 2 commits 2022-08-26 22:05:21 +00:00
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/pr/build Pipeline failed Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
d36d9692b8
foundkey-js: use prepack instead of prepare
norm added 1 commit 2022-08-26 22:15:32 +00:00
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
91e4c159b8
explicitly build foundkey-js before everything else
norm added 1 commit 2022-08-26 22:19:44 +00:00
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline was successful Details
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
122482e0a2
use topological for build
Author
Owner

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.

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.
norm changed title from WIP: Workspaces refactor to Workspaces refactor 2022-08-26 22:34:52 +00:00
Author
Owner

I think everything works now. This should be ready for review.

I think everything works now. This should be ready for review.
Owner

You may want to rebase this - I somehow doubt all 100 ancient syuilo commits are relevant.

You may want to rebase this - I somehow doubt all 100 ancient syuilo commits are relevant.
Owner

@toast I belive those are from misskey.js:

The 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.
-- #86 (comment)

@toast I belive those are from misskey.js: > The 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. -- https://akkoma.dev/FoundKeyGang/FoundKey/pulls/86#issuecomment-2519
Johann150 approved these changes 2022-08-26 23:25:38 +00:00
Johann150 left a comment
Owner

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. :)

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. :)
Johann150 added this to the (deleted) project 2022-08-27 00:03:47 +00:00
Johann150 added a new dependency 2022-08-27 00:05:03 +00:00
norm merged commit 10caf861e8 into main 2022-08-28 14:46:45 +00:00
norm deleted branch refactor/workspaces 2022-08-28 14:46:45 +00:00
Johann150 added the
upkeep
label 2022-12-23 10:26:10 +00:00
Sign in to join this conversation.
No reviewers
No Label
feature
fix
upkeep
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Blocks
Reference: FoundKeyGang/FoundKey#86
No description provided.