Skip to content

Commit

Permalink
feat: switch to pnpm (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryscheng authored Aug 8, 2023
1 parent aacd1bf commit 7e73d40
Show file tree
Hide file tree
Showing 11 changed files with 7,355 additions and 6,714 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,38 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
# Fetch all history so gitlint can check the relevant commits.
fetch-depth: "0"
- name: Set up Python 3
uses: actions/setup-python@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
python-version: "3.x"
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js 18
uses: actions/setup-node@v3
with:
node-version: "18.15.0"
cache: "yarn"
cache: "pnpm"
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-87bc53fc6c874bd4c92d97ed180b949e3a36d78c
- name: Install
run: |
yarn install --immutable
# Always run this step so that all linting errors can be seen at once.
if: always()
- name: Build
run: |
yarn build
pnpm build
# Always run this step so that all linting errors can be seen at once.
if: always()
- name: Lint
run: |
yarn lint
pnpm lint
# Always run this step so that all linting errors can be seen at once.
if: always()
- name: Test
run: |
yarn test
pnpm test
# Always run this step so that all linting errors can be seen at once.
if: always()
13 changes: 9 additions & 4 deletions .github/workflows/deploy-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js 18
uses: actions/setup-node@v3
with:
cache: "yarn"
cache: "pnpm"
node-version: "18.x"
- name: Install
run: yarn install --immutable
- name: Run migrations
run: yarn deploy:indexer
run: pnpm deploy:indexer
13 changes: 9 additions & 4 deletions .github/workflows/indexer-autocrawl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js 18
uses: actions/setup-node@v3
with:
cache: "yarn"
cache: "pnpm"
node-version: "18.x"
- name: Install
run: yarn install --immutable
- name: Run
run: yarn start:indexer runAutocrawl
run: pnpm start:indexer runAutocrawl
13 changes: 9 additions & 4 deletions .github/workflows/indexer-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js 18
uses: actions/setup-node@v3
with:
cache: "yarn"
cache: "pnpm"
node-version: "18.x"
- name: Install
run: yarn install --immutable
- name: Run
run: yarn start:indexer ${{ inputs.command }} ${{ inputs.args }}
run: pnpm start:indexer ${{ inputs.command }} ${{ inputs.args }}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn format:staged
pnpm format:staged
11 changes: 6 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"private": true,
"scripts": {
"build": "next build",
"deploy": "yarn build",
"deploy": "pnpm build",
"dev": "next",
"lint": "tsc --noEmit && next lint && yarn lint:eslint",
"lint": "tsc --noEmit && next lint && pnpm lint:eslint",
"lint:eslint": "eslint --ignore-path ../.gitignore --ignore-path .gitignore --max-warnings 0 .",
"lint:prettier": "prettier --ignore-path ../.gitignore --ignore-path .gitignore --loglevel warn --check **/*.{js,jsx,ts,tsx,sol,md,json}",
"prestart": "yarn export",
"prestart": "pnpm export",
"start": "serve out",
"test": "jest --ci --passWithNoTests",
"test:watch": "jest --watch"
Expand All @@ -22,19 +22,20 @@
"@mui/material": "^5.14.3",
"@plasmicapp/loader-nextjs": "^1.0.302",
"add": "^2.0.6",
"csstype": "^3.1.2",
"next": "latest",
"random-words": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"serve": "^14.2.0",
"uuid": "^9.0.0",
"yarn": "^1.22.19"
"uuid": "^9.0.0"
},
"devDependencies": {
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/lodash": "^4.14.196",
"@types/node": "^18.11.5",
"@types/papaparse": "^5.3.7",
"@types/qs": "^6.9.7",
Expand Down
8 changes: 5 additions & 3 deletions indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"db:migrate": "prisma migrate dev",
"db:start": "supabase start",
"db:stop": "supabase stop",
"deploy": "yarn db:migrate",
"deploy": "pnpm db:migrate",
"dev": "tsc-watch --onSuccess \"node dist/index.js\"",
"json-yaml": "yarn ts-node --esm utilities/json-yaml/index.ts",
"lint": "tsc --noEmit && yarn lint:eslint && yarn lint:prettier",
"json-yaml": "pnpm ts-node --esm utilities/json-yaml/index.ts",
"lint": "tsc --noEmit && pnpm lint:eslint && pnpm lint:prettier",
"lint:eslint": "eslint --ignore-path ../.gitignore --max-warnings 0 --cache .",
"lint:prettier": "prettier --ignore-path ../.gitignore --loglevel warn --check **/*.ts",
"start": "ts-node --esm src/cli.ts",
Expand All @@ -36,9 +36,11 @@
},
"keywords": [],
"devDependencies": {
"@types/jest": "^29.5.3",
"@types/lodash": "^4.14.196",
"@types/node": "^20.4.5",
"@types/npm-registry-fetch": "^8.0.4",
"@types/yargs": "^17.0.24",
"jest": "^29.6.2",
"prettier": "^3.0.0",
"prisma": "^5.1.0",
Expand Down
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
"author": "Hypercerts Foundation",
"license": "Apache-2.0",
"private": true,
"workspaces": {
"packages": [
"docs",
"frontend",
"indexer"
]
"repository": {
"type": "git",
"url": "git+https://github.com/hypercerts-org/oso.git"
},
"scripts": {
"build": "turbo run build --concurrency=100%",
Expand All @@ -36,8 +33,9 @@
"prettier": "^3.0.0",
"turbo": "^1.10.12"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hypercerts-org/oso.git"
"packageManager": "pnpm@8",
"engines": {
"node": "18.x",
"pnpm": "8"
}
}
Loading

1 comment on commit 7e73d40

@vercel
Copy link

@vercel vercel bot commented on 7e73d40 Aug 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.