Skip to content

Commit 033fdb0

Browse files
committed
Merge #189: chore: update dependencies including major upgrades
c66a436 chore: upgrade TypeScript to v6 and Node types to v25 (Jose Celano) 023ecfa chore: upgrade svelte-sitemap to v3 (Jose Celano) 333061a chore: upgrade vite to v8 and svelte vite plugin to v7 (Jose Celano) 84f607f fix: wrap h4 CSS selectors in :global() to silence unused-selector warnings (Jose Celano) 904f4c5 docs: add dependency upgrade plan for major version bumps (Jose Celano) 43fea83 chore: update npm dependencies to latest compatible versions (Jose Celano) Pull request description: ## Summary This PR updates project dependencies and completes the planned major-version upgrades in a stacked sequence, submitted as a single PR from the top branch. ## Included updates - Patch/minor updates to latest compatible versions - Vite: 7.3.2 -> 8.0.8 - @sveltejs/vite-plugin-svelte: 6.2.4 -> 7.0.0 - svelte-sitemap: 2.8.0 -> 3.1.0 - TypeScript: 5.9.3 -> 6.0.2 - @types/node: 22.19.17 -> 25.6.0 - CSS warning cleanup in blog page styles (unused selector warnings removed) ## Validation - npm run format - npm run lint - npm run check - npm run build - ./scripts/pre-commit.sh All checks pass with 0 errors and 0 warnings. ## Notes - Branches were intentionally stacked by phase; this PR targets the top branch so all phase commits are included. - Dependency plan was tracked and completed in docs/dependency-upgrade-plan.md. ACKs for top commit: josecelano: ACK c66a436 Tree-SHA512: b0473c84379da15fd78cd024172bc880aaa4c3316b147039ba79cabab27080a81e2736e6d98ac2c68d816789b26302d0d06de236a33c8ac624e35aad615ac564
2 parents d8b651e + c66a436 commit 033fdb0

File tree

4 files changed

+1285
-1130
lines changed

4 files changed

+1285
-1130
lines changed

docs/dependency-upgrade-plan.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Dependency Upgrade Plan
2+
3+
This document tracks the step-by-step plan for upgrading the Torrust website dependencies,
4+
starting with the compatible patch/minor updates already applied and then tackling each
5+
remaining major-version bump in a dedicated branch and PR.
6+
7+
## Status Overview
8+
9+
| Package | Current | Target | Status | Branch |
10+
| ---------------------------------------- | ------- | ------------ | ------- | ----------------------------------- |
11+
| Patch / minor updates (all except below) | various | latest minor | ✅ Done | `chore/update-dependencies-2026-04` |
12+
| `vite` | 8.x | 8.x | ✅ Done | `chore/upgrade-vite-8` |
13+
| `@sveltejs/vite-plugin-svelte` | 7.x | 7.x | ✅ Done | `chore/upgrade-vite-8` |
14+
| `svelte-sitemap` | 3.x | 3.x | ✅ Done | `chore/upgrade-svelte-sitemap-3` |
15+
| `typescript` | 6.x | 6.x | ✅ Done | `chore/upgrade-typescript-6` |
16+
| `@types/node` | 25.x | 25.x | ✅ Done | `chore/upgrade-typescript-6` |
17+
18+
---
19+
20+
## Phase 0 — Patch & minor updates ✅
21+
22+
**Branch:** `chore/update-dependencies-2026-04`
23+
**PR:** open against `develop`
24+
25+
All non-breaking updates applied. All checks pass (`format`, `lint`, `check`, `build`).
26+
27+
---
28+
29+
## Phase 1 — vite 7 → 8 + @sveltejs/vite-plugin-svelte 6 → 7 ✅
30+
31+
These two must be bumped together: `@sveltejs/vite-plugin-svelte` v7 requires `vite ^8`.
32+
33+
**Branch:** `chore/upgrade-vite-8`
34+
35+
**Result:** completed successfully. `npm run lint`, `npm run check`, and `npm run build` pass.
36+
37+
**Steps:**
38+
39+
1. Create branch `chore/upgrade-vite-8`
40+
2. Bump versions:
41+
```bash
42+
npm install -D vite@^8 @sveltejs/vite-plugin-svelte@^7
43+
```
44+
3. Check `vite.config.ts` for any removed/renamed Vite 8 APIs
45+
(see [Vite 8 migration guide](https://vite.dev/guide/migration))
46+
4. Check `svelte.config.js` for vite-plugin-svelte v7 breaking changes
47+
(see [@sveltejs/vite-plugin-svelte changelog](https://github.com/sveltejs/vite-plugin-svelte/blob/main/packages/vite-plugin-svelte/CHANGELOG.md))
48+
5. Run `npm run check && npm run lint && npm run build`
49+
6. Fix any issues
50+
7. Commit and open PR
51+
52+
**Known risks / things to verify:**
53+
54+
- Vite 8 dropped `server.force` option — check `vite.config.ts`
55+
- `vite-plugin-imagemin` peer compatibility with Vite 8 (may need upgrade or workaround)
56+
- HMR and SSR behaviour changes in Vite 8
57+
58+
---
59+
60+
## Phase 2 — svelte-sitemap 2 → 3 ✅
61+
62+
This was a smaller, isolated change.
63+
64+
**Branch:** `chore/upgrade-svelte-sitemap-3`
65+
66+
**Result:** completed successfully. `npm run lint`, `npm run check`, and `npm run build` pass, and `build/sitemap.xml` is generated.
67+
68+
**Steps:**
69+
70+
1. Create branch `chore/upgrade-svelte-sitemap-3`
71+
2. Bump version:
72+
```bash
73+
npm install -D svelte-sitemap@^3
74+
```
75+
3. Read the [svelte-sitemap v3 changelog](https://github.com/bartholomej/svelte-sitemap/blob/master/CHANGELOG.md) for breaking changes
76+
4. Update `package.json` `postbuild` script or any sitemap configuration if the CLI interface changed
77+
5. Run `npm run build` and verify `build/sitemap.xml` is generated correctly
78+
6. Commit and open PR
79+
80+
**Known risks / things to verify:**
81+
82+
- CLI argument changes in v3
83+
- Output format differences in the generated sitemap
84+
- v3 suggests moving from CLI options to a config file (not required for current setup)
85+
86+
---
87+
88+
## Phase 3 — TypeScript 5 → 6 ✅
89+
90+
TypeScript 6 is a significant release with stricter type checking.
91+
92+
**Branch:** `chore/upgrade-typescript-6`
93+
94+
**Result:** completed successfully. `npm run lint`, `npm run check`, and `npm run build` pass with no additional code changes required.
95+
96+
**Steps:**
97+
98+
1. Create branch `chore/upgrade-typescript-6`
99+
2. Bump version:
100+
```bash
101+
npm install -D typescript@^6 @types/node@^25
102+
```
103+
3. Read the [TypeScript 6 breaking changes](https://devblogs.microsoft.com/typescript/)
104+
4. Run `npm run check` and fix all new type errors
105+
5. Update `tsconfig.json` if needed (new `target`/`lib` defaults, removed options)
106+
6. Run full suite: `npm run check && npm run lint && npm run build`
107+
7. Commit and open PR
108+
109+
**Known risks / things to verify:**
110+
111+
- Stricter type narrowing may reveal latent type errors
112+
- `verbatimModuleSyntax` may become default — check `tsconfig.json`
113+
- `@typescript-eslint` packages may need re-aligning with TS 6 types
114+
- `@types/node` v25 may introduce typing changes for used Node APIs
115+
116+
---
117+
118+
## General checklist for each phase
119+
120+
Before opening each PR, run the full quality suite:
121+
122+
```bash
123+
npm run format
124+
npm run lint
125+
npm run check
126+
npm run build
127+
npm run preview # manual visual verification
128+
```
129+
130+
Check for `npm audit` issues introduced by the new versions.

0 commit comments

Comments
 (0)