|
1 | 1 | # @opensaas/stack-cli |
2 | 2 |
|
| 3 | +## 0.19.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- [#346](https://github.com/OpenSaasAU/stack/pull/346) [`aa5edec`](https://github.com/OpenSaasAU/stack/commit/aa5edecfbd2fc2dcab67479088d4c6ff2dd24600) Thanks [@borisno2](https://github.com/borisno2)! - Improve KeystoneJS migration guidance for virtual fields and context.graphql patterns |
| 8 | + |
| 9 | + The Keystone migration guide now covers two areas that require changes beyond a simple import swap: |
| 10 | + |
| 11 | + **Virtual fields** — detected automatically; the generated guide shows how to replace `graphql.field({ resolve })` with `hooks: { resolveOutput }` and a `type` declaration: |
| 12 | + |
| 13 | + ```diff |
| 14 | + - fullName: virtual({ |
| 15 | + - field: graphql.field({ |
| 16 | + - type: graphql.String, |
| 17 | + - resolve: (item) => `${item.firstName} ${item.lastName}`, |
| 18 | + - }), |
| 19 | + - }) |
| 20 | + + fullName: virtual({ |
| 21 | + + type: 'string', |
| 22 | + + hooks: { |
| 23 | + + resolveOutput: ({ item }) => `${item.firstName} ${item.lastName}`, |
| 24 | + + }, |
| 25 | + + }) |
| 26 | + ``` |
| 27 | + |
| 28 | + **context.graphql calls** — the guide now includes a step showing how to replace `context.graphql.run()` and `context.query.*` with `context.db.{listName}.{method}()`: |
| 29 | + |
| 30 | + ```diff |
| 31 | + - const { posts } = await context.graphql.run({ |
| 32 | + - query: `query { posts(where: { status: { equals: published } }) { id title } }`, |
| 33 | + - }) |
| 34 | + + const posts = await context.db.post.findMany({ |
| 35 | + + where: { status: { equals: 'published' } }, |
| 36 | + + }) |
| 37 | + ``` |
| 38 | + |
| 39 | + The introspector warning for virtual fields is also updated to give clearer guidance. |
| 40 | + |
| 41 | +- [#342](https://github.com/OpenSaasAU/stack/pull/342) [`94b0df6`](https://github.com/OpenSaasAU/stack/commit/94b0df65c860348441200d914dbf37bda3bd25cf) Thanks [@borisno2](https://github.com/borisno2)! - Improve KeystoneJS migration agent with side-by-side examples and targeted update guidance |
| 42 | + |
| 43 | + The Keystone migration wizard and agent now produce a targeted migration guide instead of |
| 44 | + regenerating the entire config. Since Keystone and OpenSaaS Stack share the same |
| 45 | + `list()`/field/hook/access API, only imports, the database adapter config, and auth setup |
| 46 | + need to change. |
| 47 | + |
| 48 | + Key improvements: |
| 49 | + - The migration agent prompt now includes side-by-side Keystone vs OpenSaaS examples for |
| 50 | + config structure, imports, access control, hooks, auth, and many-to-many join tables |
| 51 | + - The wizard uses a minimal fast-path for Keystone projects (just 3 questions: db provider, |
| 52 | + auth, auth methods) instead of the full question flow |
| 53 | + - The generator produces a diff-style migration guide for Keystone showing exactly what to |
| 54 | + change, rather than regenerating list definitions the user already has |
| 55 | + - Many-to-many join table naming is now surfaced automatically when M2M relations are |
| 56 | + detected, with `joinTableNaming: 'keystone'` guidance to preserve existing data |
| 57 | + |
| 58 | +### Patch Changes |
| 59 | + |
| 60 | +- [#345](https://github.com/OpenSaasAU/stack/pull/345) [`c815d2f`](https://github.com/OpenSaasAU/stack/commit/c815d2f02a81b16189e8eea0e635ea1aa0a1d6ec) Thanks [@borisno2](https://github.com/borisno2)! - Fix `migrate --with-ai` generating `path` instead of `repo` in Claude marketplace settings |
| 61 | + |
| 62 | +- [#345](https://github.com/OpenSaasAU/stack/pull/345) [`c815d2f`](https://github.com/OpenSaasAU/stack/commit/c815d2f02a81b16189e8eea0e635ea1aa0a1d6ec) Thanks [@borisno2](https://github.com/borisno2)! - Fix broken migration guide URL in `migrate` console output (missing `/docs` prefix) |
| 63 | + |
| 64 | +- [#344](https://github.com/OpenSaasAU/stack/pull/344) [`c259030`](https://github.com/OpenSaasAU/stack/commit/c259030dab3cdc641a9f40dd21746a1bd46fb76d) Thanks [@borisno2](https://github.com/borisno2)! - Fix updatedAt field to include @default(now()) in generated Prisma schema to prevent migration failures on databases with existing data |
| 65 | + |
| 66 | +- Updated dependencies []: |
| 67 | + - @opensaas/stack-core@0.19.0 |
| 68 | + |
3 | 69 | ## 0.18.2 |
4 | 70 |
|
5 | 71 | ### Patch Changes |
|
0 commit comments