Skip to content

Commit 606867f

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

File tree

12 files changed

+3534
-2792
lines changed

12 files changed

+3534
-2792
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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
if: matrix.os == 'ubuntu-24.04'
128128
working-directory: ./crc-extension
129129
run: |
130-
yarn install --check-files
130+
pnpm install --check-files
131131
# build crc extension
132132
podman build -t openshift_local_image . -f ./oci/Containerfile.multistage
133133
CONTAINER_ID_CRC=$(podman create localhost/openshift_local_image --entrypoint "")
@@ -150,10 +150,10 @@ jobs:
150150
shell: bash
151151
working-directory: ./crc-extension
152152
run: |
153-
yarn install --check-files
153+
pnpm install --check-files
154154
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
155155
# build extension
156-
yarn build
156+
pnpm build
157157
# make expected test folders
158158
mkdir -p tests/playwright/output/crc-tests-pd/plugins/crcextension
159159
mkdir -p tests/playwright/output/crc-tests-pd/plugins/ssoextension
@@ -165,10 +165,10 @@ jobs:
165165
working-directory: ./crc-extension
166166
shell: pwsh
167167
run: |
168-
yarn install --check-files
168+
pnpm install --check-files
169169
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
170170
# build extension
171-
yarn build
171+
pnpm build
172172
# make expected test folders
173173
mkdir tests\playwright\output\crc-tests-pd\plugins
174174
mkdir tests\playwright\output\crc-tests-pd\plugins\crcextension
@@ -205,7 +205,7 @@ jobs:
205205
working-directory: ./crc-extension
206206
env:
207207
PODMAN_DESKTOP_ARGS: ${{ github.workspace }}/podman-desktop
208-
run: yarn test:e2e
208+
run: pnpm test:e2e
209209

210210
- name: Publish Test Report
211211
uses: mikepenz/action-junit-report@v6

.github/workflows/pr-check.yaml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -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,25 @@ 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+
- name: Get pnpm cache directory path
70+
id: pnpm-cache-dir-path
71+
run: echo "dir=$(pnpm cache dir)" >> ${GITHUB_OUTPUT}
7272

7373
- uses: actions/cache@v4
74-
id: yarn-cache
74+
id: pnpm-cache
7575
with:
76-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
77-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
76+
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
77+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }}
7878
restore-keys: |
79-
${{ runner.os }}-yarn-
79+
${{ runner.os }}-pnpm-
8080
81-
- name: Execute yarn
81+
- name: Execute pnpm
8282
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
83-
run: yarn --frozen-lockfile --network-timeout 180000
83+
run: pnpm --frozen-lockfile --network-timeout 180000
8484

8585
- name: Run Build
8686
timeout-minutes: 20
87-
run: yarn build
87+
run: pnpm build
8888

8989
lint-format-unit:
9090
name: linter, formatters and unit tests
@@ -95,29 +95,29 @@ jobs:
9595
with:
9696
node-version: 22
9797

98-
- name: Get yarn cache directory path
99-
id: yarn-cache-dir-path
100-
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
98+
- name: Get pnpm cache directory path
99+
id: pnpm-cache-dir-path
100+
run: echo "dir=$(pnpm cache dir)" >> ${GITHUB_OUTPUT}
101101

102102
- uses: actions/cache@v4
103-
id: yarn-cache
103+
id: pnpm-cache
104104
with:
105-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
106-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
105+
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
106+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }}
107107
restore-keys: |
108-
${{ runner.os }}-yarn-
108+
${{ runner.os }}-pnpm-
109109
110-
- name: Execute yarn
111-
run: yarn --frozen-lockfile
110+
- name: Execute pnpm
111+
run: pnpm --frozen-lockfile
112112

113113
- name: Run linter
114-
run: yarn lint:check
114+
run: pnpm lint:check
115115

116116
- name: Run formatter
117-
run: yarn format:check
117+
run: pnpm format:check
118118

119119
- name: Run Tests
120-
run: yarn test
120+
run: pnpm test
121121

122122
e2e-tests:
123123
name: e2e tests for ${{ matrix.os }}
@@ -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)