Skip to content

Commit bcf3326

Browse files
committed
πŸ‘· Switch to pnpm package manager in cli
1 parent 2044012 commit bcf3326

12 files changed

Lines changed: 5678 additions & 14897 deletions

File tree

β€Ž.github/actions/test-create-project/action.ymlβ€Ž

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,27 @@ runs:
1111
using: 'composite'
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

16-
- name: Cache dependencies
17-
uses: actions/cache@v3
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
18+
19+
- name: Set up node env
20+
uses: actions/setup-node@v4
1821
with:
19-
path: ~/.npm
20-
key: npm-${{ hashFiles('package-lock.json') }}
21-
restore-keys: npm-
22+
node-version: 24
23+
cache: pnpm
2224

2325
- name: Install dependencies
24-
run: npm ci --ignore-scripts
26+
run: pnpm install --frozen-lockfile
2527
shell: bash
2628

2729
- name: Build the project
28-
run: npm run build
30+
run: pnpm run build
2931
shell: bash
3032

31-
- name: Run npm link
32-
run: npm link
33+
- name: Run pnpm link
34+
run: pnpm link --global
3335
shell: bash
3436

3537
- name: Create project
@@ -38,17 +40,17 @@ runs:
3840

3941
- name: Build created project
4042
working-directory: ./node-app
41-
run: npm run build
43+
run: pnpm run build
4244
shell: bash
4345

4446
- name: Run lint
4547
working-directory: ./node-app
46-
run: npm run ci-lint
48+
run: pnpm run ci-lint
4749
shell: bash
4850

4951
- name: Run tests
5052
working-directory: ./node-app
51-
run: npm run ci-test
53+
run: pnpm run ci-test
5254
shell: bash
5355
env:
5456
DB_CONNECTION_STRING: ${{inputs.dbConnection}}
@@ -57,7 +59,7 @@ runs:
5759
if: ${{ !contains(inputs.options, '--api none') }}
5860
working-directory: ./node-app
5961
run: |
60-
npm run start &
62+
pnpm run start &
6163
start_pid=$!
6264
sleep 10
6365
kill $start_pid
@@ -69,6 +71,6 @@ runs:
6971
if: ${{ contains(inputs.options, '--api none') }}
7072
working-directory: ./node-app
7173
shell: bash
72-
run: npm run start
74+
run: pnpm run start
7375
env:
7476
DB_CONNECTION_STRING: ${{inputs.dbConnection}}

β€Ž.github/workflows/build.ymlβ€Ž

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,19 @@ jobs:
1515

1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v4
1922

2023
- name: Set up node env
21-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2225
with:
2326
node-version: ${{ matrix.node-version }}
24-
25-
- name: Cache dependencies
26-
uses: actions/cache@v3
27-
with:
28-
path: ~/.npm
29-
key: npm-${{ hashFiles('package-lock.json') }}
30-
restore-keys: npm-
27+
cache: pnpm
3128

3229
- name: Install dependencies
33-
run: npm ci --ignore-scripts
30+
run: pnpm install --frozen-lockfile
3431

3532
- name: Build the project
36-
run: npm run build
33+
run: pnpm run build

β€Ž.github/workflows/publish.ymlβ€Ž

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,21 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v4
2121

22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v4
24+
2225
- name: Setup Node.js
2326
uses: actions/setup-node@v4
2427
with:
2528
node-version: 24
2629
registry-url: https://registry.npmjs.org
30+
cache: pnpm
2731

2832
- name: Install dependencies
29-
run: npm ci --ignore-scripts
33+
run: pnpm install --frozen-lockfile
3034

3135
- name: Build project
32-
run: npm run build
36+
run: pnpm run build
3337

3438
- name: Publish to npm
35-
run: npm publish
39+
run: pnpm publish --no-git-checks

β€Ž.gitignoreβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules
22
tsconfig.tsbuildinfo
3-
lib
3+
lib
4+
.pnpm-store
5+
pnpm-debug.log*

β€Ž.npmrcβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
message="πŸ”– %s"
22
tag-version-prefix="v"
33
preid="beta"
4+
minimumReleaseAge=4320 # 3 days

0 commit comments

Comments
Β (0)