@baseplate-dev/core-generators 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,99 @@
1
1
  # @baseplate-dev/core-generators
2
2
 
3
+ ## 0.6.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#855](https://github.com/halfdomelabs/baseplate/pull/855) [`87a2218`](https://github.com/halfdomelabs/baseplate/commit/87a2218266f957bb4beacd6b13cb3d610fd15a41) Thanks [@kingston](https://github.com/kingston)! - Upgrade Node.js from 22.18.0 to 24.14.0 and pnpm from 10.27.0 to 10.32.1
8
+
9
+ - [#865](https://github.com/halfdomelabs/baseplate/pull/865) [`c7131f5`](https://github.com/halfdomelabs/baseplate/commit/c7131f5caebda203ece99d30fcf2d58ead3abdb8) Thanks [@kingston](https://github.com/kingston)! - Upgrade PostgreSQL from 17.5 to 18.3 and Redis from 8.0 to 8.6 in Docker Compose generators
10
+
11
+ ## Breaking: Volume mount path changed
12
+
13
+ PostgreSQL 18 changed its default data directory from `/var/lib/postgresql/data` to `/var/lib/postgresql/<major>/docker` and placed a symlink at the old path. Mounting a volume directly to `/var/lib/postgresql/data` on Postgres 18+ will cause a container startup error:
14
+
15
+ ```
16
+ error mounting "..." to rootfs at "/var/lib/postgresql/data": no such file or directory
17
+ ```
18
+
19
+ To align with this change, the Docker Compose volume mount has been updated from `db-data:/var/lib/postgresql/data` to `db-data:/var/lib/postgresql`. This means **existing dev databases will not be found** after upgrading and you must re-create or migrate your database.
20
+
21
+ ## Upgrading your dev database
22
+
23
+ After syncing, your `docker-compose.yml` will reference `postgres:18.3-alpine` with the new volume mount path. You have three options:
24
+
25
+ ### Option 1: Auto-upgrade with pgautoupgrade (in-place upgrade)
26
+
27
+ Use the [`pgautoupgrade`](https://github.com/pgautoupgrade/docker-pgautoupgrade) Docker image to upgrade the data directory in-place:
28
+ 1. Stop your containers:
29
+
30
+ ```bash
31
+ cd docker && docker compose down
32
+ ```
33
+
34
+ 2. Temporarily swap the image in `docker-compose.yml`:
35
+
36
+ ```yaml
37
+ image: pgautoupgrade/pgautoupgrade:18-alpine
38
+ ```
39
+
40
+ 3. Start the container and watch for the upgrade:
41
+
42
+ ```bash
43
+ docker compose up # wait for "Upgrade to PostgreSQL 18.3 complete." message
44
+ ```
45
+
46
+ 4. Once complete, stop and revert the image:
47
+ ```bash
48
+ docker compose down
49
+ ```
50
+ Change the image back in `docker-compose.yml`:
51
+ ```yaml
52
+ image: postgres:18.3-alpine
53
+ ```
54
+ ```bash
55
+ docker compose up
56
+ ```
57
+
58
+ ### Option 2: Fresh start (for dev databases with no important data)
59
+
60
+ Delete the old volume and start fresh:
61
+
62
+ ```bash
63
+ cd docker
64
+ docker compose down -v # removes containers AND volumes
65
+ docker compose up # starts fresh with Postgres 18
66
+ cd ../apps/backend
67
+ pnpm db:migrate # re-apply all migrations
68
+ pnpm db:seed # re-seed if applicable
69
+ ```
70
+
71
+ ### Option 3: Dump and restore (preserves data)
72
+
73
+ If you need to keep your data but don't want to use pgautoupgrade:
74
+
75
+ ```bash
76
+ cd docker
77
+
78
+ # 1. While still on the OLD docker-compose.yml, dump your data
79
+ docker compose exec db pg_dumpall -U postgres > backup.sql
80
+
81
+ # 2. Now sync your project to get the new docker-compose.yml
82
+ # ... run baseplate sync ...
83
+
84
+ # 3. Remove old volume and start with new config
85
+ docker compose down -v
86
+ docker compose up -d
87
+
88
+ # 4. Restore your data
89
+ docker compose exec -T db psql -U postgres < backup.sql
90
+ rm backup.sql
91
+ ```
92
+
93
+ - Updated dependencies [[`8dcf7b3`](https://github.com/halfdomelabs/baseplate/commit/8dcf7b3c909672487bad61b7a4465d1860092363)]:
94
+ - @baseplate-dev/utils@0.6.5
95
+ - @baseplate-dev/sync@0.6.5
96
+
3
97
  ## 0.6.4
4
98
 
5
99
  ### Patch Changes
@@ -1,3 +1,3 @@
1
- export declare const NODE_VERSION = "22.18.0";
2
- export declare const PNPM_VERSION = "10.27.0";
1
+ export declare const NODE_VERSION = "24.14.0";
2
+ export declare const PNPM_VERSION = "10.32.1";
3
3
  //# sourceMappingURL=node.d.ts.map
@@ -1,3 +1,3 @@
1
- export const NODE_VERSION = '22.18.0';
2
- export const PNPM_VERSION = '10.27.0';
1
+ export const NODE_VERSION = '24.14.0';
2
+ export const PNPM_VERSION = '10.32.1';
3
3
  //# sourceMappingURL=node.js.map
@@ -2,7 +2,7 @@ export function generatePostgresDockerCompose(config) {
2
2
  return {
3
3
  services: [
4
4
  ` db:
5
- image: postgres:17.5-alpine
5
+ image: postgres:18.3-alpine
6
6
  container_name: \${COMPOSE_PROJECT_NAME:-${config.projectName}}-db
7
7
  restart: on-failure
8
8
  security_opt:
@@ -14,7 +14,7 @@ export function generatePostgresDockerCompose(config) {
14
14
  ports:
15
15
  - "\${POSTGRES_PORT:-${config.port}}:5432"
16
16
  volumes:
17
- - db-data:/var/lib/postgresql/data
17
+ - db-data:/var/lib/postgresql
18
18
  networks:
19
19
  - backend
20
20
  logging:
@@ -2,7 +2,7 @@ export function generateRedisDockerCompose(config) {
2
2
  return {
3
3
  services: [
4
4
  ` redis:
5
- image: redis:8.0-alpine
5
+ image: redis:8.6-alpine
6
6
  container_name: \${COMPOSE_PROJECT_NAME:-${config.projectName}}-redis
7
7
  restart: on-failure
8
8
  security_opt:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baseplate-dev/core-generators",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Core generators for Baseplate",
5
5
  "keywords": [
6
6
  "baseplate",
@@ -62,25 +62,25 @@
62
62
  "semver": "^7.5.4",
63
63
  "sort-package-json": "2.10.1",
64
64
  "ts-morph": "27.0.2",
65
- "yaml": "2.8.1",
65
+ "yaml": "2.8.2",
66
66
  "zod": "^4.3.6",
67
- "@baseplate-dev/sync": "0.6.4",
68
- "@baseplate-dev/utils": "0.6.4"
67
+ "@baseplate-dev/sync": "0.6.5",
68
+ "@baseplate-dev/utils": "0.6.5"
69
69
  },
70
70
  "devDependencies": {
71
- "@types/node": "^22.17.2",
71
+ "@types/node": "^24.12.0",
72
72
  "@types/prettier": "^2.7.3",
73
73
  "@types/semver": "^7.5.0",
74
74
  "concurrently": "9.2.1",
75
75
  "cpx2": "8.0.0",
76
76
  "eslint": "9.39.2",
77
- "oxlint": "1.55.0",
77
+ "oxlint": "1.56.0",
78
78
  "typescript": "5.9.3",
79
79
  "vitest": "4.0.16",
80
- "@baseplate-dev/tools": "0.6.4"
80
+ "@baseplate-dev/tools": "0.6.5"
81
81
  },
82
82
  "engines": {
83
- "node": "^22.0.0"
83
+ "node": "^24.0.0"
84
84
  },
85
85
  "volta": {
86
86
  "extends": "../../package.json"