Skip to content

Commit 2fdff26

Browse files
committed
Fix #150 switch from npm to pnpm
1 parent afba020 commit 2fdff26

File tree

8 files changed

+4114
-53
lines changed

8 files changed

+4114
-53
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you want to push some code :
1313
You could also be critic with existing ticket/PR : all constructive feedbacks are welcome.
1414

1515
## HowTo execute tests
16-
* launch tests using `npm test`.
16+
* launch tests using `pnpm test`.
1717

1818
Think about environment setup.
1919

@@ -30,7 +30,7 @@ $ git clone https://github.com/boly38/botEnSky.git
3030
1. Install NodeJs (https://nodejs.org/en/download/)
3131
2. Install dependencies
3232
```bash
33-
npm install
33+
pnpm install
3434
```
3535

3636
### Set your own private environment
@@ -45,11 +45,11 @@ cp ./env/.env.template ./env/.env.development
4545

4646
Execute the application
4747
```bash
48-
npm run startDev
48+
pnpm startDev
4949
```
5050
or (production mode)
5151
```bash
52-
npm run start
52+
pnpm start
5353
```
5454

5555
## PullRequests additional information

.github/workflows/audit.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: botensky-audit
1+
name: audit
22

33
on:
44
schedule:
@@ -18,26 +18,30 @@ jobs:
1818

1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222

23-
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v4
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
# version from package.json
27+
run_install: false
28+
29+
- name: Setup Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v5
2531
with:
2632
node-version: ${{ matrix.node-version }}
33+
cache: 'pnpm'
2734

2835
- name: Install dependencies
29-
# - run: npm ci # need package.json.lock
3036
run: |
37+
echo ::group::Install dependencies
3138
echo "install"
32-
npm install
39+
pnpm --silent install
3340
echo "show outdated (if any)"
34-
npm outdated --depth=3 || echo "you must think about update your dependencies :)"
41+
pnpm outdated --depth=3 || echo "::warning::🕸️ you must think about update your dependencies :)"
42+
echo ::endgroup::
3543
36-
- name: Audit backend
37-
uses: oke-py/[email protected]
38-
with:
39-
audit_level: moderate
40-
github_token: ${{ secrets.GITHUB_TOKEN }}
41-
issue_assignees: boly38
42-
issue_labels: cybersecurity,bot-created
43-
dedupe_issues: true
44+
- name: pnpm audit
45+
run: |
46+
echo "pnpm audit"
47+
pnpm audit

.github/workflows/main.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# continuous integration
2-
name: botensky-ci
2+
name: main
33

44
# Controls when the action will run.
55
on:
@@ -25,21 +25,29 @@ jobs:
2525

2626
environment: github_actions_bes
2727
steps:
28-
- name: Git checkout
29-
uses: actions/checkout@v3
28+
- name: Checkout code
29+
uses: actions/checkout@v5
3030

31-
- name: Use Node.js ${{ matrix.node-version }}
32-
uses: actions/setup-node@v3
31+
- name: Setup pnpm
32+
uses: pnpm/action-setup@v4
33+
with:
34+
# version from package.json
35+
run_install: false
36+
37+
- name: Setup Node.js ${{ matrix.node-version }}
38+
uses: actions/setup-node@v5
3339
with:
3440
node-version: ${{ matrix.node-version }}
41+
cache: 'pnpm'
3542

3643
- name: Install dependencies
37-
# npx force-resolutions : in case of Permission denied: run it locally to fix package-lock.json
3844
run: |
45+
echo ::group::Install dependencies
3946
echo "install"
40-
npm install
47+
pnpm --silent install
4148
echo "show outdated (if any)"
42-
npm outdated --depth=3 || echo "you must think about update your dependencies :)"
49+
pnpm outdated --depth=3 || echo "::warning::🕸️ you must think about update your dependencies :)"
50+
echo ::endgroup::
4351
4452
- name: Run tests
4553
env:
@@ -54,7 +62,7 @@ jobs:
5462
PLANTNET_API_PRIVATE_KEY: ${{ secrets.PLANTNET_API_PRIVATE_KEY }}
5563
UNSPLASH_ACCESS_KEY: ${{ secrets.UNSPLASH_ACCESS_KEY }}
5664
BOT_INACTIVITY_DELAY_MIN: 1
57-
run: npm run ci-test
65+
run: pnpm ci-test
5866

5967
- name: Report coverage
6068
if: github.event_name == 'pull_request'
@@ -67,7 +75,7 @@ jobs:
6775
filter-changed-files: true
6876

6977
- name: Git deploy tag coverage report
70-
uses: peaceiris/actions-gh-pages@v3
78+
uses: peaceiris/actions-gh-pages@v4
7179
if: github.ref_type == 'tag'
7280
with:
7381
github_token: ${{ secrets.GH_ACTIONS_TOKEN }}

.github/workflows/major.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# create major from 'prod' branch
2-
name: BES_MAJOR
2+
name: major
33
on:
44
# Allows you to run this workflow manually from the Actions tab
55
workflow_dispatch:
@@ -13,23 +13,30 @@ jobs:
1313

1414
environment: github_actions_bes
1515
steps:
16-
- name: Git checkout
17-
uses: actions/checkout@v3
16+
- name: Checkout code
17+
uses: actions/checkout@v5
1818
with:
1919
ref: 'prod'
2020
token: ${{ secrets.GH_ACTIONS_TOKEN }}
2121

22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v3
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
# version from package.json
26+
run_install: false
27+
28+
- name: Setup Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v5
2430
with:
2531
node-version: ${{ matrix.node-version }}
32+
cache: 'pnpm'
2633

2734
- name: Major
2835
run: |
29-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
36+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
3037
git config --global user.name 'github-actions[bot]'
3138
git fetch --all
3239
git checkout main
33-
npm version major
40+
pnpm version major
3441
git branch -f prod
35-
git push origin main prod --tags
42+
git push origin main prod --tags

.github/workflows/minor.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# create minor from 'prod' branch
2-
name: BES_MINOR
2+
name: minor
33
on:
44
# Allows you to run this workflow manually from the Actions tab
55
workflow_dispatch:
@@ -13,23 +13,30 @@ jobs:
1313

1414
environment: github_actions_bes
1515
steps:
16-
- name: Git checkout
17-
uses: actions/checkout@v3
16+
- name: Checkout code
17+
uses: actions/checkout@v5
1818
with:
1919
ref: 'prod'
2020
token: ${{ secrets.GH_ACTIONS_TOKEN }}
2121

22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v3
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
# version from package.json
26+
run_install: false
27+
28+
- name: Setup Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v5
2430
with:
2531
node-version: ${{ matrix.node-version }}
32+
cache: 'pnpm'
2633

2734
- name: Minor
2835
run: |
29-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
36+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
3037
git config --global user.name 'github-actions[bot]'
3138
git fetch --all
3239
git checkout main
33-
npm version minor
40+
pnpm version minor
3441
git branch -f prod
35-
git push origin main prod --tags
42+
git push origin main prod --tags

.github/workflows/patch.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# create patch from 'prod' branch
2-
name: BES_PATCH
2+
name: patch
33
on:
44
# Allows you to run this workflow manually from the Actions tab
55
workflow_dispatch:
@@ -13,23 +13,30 @@ jobs:
1313

1414
environment: github_actions_bes
1515
steps:
16-
- name: Git checkout
17-
uses: actions/checkout@v3
16+
- name: Checkout code
17+
uses: actions/checkout@v5
1818
with:
1919
ref: 'prod'
2020
token: ${{ secrets.GH_ACTIONS_TOKEN }}
2121

22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v3
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
# version from package.json
26+
run_install: false
27+
28+
- name: Setup Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v5
2430
with:
2531
node-version: ${{ matrix.node-version }}
32+
cache: 'pnpm'
2633

2734
- name: Patch
2835
run: |
29-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
36+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
3037
git config --global user.name 'github-actions[bot]'
3138
git fetch --all
3239
git checkout main
33-
npm version patch
40+
pnpm version patch
3441
git branch -f prod
35-
git push origin main prod --tags
42+
git push origin main prod --tags

0 commit comments

Comments
 (0)