Skip to content

Commit 0a0434d

Browse files
authored
chore: from yarn to pnpm (#13258)
1 parent 63c776c commit 0a0434d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+26029
-24170
lines changed

.github/CONTRIBUTING.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ git checkout main
119119
git pull upstream main
120120
```
121121

122-
4. Install the dependencies with yarn (npm isn't supported):
122+
4. Install the dependencies with pnpm (npm/yarn isn't supported):
123123

124124
```sh
125-
yarn install
125+
pnpm install
126126
```
127127

128128
5. Create a new topic branch:
@@ -206,11 +206,11 @@ Once connected run the following commands in the VS Code terminal:
206206

207207
```shell
208208
# Setup the database
209-
yarn workspace backend migrate
210-
yarn workspace backend seed
209+
pnpm -F backend migrate
210+
pnpm -F backend seed
211211

212212
# Run Lightdash frontend and backend in dev mode
213-
yarn dev
213+
pnpm dev
214214
```
215215

216216
#### using Docker compose
@@ -251,7 +251,7 @@ export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=true
251251
./scripts/seed-lightdash.sh
252252

253253
# Run Lightdash frontend and backend in dev mode
254-
yarn dev # http://localhost:3000
254+
pnpm dev # http://localhost:3000
255255

256256
# Log in dev mode
257257
# When navigating to http://localhost:3000 you will be prompt to the login page, you can use our demo login details:
@@ -260,14 +260,14 @@ yarn dev # http://localhost:3000
260260
# Password: demo_password!
261261

262262
# Or run in production mode
263-
# yarn build
264-
# yarn start # http://localhost:8080
263+
# pnpm build
264+
# pnpm start # http://localhost:8080
265265
```
266266

267267
Notes:
268268

269-
- If you change files inside `/packages/common` you should run `yarn common-build` before `yarn dev`
270-
- If you change files inside `/packages/warehouses` you should run `yarn warehouses-build` before `yarn dev`
269+
- If you change files inside `/packages/common` you should run `pnpm common-build` before `pnpm dev`
270+
- If you change files inside `/packages/warehouses` you should run `pnpm warehouses-build` before `pnpm dev`
271271
- If you rename files the container might not recognise the changes. To fix this, stop the containers and start again.
272272
- If you need to change any of the environment variables, you can do so by editing `.env.development.local` and re-run the `docker compose up` command mentioned above
273273

@@ -288,7 +288,7 @@ docker compose -p lightdash-app -f docker/docker-compose.dev.yml --env-file .env
288288
To setup Development Environment without Docker you need following pre-requisites before running Lightdash:
289289

290290
- node >= v18.x (20 is preferred)
291-
- yarn
291+
- pnpm
292292
- postgres >= 12
293293
- dbt 1.4.x or 1.5.x
294294

@@ -334,16 +334,16 @@ PGDATABASE=postgres
334334
DBT_DEMO_DIR=$PWD/examples/full-jaffle-shop-demo
335335

336336
# 9 Install packages
337-
yarn
337+
pnpm install
338338

339339
# 10 Build / migrate / seed
340-
yarn load:env ./scripts/build.sh
341-
yarn load:env ./scripts/seed-jaffle.sh
342-
yarn load:env ./scripts/migrate.sh
343-
yarn load:env ./scripts/seed-lightdash.sh
340+
pnpm load:env ./scripts/build.sh
341+
pnpm load:env ./scripts/seed-jaffle.sh
342+
pnpm load:env ./scripts/migrate.sh
343+
pnpm load:env ./scripts/seed-lightdash.sh
344344

345345
# Run
346-
yarn load:env yarn dev
346+
pnpm load:env pnpm dev
347347

348348
# Log in dev mode
349349
When navigating to http://localhost:3000 you will be prompt to the login page, you can use our demo login details:
@@ -352,18 +352,18 @@ Username: [email protected]
352352
Password: demo_password!
353353
```
354354
355-
> ⚠️ you can add env variables to your system and ignore running `yarn load:env` before each command
355+
> ⚠️ you can add env variables to your system and ignore running `pnpm load:env` before each command
356356
357357
#### How to run unit tests
358358
359359
```shell
360360
# Prepare dependencies
361-
yarn install
362-
yarn common-build
363-
yarn warehouses-build
361+
pnpm install
362+
pnpm common-build
363+
pnpm warehouses-build
364364

365365
# Run unit tests
366-
yarn test
366+
pnpm test
367367
```
368368
369369
#### How to run e2e tests
@@ -372,15 +372,15 @@ Before running e2e tests make sure you're running the app locally.
372372
373373
```shell
374374
# Prepare dependencies
375-
yarn install
376-
yarn common-build
377-
yarn warehouses-build
375+
pnpm install
376+
pnpm common-build
377+
pnpm warehouses-build
378378
379379
# Run cypress in interactive mode
380-
yarn e2e-open
380+
pnpm e2e-open
381381
382382
# Or run cypress in cli mode
383-
yarn e2e-run
383+
pnpm e2e-run
384384
```
385385
386386
Note:
@@ -390,8 +390,8 @@ Note:
390390
#### How to check code quality
391391
392392
```shell
393-
yarn lint
394-
yarn format
393+
pnpm lint
394+
pnpm format
395395
```
396396
397397
#### Developing API endpoints
@@ -401,7 +401,7 @@ then registered in `packages/backend/src/index.ts` but in order to be made avail
401401
`routes.ts` file by executing:
402402
403403
```shell
404-
yarn workspace backend run tsoa routes
404+
pnpm -F backend run tsoa routes
405405
```
406406
407407
### Running headless browser locally
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Setup Node, PNPM, and Cypress
2+
3+
description: Sets up Node.js, PNPM, and Cypress.
4+
5+
runs:
6+
using: 'composite'
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
11+
- name: Setup PNPM
12+
uses: pnpm/action-setup@v4
13+
- name: Setup Node
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20'
17+
cache: 'pnpm'
18+
cache-dependency-path: 'pnpm-lock.yaml'
19+
20+
- name: Install Dependencies
21+
run: pnpm install --frozen-lockfile --prefer-offline
22+
shell: bash
23+
24+
- name: Install Cypress
25+
run: pnpm exec cypress install
26+
working-directory: packages/e2e
27+
shell: bash

0 commit comments

Comments
 (0)