Skip to content

Commit

Permalink
switch to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Jun 11, 2024
1 parent 1dddef1 commit d47f504
Show file tree
Hide file tree
Showing 11 changed files with 13,979 additions and 10,539 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
cache: pnpm
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
working-directory: ./apps/server
- name: Generate Prisma Client
working-directory: ./apps/server
run: yarn prisma generate
run: pnpm prisma generate
- name: Build
working-directory: ./apps/server
run: yarn build
run: pnpm build
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only ./apps/server/build
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-web-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
cache: pnpm
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Generate Prisma Client
run: cd ../server && yarn prisma generate
run: cd ../server && pnpm prisma generate
- name: Pre-build Tailwind CSS # fix for https://github.com/nativewind/nativewind/issues/591#issuecomment-1939369454
run: npx tailwindcss -i ./src/global.css -o ./node_modules/.cache/nativewind/global.css.web.css
- name: Install Vercel CLI
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/tests-and-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,35 @@ jobs:
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
cache: pnpm

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Generate Prisma Client
run: cd apps/server && yarn prisma generate
run: cd apps/server && pnpm prisma generate
- name: Typecheck
run: yarn ts:check
run: pnpm ts:check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
cache: pnpm
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Linting
run: yarn lint
run: pnpm lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
cache: pnpm
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Test
run: yarn test
run: pnpm test
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Setup

```sh
yarn install
pnpm install
docker-compose up
```

Expand All @@ -13,35 +13,35 @@ cd apps/server
cp .env.example .env
npx @serenity-kit/opaque@latest create-server-setup
# copy the string value as OPAQUE_SERVER_SETUP .env
yarn prisma migrate dev
yarn dev
pnpm prisma migrate dev
pnpm dev
```

```sh
# in another tab
cd apps/frontend
yarn dev
pnpm dev
```

### Updating the Database Schema

1. Make changes
2. Run `yarn prisma migrate dev`
3. Run `yarn prisma generate`
2. Run `pnpm prisma migrate dev`
3. Run `pnpm prisma generate`
4. Restart the TS server in your editor

### DB UI

```bash
cd apps/backend
yarn prisma studio
pnpm prisma studio
```

### Wipe all local data

```bash
cd apps/backend
yarn prisma migrate reset
pnpm prisma migrate reset
```

## EAS Build
Expand Down
1 change: 1 addition & 0 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/runtime": "^7.24.7",
"@types/jest": "^29.5.12",
"@types/react": "~18.2.45",
"jest": "^29.2.1",
Expand Down
6 changes: 3 additions & 3 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"type": "module",
"scripts": {
"dev": "TS_NODE_TRANSPILE_ONLY=true nodemon --exec node --loader ts-node/esm ./src/index.ts",
"build:ts": "rm -rf dist && yarn tsc --project tsconfig.json",
"build:deploy": "rm -rf build && yarn deploy --filter=server --prod build",
"build": "yarn run build:ts && yarn build:deploy",
"build:ts": "rm -rf dist && pnpm tsc --project tsconfig.json",
"build:deploy": "rm -rf build && pnpm deploy --filter=server --prod build",
"build": "pnpm run build:ts && pnpm build:deploy",
"start:prod": "PORT=$PORT NODE_ENV=production node ./dist/index.js",
"ts:check": "tsc --noEmit",
"test": "echo \"Error: no test specified\"",
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
},
"scripts": {
"prepare": "husky install",
"ts:check": "yarn && yarn workspaces run ts:check",
"test": "yarn workspaces run test",
"lint": "yarn workspaces run lint",
"prettier:write": "yarn prettier --write '**/*.{ts,tsx,js,jsx,json,md,yml,yaml,css,html,graphql,gql}'",
"prettier:check": "yarn prettier --check '**/*.{ts,tsx,js,jsx,json,md,yml,yaml,css,html,graphql,gql}'"
"ts:check": "pnpm -r ts:check",
"test": "pnpm -r test",
"lint": "pnpm -r lint",
"prettier:write": "pnpm prettier --write '**/*.{ts,tsx,js,jsx,json,md,yml,yaml,css,html,graphql,gql}'",
"prettier:check": "pnpm prettier --check '**/*.{ts,tsx,js,jsx,json,md,yml,yaml,css,html,graphql,gql}'"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
Expand Down
Loading

0 comments on commit d47f504

Please sign in to comment.