Skip to content

Commit 849fdc9

Browse files
authored
build(deps-dev): harden dependency maintenance (#247)
Consolidate eligible dependency updates, align the Node toolchain, and make Dependabot, CI, docs, and release installs reproducible.
1 parent 821480d commit 849fdc9

6 files changed

Lines changed: 11989 additions & 9892 deletions

File tree

.github/dependabot.yml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,24 @@ updates:
55
schedule:
66
interval: "weekly"
77
open-pull-requests-limit: 5
8+
cooldown:
9+
default-days: 7
10+
commit-message:
11+
prefix: "build"
12+
prefix-development: "build"
13+
include: "scope"
814
groups:
9-
npm-minor-patch:
15+
npm-production-minor-patch:
1016
applies-to: version-updates
17+
dependency-type: production
18+
patterns:
19+
- "*"
20+
update-types:
21+
- "minor"
22+
- "patch"
23+
npm-development-minor-patch:
24+
applies-to: version-updates
25+
dependency-type: development
1126
patterns:
1227
- "*"
1328
update-types:
@@ -17,7 +32,43 @@ updates:
1732
applies-to: security-updates
1833
patterns:
1934
- "*"
35+
ignore:
36+
# Keep type definitions aligned with the Node 22 runtime used by CI.
37+
- dependency-name: "@types/node"
38+
update-types:
39+
- "version-update:semver-major"
40+
# TypeScript 7 is not yet supported by the current Svelte and lint toolchain.
41+
- dependency-name: "typescript"
42+
update-types:
43+
- "version-update:semver-major"
2044
- package-ecosystem: "github-actions"
2145
directory: "/"
2246
schedule:
2347
interval: "weekly"
48+
cooldown:
49+
default-days: 7
50+
commit-message:
51+
prefix: "ci"
52+
include: "scope"
53+
- package-ecosystem: "pip"
54+
directory: "/docs"
55+
schedule:
56+
interval: "weekly"
57+
open-pull-requests-limit: 5
58+
cooldown:
59+
default-days: 7
60+
commit-message:
61+
prefix: "docs"
62+
include: "scope"
63+
groups:
64+
pip-minor-patch:
65+
applies-to: version-updates
66+
patterns:
67+
- "*"
68+
update-types:
69+
- "minor"
70+
- "patch"
71+
pip-security:
72+
applies-to: security-updates
73+
patterns:
74+
- "*"

.github/workflows/documentation.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
name: Documentation
22
on:
33
workflow_dispatch:
4+
pull_request:
5+
paths:
6+
- "docs/**"
7+
- ".github/workflows/documentation.yml"
8+
- "wrangler.jsonc"
49
push:
510
branches:
6-
- 'master'
11+
- "master"
712
paths:
8-
- 'docs/**'
9-
- '.github/workflows/documentation.yml'
10-
- 'wrangler.jsonc'
13+
- "docs/**"
14+
- ".github/workflows/documentation.yml"
15+
- "wrangler.jsonc"
1116

1217
permissions:
1318
contents: read
@@ -21,6 +26,8 @@ jobs:
2126
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
2227
with:
2328
python-version: 3.x
29+
cache: "pip"
30+
cache-dependency-path: "docs/requirements.txt"
2431

2532
- name: Install documentation dependencies
2633
run: python -m pip install -r docs/requirements.txt

.github/workflows/release.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
pull-requests: write # semantic-release PR comments
2525
id-token: write # mint the OIDC token used to sign artifact attestations
2626
attestations: write # publish build provenance attestations for the assets
27-
strategy:
28-
matrix:
29-
node-version: [22]
3027
outputs:
3128
released: ${{ steps.release.outputs.released }}
3229
version: ${{ steps.extract-version.outputs.version }}
@@ -40,7 +37,7 @@ jobs:
4037
- name: Setup Node
4138
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
4239
with:
43-
node-version: ${{ matrix.node-version }}
40+
node-version-file: ".nvmrc"
4441
cache: npm
4542

4643
- name: Validate trigger
@@ -54,7 +51,7 @@ jobs:
5451
5552
- name: Install dependencies
5653
if: steps.validate.outputs.valid == 'true'
57-
run: npm install
54+
run: npm ci
5855

5956
- name: Build
6057
if: steps.validate.outputs.valid == 'true'
@@ -69,7 +66,6 @@ jobs:
6966
if: steps.validate.outputs.valid == 'true'
7067
env:
7168
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7369
DRY_RUN: ${{ github.event.inputs.dryRun || 'false' }}
7470
run: |
7571
node - <<'NODE'

.github/workflows/test.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Test
2-
on: push
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- "master"
37

48
permissions:
59
contents: read
@@ -16,10 +20,10 @@ jobs:
1620
- name: Setup Node
1721
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
1822
with:
19-
node-version: 22
20-
cache: 'npm'
23+
node-version-file: ".nvmrc"
24+
cache: "npm"
2125
- name: Install dependencies
22-
run: npm install
26+
run: npm ci
2327
- name: Lint
2428
run: npm run lint
2529
- name: Format check

0 commit comments

Comments
 (0)