Skip to content

Commit 13a150f

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

File tree

12 files changed

+3553
-2801
lines changed

12 files changed

+3553
-2801
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: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2024 Red Hat, Inc.
2+
# Copyright (C) 2024-2025 Red Hat, Inc.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -82,6 +82,16 @@ jobs:
8282
run_install: false
8383
package_json_file: ./podman-desktop/package.json
8484

85+
- name: Install pnpm
86+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
87+
with:
88+
run_install: false
89+
90+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
91+
with:
92+
node-version: 22
93+
cache: 'pnpm'
94+
8595
- name: Install & build Podman Desktop for E2E tests
8696
working-directory: ./podman-desktop
8797
run: |
@@ -127,7 +137,7 @@ jobs:
127137
if: matrix.os == 'ubuntu-24.04'
128138
working-directory: ./crc-extension
129139
run: |
130-
yarn install --check-files
140+
pnpm install --check-files
131141
# build crc extension
132142
podman build -t openshift_local_image . -f ./oci/Containerfile.multistage
133143
CONTAINER_ID_CRC=$(podman create localhost/openshift_local_image --entrypoint "")
@@ -150,10 +160,10 @@ jobs:
150160
shell: bash
151161
working-directory: ./crc-extension
152162
run: |
153-
yarn install --check-files
163+
pnpm install --check-files
154164
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
155165
# build extension
156-
yarn build
166+
pnpm build
157167
# make expected test folders
158168
mkdir -p tests/playwright/output/crc-tests-pd/plugins/crcextension
159169
mkdir -p tests/playwright/output/crc-tests-pd/plugins/ssoextension
@@ -165,10 +175,10 @@ jobs:
165175
working-directory: ./crc-extension
166176
shell: pwsh
167177
run: |
168-
yarn install --check-files
178+
pnpm install --check-files
169179
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
170180
# build extension
171-
yarn build
181+
pnpm build
172182
# make expected test folders
173183
mkdir tests\playwright\output\crc-tests-pd\plugins
174184
mkdir tests\playwright\output\crc-tests-pd\plugins\crcextension
@@ -205,7 +215,7 @@ jobs:
205215
working-directory: ./crc-extension
206216
env:
207217
PODMAN_DESKTOP_ARGS: ${{ github.workspace }}/podman-desktop
208-
run: yarn test:e2e
218+
run: pnpm test:e2e
209219

210220
- name: Publish Test Report
211221
uses: mikepenz/action-junit-report@v6

.github/workflows/pr-check.yaml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2022-2024 Red Hat, Inc.
2+
# Copyright (C) 2022-2025 Red Hat, Inc.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -33,25 +33,25 @@ jobs:
3333
with:
3434
node-version: 22
3535

36-
- name: Get yarn cache directory path
37-
id: yarn-cache-dir-path
38-
run: echo "dir=$(yarn cache dir)" >> ${env:GITHUB_OUTPUT}
36+
- name: Get pnpm cache directory path
37+
id: pnpm-cache-dir-path
38+
run: echo "dir=$(pnpm cache dir)" >> ${env:GITHUB_OUTPUT}
3939

4040
- uses: actions/cache@v4
41-
id: yarn-cache
41+
id: pnpm-cache
4242
with:
43-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
44-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
43+
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
44+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }}
4545
restore-keys: |
46-
${{ runner.os }}-yarn-
46+
${{ runner.os }}-pnpm-
4747
48-
- name: yarn
48+
- name: pnpm
4949
run: |
50-
yarn --frozen-lockfile --network-timeout 180000
50+
pnpm --frozen-lockfile --network-timeout 180000
5151
5252
- name: Run Build
5353
timeout-minutes: 20
54-
run: yarn build
54+
run: pnpm build
5555

5656
darwin:
5757
name: macOS
@@ -66,25 +66,22 @@ jobs:
6666
with:
6767
node-version: 22
6868

69-
- name: Get yarn cache directory path
70-
id: yarn-cache-dir-path
71-
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
69+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
70+
name: Install pnpm
71+
with:
72+
run_install: false
7273

73-
- uses: actions/cache@v4
74-
id: yarn-cache
74+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
7575
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-
76+
node-version: 22
77+
cache: 'pnpm'
8078

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

8582
- name: Run Build
8683
timeout-minutes: 20
87-
run: yarn build
84+
run: pnpm build
8885

8986
lint-format-unit:
9087
name: linter, formatters and unit tests
@@ -95,29 +92,27 @@ jobs:
9592
with:
9693
node-version: 22
9794

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

102-
- uses: actions/cache@v4
103-
id: yarn-cache
100+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
104101
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-
102+
node-version: 22
103+
cache: 'pnpm'
109104

110-
- name: Execute yarn
111-
run: yarn --frozen-lockfile
105+
- name: Run pnpm
106+
run: pnpm install
112107

113108
- name: Run linter
114-
run: yarn lint:check
109+
run: pnpm lint:check
115110

116111
- name: Run formatter
117-
run: yarn format:check
112+
run: pnpm format:check
118113

119114
- name: Run Tests
120-
run: yarn test
115+
run: pnpm test
121116

122117
e2e-tests:
123118
name: e2e tests for ${{ matrix.os }}
@@ -155,12 +150,17 @@ jobs:
155150
with:
156151
node-version: 22
157152

158-
- name: Install pnpm
159-
uses: pnpm/action-setup@v4
153+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
154+
name: Install pnpm
160155
with:
161156
run_install: false
162157
package_json_file: ./podman-desktop/package.json
163158

159+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
160+
with:
161+
node-version: 22
162+
cache: 'pnpm'
163+
164164
- name: Install & build Podman Desktop for E2E tests
165165
working-directory: ./podman-desktop
166166
run: |
@@ -206,7 +206,7 @@ jobs:
206206
if: matrix.os == 'ubuntu-24.04'
207207
working-directory: ./crc-extension
208208
run: |
209-
yarn install --check-files
209+
pnpm install --check-files
210210
# build crc extension
211211
podman build -t openshift_local_image . -f ./oci/Containerfile.multistage
212212
CONTAINER_ID_CRC=$(podman create localhost/openshift_local_image --entrypoint "")
@@ -229,10 +229,10 @@ jobs:
229229
shell: bash
230230
working-directory: ./crc-extension
231231
run: |
232-
yarn install --check-files
232+
pnpm install --check-files
233233
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
234234
# build extension
235-
yarn build
235+
pnpm build
236236
# make expected test folders
237237
mkdir -p tests/playwright/output/crc-tests-pd/plugins/crcextension
238238
mkdir -p tests/playwright/output/crc-tests-pd/plugins/ssoextension
@@ -244,10 +244,10 @@ jobs:
244244
working-directory: ./crc-extension
245245
shell: pwsh
246246
run: |
247-
yarn install --check-files
247+
pnpm install --check-files
248248
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
249249
# build extension
250-
yarn build
250+
pnpm build
251251
# make expected test folders
252252
mkdir tests\playwright\output\crc-tests-pd\plugins
253253
mkdir tests\playwright\output\crc-tests-pd\plugins\crcextension
@@ -284,7 +284,7 @@ jobs:
284284
working-directory: ./crc-extension
285285
env:
286286
PODMAN_DESKTOP_ARGS: ${{ github.workspace }}/podman-desktop
287-
run: yarn test:e2e
287+
run: pnpm test:e2e
288288

289289
- name: Publish Test Report
290290
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:38c62c09f82794dcf4588cbc0f9a92b614ec865da5eaed67f81e7d2faf3f0913
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

oci/Containerfile.multistage

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ FROM ghcr.io/crc-org/crc-extension-builder:latest AS builder
1919

2020
COPY . .
2121

22-
RUN yarn --network-timeout 180000 \
23-
&& yarn build
22+
RUN npm install -g pnpm
23+
24+
RUN pnpm i \
25+
&& pnpm build
2426

2527
FROM scratch
2628

0 commit comments

Comments
 (0)