Skip to content

Commit 808e49d

Browse files
committed
Move to pnpm
This involved - specifying our Electron dependency properly -> we were missing the "github:" protocol - adding some missing '@types' packages -> fixing some type issues that weren't caught before - fixing imports from 'react-router' (it's 'react-router-dom') - "Find and replace"ing quite a few "yarn"s with "pnpm"s. Let's hope the Workflows still... work
1 parent f79f9e0 commit 808e49d

33 files changed

+9580
-8990
lines changed

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
// Add the IDs of extensions you want installed when the container is created.
1111
"extensions": [],
1212

13-
"postCreateCommand": "pacman -Syyu --noconfirm && pacman -S nodejs npm yarn --noconfirm"
13+
"postCreateCommand": "pacman -Syyu --noconfirm && pacman -S nodejs npm pnpm --noconfirm"
1414
}

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
yarn.lock -diff
1+
pnpm-lock.yaml -diff

.github/workflows/build-prs-linux.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,20 @@ jobs:
1717
uses: actions/checkout@v3
1818
- name: Install dependencies
1919
run: sudo apt install snapcraft -y
20+
- uses: pnpm/action-setup@v2
21+
with:
22+
version: 8
2023
- name: Setup NodeJS
2124
uses: actions/setup-node@v3
2225
with:
2326
node-version: '18'
24-
cache: 'yarn'
27+
cache: 'pnpm'
2528
- name: Install node-gyp.
26-
run: yarn global add node-gyp
29+
run: pnpm add --global node-gyp
2730
- name: Install modules.
28-
run: yarn install --frozen-lockfile
31+
run: pnpm install --frozen-lockfile
2932
- name: Build artifacts.
30-
run: yarn dist:linux appimage snap --publish=never
33+
run: pnpm dist:linux appimage snap --publish=never
3134
env:
3235
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
3336
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

.github/workflows/build-prs-mac.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,20 @@ jobs:
1515
steps:
1616
- name: Checkout repository.
1717
uses: actions/checkout@v3
18+
- uses: pnpm/action-setup@v2
19+
with:
20+
version: 8
1821
- name: Setup NodeJS
1922
uses: actions/setup-node@v3
2023
with:
2124
node-version: '18'
22-
cache: 'yarn'
25+
cache: 'pnpm'
2326
- name: Install node-gyp.
24-
run: yarn global add node-gyp
27+
run: pnpm add --global node-gyp
2528
- name: Install modules.
26-
run: yarn install --frozen-lockfile
29+
run: pnpm install --frozen-lockfile
2730
- name: Build artifacts.
28-
run: yarn dist:mac --x64 --arm64 --publish=never
31+
run: pnpm dist:mac --x64 --arm64 --publish=never
2932
env:
3033
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
3134
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

.github/workflows/build-prs-windows.yml

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
steps:
1616
- name: Checkout repository.
1717
uses: actions/checkout@v3
18+
- uses: pnpm/action-setup@v2
19+
with:
20+
version: 8
1821
- name: Setup NodeJS
1922
uses: actions/setup-node@v3
2023
with:

.github/workflows/build.yml

+16-14
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
uses: actions/setup-node@v3
1818
with:
1919
node-version: '18'
20-
cache: 'yarn'
20+
cache: 'pnpm'
2121
- name: Install node-gyp.
22-
run: yarn global add node-gyp
22+
run: pnpm add --global node-gyp
2323
- name: Install modules.
24-
run: yarn install --frozen-lockfile
24+
run: pnpm install --frozen-lockfile
2525
- name: Build artifacts.
26-
run: yarn dist:win portable
26+
run: pnpm dist:win portable
2727
- name: Upload EXE.
2828
uses: actions/upload-artifact@v3
2929
with:
@@ -40,17 +40,17 @@ jobs:
4040
uses: actions/setup-node@v3
4141
with:
4242
node-version: '18'
43-
cache: 'yarn'
43+
cache: 'pnpm'
4444
- name: Install node-gyp.
45-
run: yarn global add node-gyp
45+
run: pnpm add --global node-gyp
4646
- name: Install modules.
47-
run: yarn install --frozen-lockfile
47+
run: pnpm install --frozen-lockfile
4848
- name: Upload Snap to Edge Channel.
49-
run: yarn dist:linux snap --publish=always
49+
run: pnpm dist:linux snap --publish=always
5050
env:
5151
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_ID_EDGE }}
5252
- name: Build artifacts.
53-
run: yarn dist:linux appimage --publish=never
53+
run: pnpm dist:linux appimage --publish=never
5454
- name: Upload AppImage.
5555
uses: actions/upload-artifact@v3
5656
with:
@@ -62,18 +62,20 @@ jobs:
6262
steps:
6363
- name: Checkout repository.
6464
uses: actions/checkout@v3
65-
65+
- uses: pnpm/action-setup@v2
66+
with:
67+
version: 8
6668
- name: Setup NodeJS
6769
uses: actions/setup-node@v3
6870
with:
6971
node-version: '18'
70-
cache: 'yarn'
72+
cache: 'pnpm'
7173
- name: Install node-gyp.
72-
run: yarn global add node-gyp
74+
run: pnpm add --global node-gyp
7375
- name: Install modules.
74-
run: yarn install --frozen-lockfile
76+
run: pnpm install --frozen-lockfile
7577
- name: Build artifacts.
76-
run: yarn dist:mac --x64 --arm64 --publish=never
78+
run: pnpm dist:mac --x64 --arm64 --publish=never
7779
env:
7880
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
7981
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

.github/workflows/codecheck.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v3
13+
- uses: pnpm/action-setup@v2
14+
with:
15+
version: 8
1316
- uses: actions/setup-node@v3
1417
with:
1518
node-version: '18'
16-
cache: 'yarn'
19+
cache: 'pnpm'
1720
- name: Install node-gyp.
18-
run: yarn global add node-gyp
21+
run: pnpm add --global node-gyp
1922
- name: Install modules.
20-
run: yarn install --frozen-lockfile
23+
run: pnpm install --frozen-lockfile
2124
- name: Check Typescript syntax
22-
run: yarn codecheck
25+
run: pnpm codecheck

.github/workflows/draft-release-linux.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ jobs:
1212
steps:
1313
- run: sudo apt-get install --no-install-recommends -y libarchive-tools libopenjp2-tools rpm snapcraft
1414
- uses: actions/checkout@v3
15+
- uses: pnpm/action-setup@v2
16+
with:
17+
version: 8
1518
- uses: actions/setup-node@v3
1619
with:
1720
node-version: '18'
18-
cache: 'yarn'
19-
- run: yarn install --frozen-lockfile
20-
- run: yarn release:linux
21+
cache: 'pnpm'
22+
- run: pnpm install --frozen-lockfile
23+
- run: pnpm release:linux
2124
env:
2225
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
2326
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

.github/workflows/draft-release-mac.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ jobs:
2323
runs-on: macos-latest
2424
steps:
2525
- uses: actions/checkout@v3
26+
- uses: pnpm/action-setup@v2
27+
with:
28+
version: 8
2629
- uses: actions/setup-node@v3
2730
with:
2831
node-version: '18'
29-
cache: 'yarn'
32+
cache: 'pnpm'
3033
- uses: actions/setup-python@v4
3134
with:
3235
python-version: '3.10'
3336
- run: python3 -m pip install castlabs-evs
34-
- run: yarn install --frozen-lockfile
35-
- run: yarn release:mac
37+
- run: pnpm install --frozen-lockfile
38+
- run: pnpm release:mac

.github/workflows/draft-release-windows.yml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
runs-on: windows-latest
1212
steps:
1313
- uses: actions/checkout@v3
14+
- uses: pnpm/action-setup@v2
15+
with:
16+
version: 8
1417
- uses: actions/setup-node@v3
1518
with:
1619
node-version: '18'

.github/workflows/flatpak-build.yml

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
steps:
2020
- name: Checkout Repo
2121
uses: actions/checkout@v3
22+
- uses: pnpm/action-setup@v2
23+
with:
24+
version: 8
2225
- name: Setup NodeJS
2326
uses: actions/setup-node@v3
2427
with:

.github/workflows/lint.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v3
13+
- uses: pnpm/action-setup@v2
14+
with:
15+
version: 8
1316
- uses: actions/setup-node@v3
1417
with:
1518
node-version: '18'
16-
cache: 'yarn'
19+
cache: 'pnpm'
1720
- name: Install node-gyp.
18-
run: yarn global add node-gyp
21+
run: pnpm add --global node-gyp
1922
- name: Install modules.
20-
run: yarn install --frozen-lockfile
23+
run: pnpm install --frozen-lockfile
2124
- name: Lint code.
22-
run: yarn lint
25+
run: pnpm lint
2326
- name: Prettier code.
24-
run: yarn prettier
27+
run: pnpm prettier
2528
- name: Find dead code
26-
run: yarn find-deadcode
29+
run: pnpm find-deadcode

.github/workflows/release_flathub.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,24 @@ jobs:
2222
run: echo "tag name ${{ github.ref_name }}"
2323
- name: Checkout repository.
2424
uses: actions/checkout@v3
25+
- uses: pnpm/action-setup@v2
26+
with:
27+
version: 8
2528
- name: Setup NodeJS
2629
uses: actions/setup-node@v3
2730
with:
2831
node-version: '18'
29-
cache: 'yarn'
32+
cache: 'pnpm'
3033
- name: Reconfigure git to use HTTP authentication
3134
run: >
3235
git config --global url."https://github.com/".insteadOf
3336
3437
- name: Install modules.
35-
run: yarn install
38+
run: pnpm install
3639
- name: Checkout flathub repository.
3740
run: git clone https://github.com/flathub/com.heroicgameslauncher.hgl.git
3841
- name: Update flathub release
39-
run: export RELEASE_VERSION=${{ github.ref_name }} && yarn release:updateFlathub:ci
42+
run: export RELEASE_VERSION=${{ github.ref_name }} && pnpm release:updateFlathub:ci
4043
- name: Branch flathub repo
4144
run: git checkout -b "${{ github.ref_name }}"
4245
working-directory: ./com.heroicgameslauncher.hgl

.github/workflows/test-e2e-dev.yml

+12-9
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,21 @@ jobs:
1111
steps:
1212
- name: Checkout repository.
1313
uses: actions/checkout@v3
14+
- uses: pnpm/action-setup@v2
15+
with:
16+
version: 8
1417
- uses: actions/setup-node@v3
1518
with:
1619
node-version: '18'
17-
cache: 'yarn'
20+
cache: 'pnpm'
1821
- name: Install node-gyp.
19-
run: yarn global add node-gyp
22+
run: pnpm add --global node-gyp
2023
- name: Install modules.
21-
run: yarn install --frozen-lockfile
24+
run: pnpm install --frozen-lockfile
2225
env:
2326
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
2427
- name: Build and Test
25-
run: yarn test:e2e-ci
28+
run: pnpm test:e2e-ci
2629

2730
mac:
2831
runs-on: macos-latest
@@ -33,15 +36,15 @@ jobs:
3336
uses: actions/setup-node@v3
3437
with:
3538
node-version: '18'
36-
cache: 'yarn'
39+
cache: 'pnpm'
3740
- name: Install node-gyp.
38-
run: yarn global add node-gyp
41+
run: pnpm add --global node-gyp
3942
- name: Install modules.
40-
run: yarn install --frozen-lockfile
43+
run: pnpm install --frozen-lockfile
4144
env:
4245
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
4346
- name: Build and Test
44-
run: yarn test:e2e-ci
47+
run: pnpm test:e2e-ci
4548
env:
4649
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
4750
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
@@ -61,7 +64,7 @@ jobs:
6164
env:
6265
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
6366
- name: Build and Test
64-
run: yarn test:e2e-ci
67+
run: pnpm test:e2e-ci
6568
env:
6669
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
6770
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

.github/workflows/test-e2e-packaged.yml

+12-9
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@ jobs:
1414
steps:
1515
- name: Checkout repository.
1616
uses: actions/checkout@v3
17+
- uses: pnpm/action-setup@v2
18+
with:
19+
version: 8
1720
- uses: actions/setup-node@v3
1821
with:
1922
node-version: '18'
20-
cache: 'yarn'
23+
cache: 'pnpm'
2124
- name: Install node-gyp.
22-
run: yarn global add node-gyp
25+
run: pnpm add --global node-gyp
2326
- name: Install modules.
24-
run: yarn install --frozen-lockfile
27+
run: pnpm install --frozen-lockfile
2528
env:
2629
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
2730
- name: Build and Test
28-
run: yarn test:e2ePackaged-ci
31+
run: pnpm test:e2ePackaged-ci
2932

3033
mac:
3134
runs-on: macos-latest
@@ -36,15 +39,15 @@ jobs:
3639
uses: actions/setup-node@v3
3740
with:
3841
node-version: '18'
39-
cache: 'yarn'
42+
cache: 'pnpm'
4043
- name: Install node-gyp.
41-
run: yarn global add node-gyp
44+
run: pnpm add --global node-gyp
4245
- name: Install modules.
43-
run: yarn install --frozen-lockfile
46+
run: pnpm install --frozen-lockfile
4447
env:
4548
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
4649
- name: Build and Test
47-
run: yarn test:e2ePackaged-ci
50+
run: pnpm test:e2ePackaged-ci
4851
env:
4952
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
5053
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
@@ -64,7 +67,7 @@ jobs:
6467
env:
6568
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
6669
- name: Build and Test
67-
run: yarn test:e2ePackaged-ci
70+
run: pnpm test:e2ePackaged-ci
6871
env:
6972
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
7073
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

0 commit comments

Comments
 (0)