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: use pnpm workspace (monorepo) #467

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

lihebi
Copy link
Collaborator

@lihebi lihebi commented Aug 24, 2023

Several changes:

  1. Use monorepo (ref, ref) via npm/pnpm workspace, so that we can extract code into packages and reuse it across apps (server app, desktop app, across ui/api).

Before:

ui/package.json
api/package.json
proxy/package.json

After:

package.json
pnpm-workspace.yaml
apps/
   ui/package.json
   api/pacakge.json
   proxy/packages.json
packages/
  some-shared-component (TODO)
  some-shared-utils (TODO)
  1. use pnpm instead of yarn to manage pacakges. Apart from gaining in the speed and disk space, Yarn actually isn't "right": it treats dependencies as installed packages, thus there has been a lot of "silent" errors. Fixed in this PR.
  2. upgrade zustand to 4.4 to fix a bug in package importing default import for shallow is not working since 4.3.0 pmndrs/zustand#1528

@lihebi
Copy link
Collaborator Author

lihebi commented Aug 24, 2023

Note for developers:

  1. instead of using yarn and yarn add to install packages (for VSCode linting purpose), use pnpm install and pnpm add ....
  2. Instead of using npx prisma ..., use pnpx prisma ....
  3. the docker-compose stack workflow is not changed. But you need to remove your old ui-node-modules volumes.

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.

1 participant