Skip to content

Commit 7e73d40

Browse files
authored
feat: switch to pnpm (#112)
1 parent aacd1bf commit 7e73d40

11 files changed

+7355
-6714
lines changed

.github/workflows/ci-default.yml

+14-12
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,38 @@ jobs:
4343
ref: ${{ github.event.pull_request.head.sha }}
4444
# Fetch all history so gitlint can check the relevant commits.
4545
fetch-depth: "0"
46-
- name: Set up Python 3
47-
uses: actions/setup-python@v4
46+
- name: Setup pnpm
47+
uses: pnpm/action-setup@v2
4848
with:
49-
python-version: "3.x"
49+
version: 8
50+
run_install: |
51+
- recursive: true
52+
args: [--frozen-lockfile, --strict-peer-dependencies]
5053
- name: Set up Node.js 18
5154
uses: actions/setup-node@v3
5255
with:
5356
node-version: "18.15.0"
54-
cache: "yarn"
57+
cache: "pnpm"
58+
- name: Set up Python 3
59+
uses: actions/setup-python@v4
60+
with:
61+
python-version: "3.x"
5562
- name: Install Foundry
5663
uses: foundry-rs/foundry-toolchain@v1
5764
with:
5865
version: nightly-87bc53fc6c874bd4c92d97ed180b949e3a36d78c
59-
- name: Install
60-
run: |
61-
yarn install --immutable
62-
# Always run this step so that all linting errors can be seen at once.
63-
if: always()
6466
- name: Build
6567
run: |
66-
yarn build
68+
pnpm build
6769
# Always run this step so that all linting errors can be seen at once.
6870
if: always()
6971
- name: Lint
7072
run: |
71-
yarn lint
73+
pnpm lint
7274
# Always run this step so that all linting errors can be seen at once.
7375
if: always()
7476
- name: Test
7577
run: |
76-
yarn test
78+
pnpm test
7779
# Always run this step so that all linting errors can be seen at once.
7880
if: always()

.github/workflows/deploy-indexer.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,17 @@ jobs:
2525
uses: actions/checkout@v3
2626
with:
2727
fetch-depth: 1
28+
- name: Setup pnpm
29+
uses: pnpm/action-setup@v2
30+
with:
31+
version: 8
32+
run_install: |
33+
- recursive: true
34+
args: [--frozen-lockfile, --strict-peer-dependencies]
2835
- name: Set up Node.js 18
2936
uses: actions/setup-node@v3
3037
with:
31-
cache: "yarn"
38+
cache: "pnpm"
3239
node-version: "18.x"
33-
- name: Install
34-
run: yarn install --immutable
3540
- name: Run migrations
36-
run: yarn deploy:indexer
41+
run: pnpm deploy:indexer

.github/workflows/indexer-autocrawl.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,17 @@ jobs:
2020
uses: actions/checkout@v3
2121
with:
2222
fetch-depth: 1
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v2
25+
with:
26+
version: 8
27+
run_install: |
28+
- recursive: true
29+
args: [--frozen-lockfile, --strict-peer-dependencies]
2330
- name: Set up Node.js 18
2431
uses: actions/setup-node@v3
2532
with:
26-
cache: "yarn"
33+
cache: "pnpm"
2734
node-version: "18.x"
28-
- name: Install
29-
run: yarn install --immutable
3035
- name: Run
31-
run: yarn start:indexer runAutocrawl
36+
run: pnpm start:indexer runAutocrawl

.github/workflows/indexer-manual.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,17 @@ jobs:
3232
uses: actions/checkout@v3
3333
with:
3434
fetch-depth: 1
35+
- name: Setup pnpm
36+
uses: pnpm/action-setup@v2
37+
with:
38+
version: 8
39+
run_install: |
40+
- recursive: true
41+
args: [--frozen-lockfile, --strict-peer-dependencies]
3542
- name: Set up Node.js 18
3643
uses: actions/setup-node@v3
3744
with:
38-
cache: "yarn"
45+
cache: "pnpm"
3946
node-version: "18.x"
40-
- name: Install
41-
run: yarn install --immutable
4247
- name: Run
43-
run: yarn start:indexer ${{ inputs.command }} ${{ inputs.args }}
48+
run: pnpm start:indexer ${{ inputs.command }} ${{ inputs.args }}

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
yarn format:staged
4+
pnpm format:staged

frontend/package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"private": true,
66
"scripts": {
77
"build": "next build",
8-
"deploy": "yarn build",
8+
"deploy": "pnpm build",
99
"dev": "next",
10-
"lint": "tsc --noEmit && next lint && yarn lint:eslint",
10+
"lint": "tsc --noEmit && next lint && pnpm lint:eslint",
1111
"lint:eslint": "eslint --ignore-path ../.gitignore --ignore-path .gitignore --max-warnings 0 .",
1212
"lint:prettier": "prettier --ignore-path ../.gitignore --ignore-path .gitignore --loglevel warn --check **/*.{js,jsx,ts,tsx,sol,md,json}",
13-
"prestart": "yarn export",
13+
"prestart": "pnpm export",
1414
"start": "serve out",
1515
"test": "jest --ci --passWithNoTests",
1616
"test:watch": "jest --watch"
@@ -22,19 +22,20 @@
2222
"@mui/material": "^5.14.3",
2323
"@plasmicapp/loader-nextjs": "^1.0.302",
2424
"add": "^2.0.6",
25+
"csstype": "^3.1.2",
2526
"next": "latest",
2627
"random-words": "^2.0.0",
2728
"react": "^18.2.0",
2829
"react-dom": "^18.2.0",
2930
"serve": "^14.2.0",
30-
"uuid": "^9.0.0",
31-
"yarn": "^1.22.19"
31+
"uuid": "^9.0.0"
3232
},
3333
"devDependencies": {
3434
"@testing-library/dom": "^9.3.1",
3535
"@testing-library/jest-dom": "^5.17.0",
3636
"@testing-library/react": "^14.0.0",
3737
"@testing-library/user-event": "^14.4.3",
38+
"@types/lodash": "^4.14.196",
3839
"@types/node": "^18.11.5",
3940
"@types/papaparse": "^5.3.7",
4041
"@types/qs": "^6.9.7",

indexer/package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
"db:migrate": "prisma migrate dev",
2323
"db:start": "supabase start",
2424
"db:stop": "supabase stop",
25-
"deploy": "yarn db:migrate",
25+
"deploy": "pnpm db:migrate",
2626
"dev": "tsc-watch --onSuccess \"node dist/index.js\"",
27-
"json-yaml": "yarn ts-node --esm utilities/json-yaml/index.ts",
28-
"lint": "tsc --noEmit && yarn lint:eslint && yarn lint:prettier",
27+
"json-yaml": "pnpm ts-node --esm utilities/json-yaml/index.ts",
28+
"lint": "tsc --noEmit && pnpm lint:eslint && pnpm lint:prettier",
2929
"lint:eslint": "eslint --ignore-path ../.gitignore --max-warnings 0 --cache .",
3030
"lint:prettier": "prettier --ignore-path ../.gitignore --loglevel warn --check **/*.ts",
3131
"start": "ts-node --esm src/cli.ts",
@@ -36,9 +36,11 @@
3636
},
3737
"keywords": [],
3838
"devDependencies": {
39+
"@types/jest": "^29.5.3",
3940
"@types/lodash": "^4.14.196",
4041
"@types/node": "^20.4.5",
4142
"@types/npm-registry-fetch": "^8.0.4",
43+
"@types/yargs": "^17.0.24",
4244
"jest": "^29.6.2",
4345
"prettier": "^3.0.0",
4446
"prisma": "^5.1.0",

package.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
"author": "Hypercerts Foundation",
66
"license": "Apache-2.0",
77
"private": true,
8-
"workspaces": {
9-
"packages": [
10-
"docs",
11-
"frontend",
12-
"indexer"
13-
]
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/hypercerts-org/oso.git"
1411
},
1512
"scripts": {
1613
"build": "turbo run build --concurrency=100%",
@@ -36,8 +33,9 @@
3633
"prettier": "^3.0.0",
3734
"turbo": "^1.10.12"
3835
},
39-
"repository": {
40-
"type": "git",
41-
"url": "git+https://github.com/hypercerts-org/oso.git"
36+
"packageManager": "pnpm@8",
37+
"engines": {
38+
"node": "18.x",
39+
"pnpm": "8"
4240
}
4341
}

0 commit comments

Comments
 (0)