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

feat: yarn -> pnpm #1976

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,25 @@ jobs:
- name: Launch API
run: docker compose -f ./ci/docker-compose.ci.yml --env-file ./.env up -d api

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install Node.js dependencies
run: yarn
run: pnpm install

- name: Run codegen
env:
CODEGEN_API: http://localhost:3000/graphql
run: |
yarn codegen
pnpm run codegen

- name: Run Typescript
run: yarn tsc
run: pnpm run build:tsc
10 changes: 10 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,19 @@ jobs:
run: |
docker compose -f ./ci/docker-compose.ci.yml --env-file ./.env up -d db redis api front

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies (excluding Cypress)
run: pnpm install --ignore-scripts

- name: Cypress run
uses: cypress-io/github-action@v6
Expand All @@ -56,6 +65,7 @@ jobs:
cypress/e2e/t10-*
cypress/e2e/t20-*
cypress/e2e/t30-*
package-manager: pnpm

- name: Upload screenshots
uses: actions/upload-artifact@v4
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,24 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

# ESLint and Prettier must be in `package.json`
- name: Install Node.js dependencies
run: yarn
run: pnpm install

- name: Run Translation Check
run: |
yarn translations:inspect
pnpm run translations:inspect

- name: Run linters
run: |
yarn lint
pnpm run lint
10 changes: 8 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install Node.js dependencies
run: yarn
run: pnpm install

- name: Run tests
run: |
yarn test
pnpm run test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ node_modules
dist
.DS_Store
.env
yarn-error.log
coverage
cypress/downloads
.swc/
1 change: 0 additions & 1 deletion .sentrycliignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ node_modules
dist
.DS_Store
.env
yarn-error.log
coverage
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ WORKDIR /app
COPY . .

RUN apk add python3 build-base
RUN yarn && yarn build && npm prune --production
RUN corepack enable && corepack prepare pnpm@latest --activate
RUN pnpm install && pnpm run build

FROM nginx:1.27-alpine

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ FROM node:20-alpine
WORKDIR /app

RUN apk add --no-cache bash
RUN yarn
RUN pnpm

CMD ["./start.dev.sh"]
CMD ["./start.dev.sh"]
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build:tsc": "tsc",
"preview": "vite preview",
"lint": "prettier --check src/**/*.{ts,tsx,svg} --check index.html --check cypress/**/*.ts && eslint",
"eslint": "eslint",
Expand All @@ -26,10 +27,8 @@
"translations:inspect": "node scripts/translations/inspect",
"changelog:update": "auto-changelog --template=.changelog/regular.hbs",
"codemod": "node scripts/codemod.js",
"postinstall": "npx yarn-deduplicate",
"bundle-analyzer": "vite-bundle-visualizer --sourcemap"
},
"packageManager": "[email protected]",
"devDependencies": {
"@emotion/react": "11.13.5",
"@emotion/styled": "11.13.5",
Expand Down Expand Up @@ -107,6 +106,7 @@
"@mui/x-date-pickers": "6.20.0",
"@nangohq/frontend": "0.40.8",
"@sentry/react": "8.35.0",
"ace-builds": "^1.37.3",
"apollo-link-timeout": "4.0.0",
"apollo-upload-client": "17.0.0",
"apollo3-cache-persist": "0.15.0",
Expand All @@ -115,6 +115,7 @@
"lago-expression": "0.1.2",
"localforage": "1.10.0",
"lodash": "4.17.21",
"lodash-es": "^4.17.21",
"luxon": "3.4.4",
"prismjs": "1.29.0",
"react": "18.2.0",
Expand Down
Loading
Loading