Skip to content

Commit 2fd6092

Browse files
committed
πŸ”€ Merge dependency security fixes into prod
2 parents 6199a0e + 7b4b6db commit 2fd6092

15 files changed

Lines changed: 1332 additions & 6341 deletions

File tree

β€Ž.eslintrc.jsonβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"es2021": true
55
},
66
"parser": "@typescript-eslint/parser",
7-
"extends": ["standard-with-typescript", "plugin:react/recommended"],
7+
"extends": ["standard", "plugin:@typescript-eslint/recommended-type-checked", "plugin:react/recommended"],
88
"parserOptions": {
99
"ecmaVersion": "latest",
1010
"sourceType": "module",
@@ -19,7 +19,6 @@
1919
"import/no-absolute-path": "off",
2020
"import/no-duplicates": "off",
2121
"react/react-in-jsx-scope": "off",
22-
"@typescript-eslint/indent": "off",
2322
"react/prop-types": "off",
2423
"@typescript-eslint/explicit-function-return-type": "off",
2524
"@typescript-eslint/strict-boolean-expressions": "off"

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,23 @@ jobs:
1313
- name: '[βš™οΈ] Checkout'
1414
uses: actions/checkout@v3
1515

16+
- name: Set up pnpm
17+
uses: pnpm/action-setup@v4
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '24'
23+
cache: pnpm
24+
1625
- name: '[πŸ“¦] Install dependencies'
17-
run: npm install
26+
run: pnpm install --frozen-lockfile
27+
28+
- name: Audit dependencies
29+
run: pnpm audit
1830

1931
- name: '[πŸ”§] Build'
20-
run: npm run build
32+
run: pnpm run build
2133

2234
- name: '[πŸš€] Deploy to support-informatique.ch'
2335
uses: appleboy/scp-action@master

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,25 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v3
1515

16+
- name: Set up pnpm
17+
uses: pnpm/action-setup@v4
18+
1619
- name: Use Node.js
17-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
1821
with:
19-
node-version: '18'
22+
node-version: '24'
23+
cache: pnpm
2024

2125
- name: Install dependencies
2226
run: |
23-
npm ci
27+
pnpm install --frozen-lockfile
28+
29+
- name: Audit dependencies
30+
run: pnpm audit
31+
32+
- name: Check types
33+
run: pnpm run typecheck
2434

2535
- name: Run ESLint
2636
run: |
27-
npm run lint
37+
pnpm run lint

β€ŽREADME.mdβ€Ž

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,22 @@ We follow the best practices for CI/CD using GitHub Actions.
2727

2828
### Linting Check
2929

30-
Every push to the `main` branch triggers a linting check using the `npm run lint` command. This helps in maintaining a clean, error-free codebase.
30+
Every push to the `main` branch installs the committed pnpm lockfile with `pnpm install --frozen-lockfile`, audits dependencies, checks types, and runs `pnpm run lint`.
3131

3232
![lint](https://github.com/Support-Informatique/support-informatique.ch/actions/workflows/lint.yml/badge.svg)
3333

3434
### Automatic Deployment
3535

36-
Any push to the `prod` branch triggers an automatic deployment to our live site. Before the deployment, we also run a `npm run lint` command to ensure that the production version is error-free and ready for deployment.
36+
Any push to the `prod` branch triggers an automatic deployment to both live sites. CD uses Node.js 24 and the pinned pnpm version to install `pnpm-lock.yaml` with `--frozen-lockfile`, runs `pnpm audit`, and builds with `pnpm run build` (including lint and TypeScript checks).
3737

3838
![deploy](https://github.com/Support-Informatique/support-informatique.ch/actions/workflows/deploy.yml/badge.svg)
3939

40+
## Dependency maintenance
41+
42+
Use pnpm (the version in `packageManager`) and commit `pnpm-lock.yaml`; there is no npm lockfile. Run `pnpm audit`, `pnpm typecheck`, and `pnpm build` after updates.
43+
44+
React Router 7 and Vite 6 replace the vulnerable older versions. Tailwind CSS 4 and TypeScript ESLint 8 remove the unpatched `braces` dependency. Tailwind uses `@tailwindcss/postcss`, loads the existing theme through `@config`, and declares dynamic mountain backgrounds with `@source inline`. The CSS requires Safari 16.4+, Chrome 111+, or Firefox 128+. The YAML override keeps Vite's dependency on a patched release.
45+
4046
## πŸ“– License
4147

4248
This project is [MIT](https://choosealicense.com/licenses/mit/) licensed.

0 commit comments

Comments
Β (0)