Skip to content

Commit cef3e8d

Browse files
committed
ci: add vulnerability update workflow
1 parent 89f3d27 commit cef3e8d

15 files changed

Lines changed: 1251 additions & 1515 deletions

.github/workflows/gh-pages.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818

1919
steps:
2020
- name: Checkout 🛎️
21-
uses: actions/checkout@v5
21+
uses: actions/checkout@v6
2222

2323
- name: pnpm 🧰
2424
uses: pnpm/action-setup@v5
2525
with:
2626
version: 10
2727

2828
- name: Node 🧰
29-
uses: actions/setup-node@v5
29+
uses: actions/setup-node@v6
3030
with:
3131
node-version: 22.x
3232
cache: 'pnpm'

.github/workflows/pkg-pr-new.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: Checkout 🛎️
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@v6
2323
with:
2424
persist-credentials: false
2525

@@ -29,7 +29,7 @@ jobs:
2929
version: 10
3030

3131
- name: Node 🧰
32-
uses: actions/setup-node@v5
32+
uses: actions/setup-node@v6
3333
with:
3434
node-version: 22.x
3535

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414

1515
steps:
1616
- name: Checkout 🛎️
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
1818

1919
- name: pnpm 🧰
2020
uses: pnpm/action-setup@v5
2121
with:
2222
version: 10
2323

2424
- name: Node 🧰
25-
uses: actions/setup-node@v5
25+
uses: actions/setup-node@v6
2626
with:
2727
node-version: 22.x
2828
registry-url: https://registry.npmjs.org

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout 🛎️
13-
uses: actions/checkout@v5
13+
uses: actions/checkout@v6
1414

1515
- name: Create a draft GitHub release 🎁
1616
uses: softprops/action-gh-release@v2

.github/workflows/test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ jobs:
1515

1616
steps:
1717
- name: Checkout 🛎️
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919

2020
- name: pnpm 🧰
2121
uses: pnpm/action-setup@v5
2222
with:
2323
version: 10
2424

2525
- name: Node 🧰
26-
uses: actions/setup-node@v5
26+
uses: actions/setup-node@v6
2727
with:
2828
node-version: 22.x
2929
cache: 'pnpm'
3030

3131
- name: Install 📦
3232
run: pnpm install
3333

34-
- name: Run Lint 💅
35-
run: pnpm lint
34+
- name: Run Check 💅
35+
run: pnpm check
3636

3737
- name: Run TS check 🔎
3838
run: pnpm ts:check
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Vulnerability update
2+
3+
on:
4+
issues:
5+
types: [opened, labeled, reopened]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: vulnerability-update-${{ github.event_name }}-${{ github.event.issue.number || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
run:
14+
if: |
15+
github.event_name == 'workflow_dispatch' ||
16+
(
17+
github.event_name == 'issues' &&
18+
contains(github.event.issue.labels.*.name, 'vulnerability')
19+
)
20+
uses: commercelayer/.github/.github/workflows/dependencies-update-pnpm.yaml@main
21+
with:
22+
reviewers: "malessani,gciotola,pfferrari"
23+
use_milestone: false
24+
run_test: true
25+
run_build: true
26+
run_check: true
27+
issue_number: ${{ github.event_name == 'issues' && github.event.issue.number || '' }}
28+
secrets: inherit

.lintstagedrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"*.{js,jsx,ts,tsx,json,jsonc}": ["pnpm lint:fix"]
2+
"*.{js,jsx,ts,tsx,json,jsonc}": ["pnpm check:fix"]
33
}

.ncurc.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
engine-strict=true
22
auto-install-peers=true
3-
use-node-version=20.19.0
3+
use-node-version=22.22.0

package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
"build:elements": "pnpm --stream --filter @commercelayer/app-elements build",
99
"build:abilities": "pnpm --filter docs build:abilities",
1010
"build:docs": "pnpm --filter docs build",
11-
"lint": "pnpm biome check",
12-
"lint:fix": "pnpm biome check --write",
11+
"check": "pnpm biome check",
12+
"check:fix": "pnpm biome check --write",
1313
"test": "pnpm -r test",
1414
"test:update": "pnpm --stream -r test:update",
1515
"test:watch": "pnpm --stream -r test:watch",
1616
"ts:check": "pnpm --stream -r ts:check",
17-
"dep:major": "pnpm dlx npm-check-updates",
18-
"dep:minor": "pnpm dlx npm-check-updates --target minor",
17+
"dep:major": "pnpm dlx npm-check-updates --packageFile '**/package.json' -u",
18+
"dep:minor": "pnpm dlx npm-check-updates -t semver --packageFile '**/package.json' -u",
1919
"postdep:major": "echo \"\\033[0;31mRemember to check the \\\"peerDependencies\\\" of the updated packages.\\033[0m\n\"",
2020
"postdep:minor": "echo \"\\033[0;31mRemember to check the \\\"peerDependencies\\\" of the updated packages.\\033[0m\n\""
2121
},
@@ -30,8 +30,8 @@
3030
},
3131
"license": "MIT",
3232
"engines": {
33-
"node": ">=20",
34-
"pnpm": ">=8"
33+
"node": "22",
34+
"pnpm": "10"
3535
},
3636
"workspaces": [
3737
"packages/*"
@@ -41,9 +41,5 @@
4141
"husky": "^9.1.7",
4242
"lerna": "^9.0.4",
4343
"lint-staged": "^16.2.7"
44-
},
45-
"resolutions": {
46-
"postcss": "8",
47-
"tar": "^7.5.7"
4844
}
4945
}

0 commit comments

Comments
 (0)