Skip to content

Commit 8262410

Browse files
chore: migrate from npm to pnpm (#1164)
1 parent 71b5f7a commit 8262410

28 files changed

Lines changed: 34296 additions & 50380 deletions

.fleek.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"slug": "interface-test",
55
"distDir": "build",
6-
"buildCommand": "npm run build"
6+
"buildCommand": "pnpm build"
77
}
88
]
99
}

.fleek_dr_center_production.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"slug": "drcenter-production",
55
"distDir": "build",
6-
"buildCommand": "npm run build"
6+
"buildCommand": "pnpm build"
77
}
88
]
99
}

.fleek_dr_center_staging.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"slug": "drcenter-staging",
55
"distDir": "build",
6-
"buildCommand": "npm run build"
6+
"buildCommand": "pnpm build"
77
}
88
]
99
}

.fleek_dr_center_testing.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"slug": "drcenter-test",
55
"distDir": "build",
6-
"buildCommand": "npm run build"
6+
"buildCommand": "pnpm build"
77
}
88
]
99
}

.fleek_production.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"slug": "dapp-interface-production",
55
"distDir": "build",
6-
"buildCommand": "npm run build"
6+
"buildCommand": "pnpm build"
77
}
88
]
99
}

.fleek_staging.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"slug": "interface-staging",
55
"distDir": "build",
6-
"buildCommand": "npm run build"
6+
"buildCommand": "pnpm build"
77
}
88
]
99
}

.github/workflows/ci_reusable.yaml

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,17 @@ jobs:
154154
with:
155155
ref: ${{ github.event.pull_request.head.ref }}
156156
fetch-depth: 0
157-
- uses: actions/setup-node@v3
157+
- name: Install pnpm
158+
uses: pnpm/action-setup@v4
159+
with:
160+
version: 10
161+
- name: Setup node
162+
uses: actions/setup-node@v4
158163
with:
159164
node-version: "24"
160165
registry-url: "https://registry.npmjs.org"
161-
cache: "npm"
162-
- name: Cache dependencies
163-
uses: actions/cache@v3
164-
with:
165-
path: ~/.npm
166-
key: npm-${{ hashFiles('package-lock.json') }}
167-
restore-keys: npm-
166+
cache: "pnpm"
167+
cache-dependency-path: "./pnpm-lock.yaml"
168168
- name: Create Sentry release
169169
if: ${{ inputs.IS_PREVIEW == false }}
170170
uses: getsentry/action-release@v1
@@ -175,34 +175,17 @@ jobs:
175175
with:
176176
environment: ${{ inputs.ENV_NAME }}
177177
version: ${{ inputs.REACT_APP_RELEASE_NAME }}
178-
- run: npm ci
178+
- run: pnpm install --frozen-lockfile
179179
- name: Install Playwright Browsers
180180
run: npx playwright install --with-deps chromium
181-
- run: npm run prettier
182-
- run: npm run tsc
183-
- run: npm run test
184-
- run: npm run lint
181+
- run: pnpm prettier
182+
- run: pnpm tsc
183+
- run: pnpm lint
185184
- id: lint
186185
run: echo "::set-output name=pass::success"
187-
- run: npm run build
186+
- run: pnpm build
188187
- id: build
189188
run: echo "::set-output name=pass::success"
190-
- name: Run Tests & Generate coverage reports
191-
run: npm run coverage:report
192-
- name: Upload Unit Coverage to Codecov
193-
if: ${{ inputs.UPDATE_COVERAGE }}
194-
uses: codecov/codecov-action@v2
195-
with:
196-
token: ${{ secrets.CODECOV_TOKEN }}
197-
files: ./coverage/coverage-final.json
198-
flags: unittests
199-
- name: Upload E2E Coverage to Codecov
200-
if: ${{ inputs.UPDATE_COVERAGE }}
201-
uses: codecov/codecov-action@v2
202-
with:
203-
token: ${{ secrets.CODECOV_TOKEN }}
204-
files: ./test-results.json
205-
flags: e2etests
206189
- name: (if 'staging' env) Copy contents from .fleek_staging.json to .fleek.json
207190
if: ${{ inputs.ENV_NAME == 'staging' }}
208191
run: mv .fleek_staging.json .fleek.json
@@ -217,7 +200,7 @@ jobs:
217200
FLEEK_TOKEN: ${{ secrets.FLEEK_TOKEN }}
218201
FLEEK_PROJECT_ID: ${{ secrets.FLEEK_PROJECT_ID }}
219202
- name: Build dapp to show the dr_center only
220-
run: npm run build
203+
run: pnpm build
221204
if: ${{ inputs.IS_PREVIEW == false && inputs.DEPLOY_TO_FLEEK }}
222205
env:
223206
REACT_APP_VIEW_MODE: "dr_center"

.github/workflows/fleek-deploy.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,18 @@ jobs:
3232
steps:
3333
- name: Checkout
3434
uses: actions/checkout@v3
35-
- name: Install Node.js
36-
uses: actions/setup-node@v3
35+
- name: Install pnpm
36+
uses: pnpm/action-setup@v4
3737
with:
38-
node-version: 24
38+
version: 10
39+
- name: Setup node
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: "24"
43+
registry-url: "https://registry.npmjs.org"
44+
cache: "pnpm"
45+
cache-dependency-path: "./pnpm-lock.yaml"
3946
- name: Install Packages
40-
run: npm ci
47+
run: pnpm install --frozen-lockfile
4148
- name: Build & deploy sites
4249
run: npx fleek -- sites deploy --config ./.fleek_dr_center_testing.json

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ For ease of use, each environment has a DNS name that always points to the lates
3737
Installing the correct versions of node and npm can be done by installing [`volta`](https://volta.sh/). Volta will automatically get those versions from the package.json file. Once that's done, the required steps to develop and test the dApp interface locally are as follows:
3838

3939
1. Clone the repository: i.e. Run `git clone git@github.com:bosonprotocol/interface.git`
40-
2. Navigate into the directory & install dependencies: i.e. Run `cd interface && npm ci`
40+
2. Navigate into the directory & install dependencies: i.e. Run `cd interface && pnpm install`
4141
3. Copy the `.env.example` file to `.env` and fill out any necessary values.
42-
4. Start the application: i.e. Run `npm run dev`
42+
4. Start the application: i.e. Run `pnpm dev`
4343
5. Navigate to `http://localhost:3000/` in a browser.
4444

4545

0 commit comments

Comments
 (0)