Skip to content

Commit f3767ad

Browse files
committed
chore: migrate from yarn to pnpm
Signed-off-by: Evzen Gasta <[email protected]>
1 parent f337240 commit f3767ad

File tree

13 files changed

+3550
-2818
lines changed

13 files changed

+3550
-2818
lines changed

.extfiles

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ LICENSE
33
icon.png
44
README.md
55
dist/**
6-
!dist/yarn.lock
6+
!dist/pnpm-lock.yaml

.github/workflows/e2e-main.yml

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,39 @@ jobs:
5050
env:
5151
SKIP_INSTALLATION: true
5252
steps:
53+
- uses: actions/checkout@v6
54+
if: github.event_name == 'workflow_dispatch'
55+
with:
56+
repository: ${{ github.event.inputs.organization }}/${{ github.event.inputs.repositoryName }}
57+
ref: ${{ github.event.inputs.branch }}
58+
path: ${{ github.event.inputs.repositoryName }}
5359

54-
- name: Checkout crc extension
55-
uses: actions/checkout@v6
60+
- uses: actions/checkout@v6
61+
if: github.event_name == 'push'
5662
with:
5763
path: crc-extension
5864

59-
- name: Checkout podman desktop
60-
uses: actions/checkout@v6
65+
# Checkout podman desktop
66+
- uses: actions/checkout@v6
6167
with:
6268
repository: podman-desktop/podman-desktop
6369
ref: main
6470
path: podman-desktop
6571

72+
- uses: actions/setup-node@v6
73+
with:
74+
node-version: 22
75+
76+
- uses: pnpm/action-setup@v4
77+
name: Install pnpm
78+
with:
79+
run_install: false
80+
package_json_file: ./podman-desktop/package.json
81+
82+
- name: Execute pnpm in CRC Extension
83+
working-directory: ./crc-extension
84+
run: pnpm install
85+
6686
- name: Checkout sso extension (crc-extension dependency)
6787
uses: actions/checkout@v6
6888
if: matrix.os == 'windows-2025' || matrix.os == 'macos-26'
@@ -71,17 +91,6 @@ jobs:
7191
ref: main
7292
path: sso-extension
7393

74-
- name: Install node
75-
uses: actions/setup-node@v6
76-
with:
77-
node-version: 22
78-
79-
- name: Install pnpm
80-
uses: pnpm/action-setup@v4
81-
with:
82-
run_install: false
83-
package_json_file: ./podman-desktop/package.json
84-
8594
- name: Install & build Podman Desktop for E2E tests
8695
working-directory: ./podman-desktop
8796
run: |
@@ -127,7 +136,7 @@ jobs:
127136
if: matrix.os == 'ubuntu-24.04'
128137
working-directory: ./crc-extension
129138
run: |
130-
yarn install --check-files
139+
pnpm install --check-files
131140
# build crc extension
132141
podman build -t openshift_local_image . -f ./oci/Containerfile.multistage
133142
CONTAINER_ID_CRC=$(podman create localhost/openshift_local_image --entrypoint "")
@@ -150,10 +159,10 @@ jobs:
150159
shell: bash
151160
working-directory: ./crc-extension
152161
run: |
153-
yarn install --check-files
162+
pnpm install --check-files
154163
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
155164
# build extension
156-
yarn build
165+
pnpm build
157166
# make expected test folders
158167
mkdir -p tests/playwright/output/crc-tests-pd/plugins/crcextension
159168
mkdir -p tests/playwright/output/crc-tests-pd/plugins/ssoextension
@@ -165,10 +174,10 @@ jobs:
165174
working-directory: ./crc-extension
166175
shell: pwsh
167176
run: |
168-
yarn install --check-files
177+
pnpm install --check-files
169178
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
170179
# build extension
171-
yarn build
180+
pnpm build
172181
# make expected test folders
173182
mkdir tests\playwright\output\crc-tests-pd\plugins
174183
mkdir tests\playwright\output\crc-tests-pd\plugins\crcextension
@@ -205,7 +214,7 @@ jobs:
205214
working-directory: ./crc-extension
206215
env:
207216
PODMAN_DESKTOP_ARGS: ${{ github.workspace }}/podman-desktop
208-
run: yarn test:e2e
217+
run: pnpm test:e2e
209218

210219
- name: Publish Test Report
211220
uses: mikepenz/action-junit-report@v6

.github/workflows/pr-check.yaml

Lines changed: 49 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,24 @@ jobs:
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929
steps:
30-
- uses: actions/checkout@v6
30+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3131

32-
- uses: actions/setup-node@v6
32+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
33+
name: Install pnpm
3334
with:
34-
node-version: 22
35-
36-
- name: Get yarn cache directory path
37-
id: yarn-cache-dir-path
38-
run: echo "dir=$(yarn cache dir)" >> ${env:GITHUB_OUTPUT}
35+
run_install: false
3936

40-
- uses: actions/cache@v5
41-
id: yarn-cache
37+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
4238
with:
43-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
44-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
45-
restore-keys: |
46-
${{ runner.os }}-yarn-
39+
node-version: 22
40+
cache: 'pnpm'
4741

48-
- name: yarn
49-
run: |
50-
yarn --frozen-lockfile --network-timeout 180000
42+
- name: Execute pnpm
43+
run: pnpm install
5144

5245
- name: Run Build
5346
timeout-minutes: 20
54-
run: yarn build
47+
run: pnpm build
5548

5649
darwin:
5750
name: macOS
@@ -60,64 +53,52 @@ jobs:
6053
env:
6154
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6255
steps:
63-
- uses: actions/checkout@v6
56+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6457

65-
- uses: actions/setup-node@v6
58+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
59+
name: Install pnpm
6660
with:
67-
node-version: 22
68-
69-
- name: Get yarn cache directory path
70-
id: yarn-cache-dir-path
71-
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
61+
run_install: false
7262

73-
- uses: actions/cache@v5
74-
id: yarn-cache
63+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
7564
with:
76-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
77-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
78-
restore-keys: |
79-
${{ runner.os }}-yarn-
65+
node-version: 22
66+
cache: 'pnpm'
8067

81-
- name: Execute yarn
82-
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
83-
run: yarn --frozen-lockfile --network-timeout 180000
68+
- name: Execute pnpm
69+
run: pnpm install
8470

8571
- name: Run Build
8672
timeout-minutes: 20
87-
run: yarn build
73+
run: pnpm build
8874

8975
lint-format-unit:
9076
name: linter, formatters and unit tests
9177
runs-on: ubuntu-24.04
9278
steps:
93-
- uses: actions/checkout@v6
94-
- uses: actions/setup-node@v6
95-
with:
96-
node-version: 22
79+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
9780

98-
- name: Get yarn cache directory path
99-
id: yarn-cache-dir-path
100-
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
81+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
82+
name: Install pnpm
83+
with:
84+
run_install: false
10185

102-
- uses: actions/cache@v5
103-
id: yarn-cache
86+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
10487
with:
105-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
106-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
107-
restore-keys: |
108-
${{ runner.os }}-yarn-
88+
node-version: 22
89+
cache: 'pnpm'
10990

110-
- name: Execute yarn
111-
run: yarn --frozen-lockfile
91+
- name: Execute pnpm
92+
run: pnpm install
11293

11394
- name: Run linter
114-
run: yarn lint:check
95+
run: pnpm lint:check
11596

11697
- name: Run formatter
117-
run: yarn format:check
98+
run: pnpm format:check
11899

119100
- name: Run Tests
120-
run: yarn test
101+
run: pnpm test
121102

122103
e2e-tests:
123104
name: e2e tests for ${{ matrix.os }}
@@ -131,35 +112,35 @@ jobs:
131112
steps:
132113

133114
- name: Checkout crc extension
134-
uses: actions/checkout@v6
115+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
135116
with:
136117
path: crc-extension
137118

138119
- name: Checkout podman desktop
139-
uses: actions/checkout@v6
120+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
140121
with:
141122
repository: podman-desktop/podman-desktop
142123
ref: main
143124
path: podman-desktop
144125

145126
- name: Checkout sso extension (crc-extension dependency)
146-
uses: actions/checkout@v6
127+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
147128
if: matrix.os == 'windows-2025' || matrix.os == 'macos-26'
148129
with:
149130
repository: redhat-developer/podman-desktop-redhat-account-ext
150131
ref: main
151132
path: sso-extension
152133

153-
- name: Install node
154-
uses: actions/setup-node@v6
134+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
135+
name: Install pnpm
155136
with:
156-
node-version: 22
137+
run_install: false
138+
package_json_file: ./crc-extension/package.json
157139

158-
- name: Install pnpm
159-
uses: pnpm/action-setup@v4
140+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
160141
with:
161-
run_install: false
162-
package_json_file: ./podman-desktop/package.json
142+
node-version: 22
143+
cache: 'pnpm'
163144

164145
- name: Install & build Podman Desktop for E2E tests
165146
working-directory: ./podman-desktop
@@ -206,7 +187,7 @@ jobs:
206187
if: matrix.os == 'ubuntu-24.04'
207188
working-directory: ./crc-extension
208189
run: |
209-
yarn install --check-files
190+
pnpm install --check-files
210191
# build crc extension
211192
podman build -t openshift_local_image . -f ./oci/Containerfile.multistage
212193
CONTAINER_ID_CRC=$(podman create localhost/openshift_local_image --entrypoint "")
@@ -229,10 +210,10 @@ jobs:
229210
shell: bash
230211
working-directory: ./crc-extension
231212
run: |
232-
yarn install --check-files
213+
pnpm install --check-files
233214
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
234215
# build extension
235-
yarn build
216+
pnpm build
236217
# make expected test folders
237218
mkdir -p tests/playwright/output/crc-tests-pd/plugins/crcextension
238219
mkdir -p tests/playwright/output/crc-tests-pd/plugins/ssoextension
@@ -244,10 +225,10 @@ jobs:
244225
working-directory: ./crc-extension
245226
shell: pwsh
246227
run: |
247-
yarn install --check-files
228+
pnpm install --check-files
248229
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
249230
# build extension
250-
yarn build
231+
pnpm build
251232
# make expected test folders
252233
mkdir tests\playwright\output\crc-tests-pd\plugins
253234
mkdir tests\playwright\output\crc-tests-pd\plugins\crcextension
@@ -284,7 +265,7 @@ jobs:
284265
working-directory: ./crc-extension
285266
env:
286267
PODMAN_DESKTOP_ARGS: ${{ github.workspace }}/podman-desktop
287-
run: yarn test:e2e
268+
run: pnpm test:e2e
288269

289270
- name: Publish Test Report
290271
uses: mikepenz/action-junit-report@v6

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ dist
66
.idea
77
**/test-resources
88
**/coverage
9-
yarn-error.log
109
builtin
1110
assets
1211
tests/**/output

.gitpod.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@
55
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
66

77
tasks:
8-
- init: yarn install && yarn run build
9-
command: yarn run watch
10-
11-
8+
- init: pnpm install && pnpm run build
9+
command: pnpm run watch

docs/develop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
To prepare dev environment, use:
66

77
```shell
8-
yarn desk:prepare
8+
pnpm desk:prepare
99
```
1010
This command check/clone podman-desktop, delete existing crc extension, make links, build podman-desktop without builtin OpenShift local extension.
1111

1212

1313
To launch podman-desktop with this OpenShift Local extension use:
1414

1515
```shell
16-
yarn desk:run
16+
pnpm desk:run
1717
```
1818

1919
Note: this copies the unpackaged content of the extension in `.local/share/containers/podman-desktop/plugins/openshift-local.cdix/`.
@@ -22,5 +22,5 @@ Note: this copies the unpackaged content of the extension in `.local/share/conta
2222
To rebuild podman-desktop and OpenShift Local extension run:
2323

2424
```shell
25-
yarn desk:build
25+
pnpm desk:build
2626
```

oci/Containerfile.builder

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
FROM registry.access.redhat.com/ubi10/nodejs-22@sha256:11a7e442c26772f6c0e90f8a32b5c15d08686fd41a371ed92759ca4d19c66cf2
2020

2121
COPY package.json .
22+
COPY pnpm-lock.yaml .
2223

23-
RUN npm install yarn --global \
24-
&& yarn --frozen-lockfile --network-timeout 180000
25-
24+
RUN npm install -g pnpm
25+
26+
RUN pnpm i --frozen-lockfile

0 commit comments

Comments
 (0)