@jskit-ai/crud-core 0.2.12 → 0.2.13

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
@@ -11,14 +11,12 @@
11
11
  ### Upgrading
12
12
 
13
13
  - json-rest-api 2.4.0 (from 2.1.0): `addResource` now rejects a field type json-rest-schema cannot cast, naming the field (JSKIT's own resources use only castable types); and a write's relationship targets are locked FOR SHARE (LOCK IN SHARE MODE on MySQL), so a lifecycle hook that then updates a referenced parent row in the same transaction should lock that row first, with `getDocumentById(parentId, {}, { trx, forUpdate: true })`, or two such writers can deadlock on the lock upgrade.
14
- - `getDocumentById(..., { forUpdate: true })` now locks: beepollen's `packages/driers/src/server/drierOperationLifecycle.js` (service, inside its transaction) gets the lock it asked for. A call that passes `forUpdate: true` without `trx` now throws; read inside `withTransaction`.
14
+ - `getDocumentById(..., { forUpdate: true })` now locks: server code that already passes `forUpdate: true` inside its transaction gets the lock it asked for. A call that passes `forUpdate: true` without `trx` now throws; read inside `withTransaction`.
15
15
  - Give an internal resource explicit `permissions` when the assistant should keep reading it for the users who hold them.
16
- - Server code that calls a CRUD repository's or service's `queryDocuments` with a `limit` above 100 now throws. It already received only 100 records, so a read meant to return more was losing rows. Replace `queryDocuments({ ...filters, limit: N })` and any cursor loop around it with `queryEveryDocument({ ...filters }, options)`, sorting the records it returns in memory; a "too many rows" guard (`rows.length >= N`) then sees the true count. Calls found in the applications' main branches (canonical clones of 1-5 Nov 2026):
17
- - beepollen: `packages/allowed-login-email-policy/src/server/accessRuntime.js` `listAllowedLoginEmailEntries` (limit 500, cursor loop); `packages/processing-lot-events/src/server/processingLotEventRepositoryExtensions.js` `listByProcessingLotId` (limit 500, no cursor: a lot's events past the 100th are dropped today).
18
- - compas-next, `packages/owners-work/src/server`: `tariffWorkflowService.js` `listAllRows` (`WORKFLOW_PAGE_LIMIT` 500, cursor loop); `ownersChecklistAiWorkflowService.js` `loadContext` (`CHECKLIST_LIMIT` 500: a checklist past 100 rows is edited from its first 100 and the too-large guard never fires); `unappointedRequestWorkflowService.js` (`INVOICE_GROUP_LIMIT` 500, the same guard); `ownersWorkAiContext.js` (`CONTEXT_COLLECTION_QUERY_LIMIT` 501, the invoice and transaction reads and their too-large guards).
19
- - dogandgroom: `packages/daycare-engine/src/server/serviceContext.js` `queryRecords` (limit 250, cursor loop).
20
- - whs2: any server `queryDocuments` with a `limit` above 100 that has not yet moved to its every-row helpers.
21
- - None in racing, vibe64, vibe64-online, daniela, mercbot or virtual-gp. Client pages that ask the list routes for 200 or 250 rows keep working: HTTP still caps them.
16
+ - Server code that calls a CRUD repository's or service's `queryDocuments` with a `limit` above 100 now throws. It already received only 100 records, so a read meant to return more was losing rows. Replace `queryDocuments({ ...filters, limit: N })` and any cursor loop around it with `queryEveryDocument({ ...filters }, options)`, sorting the records it returns in memory; a "too many rows" guard (`rows.length >= N`) then sees the true count. Who is affected:
17
+ - Server code that asked for more than 100 records in a cursor loop around `queryDocuments`.
18
+ - Server code that asked for more than 100 records in one `queryDocuments` call with no cursor: the records past the 100th were dropped, and a "too many rows" guard on that read never fired.
19
+ - Client pages that ask the list routes for 200 or 250 rows are not: they keep working, since HTTP still caps them.
22
20
 
23
21
  ## 0.2.0 - 2026-10-29
24
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/crud-core",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24.0.0"
@@ -27,9 +27,9 @@
27
27
  "./locales/en.json": "./locales/en.json"
28
28
  },
29
29
  "dependencies": {
30
- "@jskit-ai/database-runtime": "0.1.260",
31
- "@jskit-ai/json-rest-api-core": "0.2.12",
32
- "@jskit-ai/resource-crud-core": "0.1.202",
30
+ "@jskit-ai/database-runtime": "0.1.261",
31
+ "@jskit-ai/json-rest-api-core": "0.2.13",
32
+ "@jskit-ai/resource-crud-core": "0.1.203",
33
33
  "json-rest-schema": "^1.0.17",
34
34
  "json-rest-api": "2.4.0"
35
35
  },
@@ -50,7 +50,7 @@
50
50
  }
51
51
  },
52
52
  "peerDependencies": {
53
- "@jskit-ai/http-runtime": "0.2.11",
54
- "@jskit-ai/kernel": "0.2.11"
53
+ "@jskit-ai/http-runtime": "0.2.12",
54
+ "@jskit-ai/kernel": "0.2.12"
55
55
  }
56
56
  }
@@ -9,8 +9,8 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.2.12",
13
- "@jskit-ai/resource-crud-core": "0.1.202"
12
+ "@jskit-ai/crud-core": "0.2.13",
13
+ "@jskit-ai/resource-crud-core": "0.1.203"
14
14
  },
15
15
  "jskit": {
16
16
  "kind": "runtime",