joist-codegen 2.4.0-next.28 → 2.4.0-next.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joist-codegen",
3
- "version": "2.4.0-next.28",
3
+ "version": "2.4.0-next.29",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -48,14 +48,14 @@
48
48
  "skills"
49
49
  ],
50
50
  "peerDependencies": {
51
- "joist-utils": "2.4.0-next.28",
51
+ "joist-utils": "2.4.0-next.29",
52
52
  "knex": "^3.1.0",
53
53
  "pg": "^8.23.0"
54
54
  },
55
55
  "dependencies": {
56
56
  "@dprint/formatter": "^0.5.1",
57
- "@dprint/json": "^0.21.3",
58
- "@inquirer/prompts": "^8.6.0",
57
+ "@dprint/json": "^0.25.1",
58
+ "@inquirer/prompts": "^8.7.2",
59
59
  "@types/jscodeshift": "^17.3.0",
60
60
  "@types/pluralize": "^0.0.33",
61
61
  "change-case": "^4.1.2",
@@ -63,9 +63,9 @@
63
63
  "jscodeshift": "^17.4.0",
64
64
  "jsonc-parser": "^3.3.1",
65
65
  "pluralize": "^8.0.0",
66
- "prettier": "^3.9.6",
66
+ "prettier": "^3.9.9",
67
67
  "ts-poet": "^6.12.0",
68
- "zod": "^4.4.3"
68
+ "zod": "^4.6.5"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@swc/jest": "^0.2.39",
@@ -30,6 +30,8 @@ Authoritative references:
30
30
  5. Use `run` or the project's `makeRun` wrapper when production code needs an
31
31
  isolated `EntityManager`; it flushes Given state and mirrors the callback's
32
32
  flushed Joist writes into the original test graph.
33
+ Do not `await em.flush()` right before `run` or a `makeRun` helper: it
34
+ already flushes the Given graph, use as few `em.flush()` calls as possible.
33
35
  6. Assert entity state and relationships with `toMatchEntity`. Prefer checking
34
36
  side effects through retained entities and their relations instead of using
35
37
  `em.getEntities` to discover what the action created or changed.
@@ -280,8 +282,9 @@ const books = await savedBook.author.load().then((author) => author.books.load()
280
282
  Keep using `author` and `book`. They are the stable test references.
281
283
 
282
284
  Call `em.flush()` directly only when the test intentionally needs a persistence
283
- boundary and its helper does not provide one. Pure entity tests should usually
284
- avoid unnecessary flushes.
285
+ boundary and its helper does not provide one, e.g. to persist one Given state
286
+ before changing it into the next one. Pure entity tests should usually avoid
287
+ unnecessary flushes.
285
288
 
286
289
  ## Register toMatchEntity
287
290