Skip to content
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(workspaces): yarn workspaces #3169

Merged
merged 34 commits into from
Dec 6, 2023
Merged

refactor(workspaces): yarn workspaces #3169

merged 34 commits into from
Dec 6, 2023

Conversation

elbotho
Copy link
Member

@elbotho elbotho commented Dec 5, 2023

Changelog:

  • /src moved to apps/frontend/src
  • all yarn commands can still be executed from project root, like yarn or yarn dev
  • editors should be able to pick up correct config (prettier, eslint, tsc)
  • CI and vercel now work with new folder structure

Todos:

  • avoid two subdirectories with same name frontend, e.g. rename apps/frontend to apps/web
  • check prisma integration - it's a bit all over the place :) at least make sure that it works - env setup is working on vercel
  • move readme back to top-level?
  • make prettier and eslint work with repo-wide settings
  • fix bundle size hack (e.g. https://frontend-git-yarn-workspaces-serlo.vercel.app/biologie)
  • update vs code settings for eslint

Copy link

vercel bot commented Dec 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview Dec 6, 2023 10:38am
frontend-monorepo 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 6, 2023 10:38am

@Entkenntnis
Copy link
Member

Thank you very much! Let's get this working 👍

@Entkenntnis

This comment was marked as resolved.

@elbotho
Copy link
Member Author

elbotho commented Dec 5, 2023

BTW: I just aliased all frontend commands so we can work with them as we usually do. Basically just some paths changed.
Since this is still mostly frontend and we work on is a lot more I think that makes sense.

Not yet sure about the eslint errors.
Ah and new vercel intergration sounds smart.

@Entkenntnis

This comment was marked as resolved.

@vercel vercel bot temporarily deployed to Preview – frontend-monorepo December 5, 2023 09:41 Inactive
@vercel vercel bot temporarily deployed to Preview – frontend December 5, 2023 09:45 Inactive
@Entkenntnis
Copy link
Member

Entkenntnis commented Dec 5, 2023

@elbotho I would suggest disabling jest. The tests are not maintained, and also quite trivial? (and probably completely outdated atm ...)

@Entkenntnis
Copy link
Member

ups, we broke bundle size 👀

@elbotho
Copy link
Member Author

elbotho commented Dec 5, 2023

@elbotho I would suggest disabling jest. The tests are not maintained, and also quite trivial? (and probably completely outdated atm ...)

I added some 2 months ago, but I'm okay with disabling the failing tests suite for now.

ups, we broke bundle size 👀

yeah, that's weird. We should make sure the check is correct first though. Not even sure why it runs in this pr.

This reverts commit f580643.
@elbotho
Copy link
Member Author

elbotho commented Dec 5, 2023

Prettier works again for me, in frontend and on repo-root both with terminal and vscode.

ESlint also works with a new VSCode setting of eslint.workingDirectories": [{ "mode": "auto" }].
It seems to be a common thing with monorepos and since it works from the terminal the project config should be correct.
I'm not sure if it actually worked before or I just did not see it, but I did not find another way.

There is still one unexpected ESLint error (only in IDE) in feature-i18n.ts at getInstanceDataByLang. Did not investigate far but that might be related to ramda.

@elbotho elbotho merged commit f26f08e into staging Dec 6, 2023
11 checks passed
@elbotho elbotho deleted the yarn-workspaces branch December 6, 2023 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants