Skip to content

Commit ee54cc5

Browse files
authored
Merge pull request #72 from KubrickCode/develop/shlee/pnpm
chore: Migrating the package manager from yarn to pnpm
2 parents 9b1e6d0 + e891d0c commit ee54cc5

File tree

12 files changed

+17250
-10365
lines changed

12 files changed

+17250
-10365
lines changed

.devcontainer/local-features/node/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
set -e
44

5-
yarn set version berry
5+
corepack enable
6+
corepack prepare pnpm@9.15.0 --activate

.github/workflows/lint.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,15 @@ jobs:
3939
with:
4040
node-version: "22.18.0"
4141

42+
- name: Setup pnpm
43+
uses: pnpm/action-setup@v4
44+
with:
45+
version: 9.15.0
46+
4247
- uses: extractions/setup-just@v3
4348

4449
- name: Install dependencies
45-
run: |
46-
just deps-root
47-
just deps-extension
50+
run: just deps
4851

4952
- name: Lint Extension
5053
run: just lint extension
@@ -61,12 +64,15 @@ jobs:
6164
with:
6265
node-version: "22.18.0"
6366

67+
- name: Setup pnpm
68+
uses: pnpm/action-setup@v4
69+
with:
70+
version: 9.15.0
71+
6472
- uses: extractions/setup-just@v3
6573

6674
- name: Install dependencies
67-
run: |
68-
just deps-root
69-
just deps-web-view
75+
run: just deps
7076

7177
- name: Lint Web View
7278
run: just lint web-view
@@ -83,10 +89,15 @@ jobs:
8389
with:
8490
node-version: "22.18.0"
8591

92+
- name: Setup pnpm
93+
uses: pnpm/action-setup@v4
94+
with:
95+
version: 9.15.0
96+
8697
- uses: extractions/setup-just@v3
8798

8899
- name: Install dependencies
89-
run: just deps-root
100+
run: just deps
90101

91102
- name: Lint Config Files
92103
run: just lint config

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
with:
2525
node-version: "20"
2626

27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: 9.15.0
31+
2732
- name: Install just
2833
uses: extractions/setup-just@v3
2934

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
with:
3030
node-version: "22.18.0"
3131

32+
- name: Setup pnpm
33+
uses: pnpm/action-setup@v4
34+
with:
35+
version: 9.15.0
36+
3237
- uses: extractions/setup-just@v3
3338

3439
- name: Install dependencies

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ build/Release
4141
node_modules/
4242
jspm_packages/
4343

44+
# pnpm
45+
.pnpm-store/
46+
4447
# Snowpack dependency directory (https://snowpack.dev/)
4548
web_modules/
4649

justfile

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ web_view_dir := root_dir + "/src/web-view"
77
deps: deps-root deps-extension deps-web-view
88

99
deps-root:
10-
cd "{{ root_dir }}" && yarn install
10+
cd "{{ root_dir }}" && pnpm install
1111

1212
deps-extension:
13-
cd "{{ extension_dir }}" && yarn install
13+
cd "{{ extension_dir }}" && pnpm install
1414

1515
deps-web-view:
16-
cd "{{ web_view_dir }}" && yarn install
16+
cd "{{ web_view_dir }}" && pnpm install
1717

1818
install-package:
19-
cd "{{ root_dir }}" && yarn install-package
19+
cd "{{ root_dir }}" && pnpm install-package
2020

2121
clean-build:
2222
rm -rf "{{ web_view_dir }}/dist"
@@ -36,12 +36,12 @@ lint target="all":
3636
extension)
3737
npx prettier --write "{{ extension_dir }}/src/**/*.ts"
3838
cd "{{ extension_dir }}"
39-
yarn lint
39+
pnpm lint
4040
;;
4141
web-view)
4242
npx prettier --write "{{ web_view_dir }}/src/**/*.{ts,tsx}"
4343
cd "{{ web_view_dir }}"
44-
yarn lint
44+
pnpm lint
4545
;;
4646
config)
4747
npx prettier --write "**/*.{json,yml,yaml,md}"
@@ -56,28 +56,28 @@ lint target="all":
5656
esac
5757

5858
package: clean-build
59-
cd "{{ web_view_dir }}" && yarn build
59+
cd "{{ web_view_dir }}" && pnpm build
6060
cp -r "{{ web_view_dir }}/dist" "{{ extension_dir }}/web-view-dist"
61-
cd "{{ extension_dir }}" && yarn compile
62-
cd "{{ root_dir }}" && yarn package
61+
cd "{{ extension_dir }}" && pnpm compile
62+
cd "{{ root_dir }}" && pnpm package
6363

6464
publish target="both":
6565
#!/usr/bin/env bash
6666
cd "{{ root_dir }}"
6767
if [ "{{ target }}" = "vsce" ] || [ "{{ target }}" = "both" ]; then
6868
echo "Publishing to VS Code Marketplace..."
6969
if [ -n "$VSCE_ACCESS_TOKEN" ]; then
70-
yarn vsce-publish --pat "$VSCE_ACCESS_TOKEN"
70+
pnpm vsce-publish --pat "$VSCE_ACCESS_TOKEN"
7171
else
72-
yarn vsce-publish
72+
pnpm vsce-publish
7373
fi
7474
fi
7575
if [ "{{ target }}" = "ovsx" ] || [ "{{ target }}" = "both" ]; then
7676
echo "Publishing to Open VSX Registry..."
7777
if [ -n "$OVSX_ACCESS_TOKEN" ]; then
78-
yarn ovsx-publish --pat "$OVSX_ACCESS_TOKEN"
78+
pnpm ovsx-publish --pat "$OVSX_ACCESS_TOKEN"
7979
else
80-
yarn ovsx-publish
80+
pnpm ovsx-publish
8181
fi
8282
fi
8383

@@ -92,15 +92,15 @@ release version="patch":
9292
@echo "✅ Release complete! Check GitHub Actions."
9393

9494
run-view:
95-
cd "{{ web_view_dir }}" && yarn dev
95+
cd "{{ web_view_dir }}" && pnpm dev
9696

9797
test mode="":
9898
#!/usr/bin/env bash
9999
cd "{{ extension_dir }}"
100100
if [ "{{ mode }}" = "watch" ]; then
101-
yarn test:watch
101+
pnpm test:watch
102102
elif [ "{{ mode }}" = "coverage" ]; then
103-
yarn test --coverage
103+
pnpm test:coverage
104104
else
105-
yarn test
105+
pnpm test
106106
fi

0 commit comments

Comments
 (0)