@jskit-ai/crud-core 0.2.51 → 0.2.52
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 +1 -0
- package/package.json +4 -4
- package/patterns/crud-feature-package/example/packages/books/package.json +1 -1
- package/test/assistantPagination.integration.test.js +1 -1
- package/test/crudFeaturePackagePattern.test.js +1 -1
- package/test/crudOnHandles.test.js +1 -1
- package/test/hiddenFields.test.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Depends on json-rest-api 3.3.3 exactly (from 3.3.2), the version resource-runtime takes: on a descending sort, rows tied on its last key come in descending id order (the id that breaks ties takes the last key's direction), so MySQL and MariaDB read a descending page from an index leading with that key instead of sorting every row, and leave out the `IS NULL` term where the server already places NULLs last; and capabilities a start could not observe (the server not up yet) are observed again on the next storage call until that succeeds.
|
|
5
6
|
- Depends on json-rest-api 3.3.2 exactly (from 3.3.1), the version resource-runtime takes: on MariaDB a locking read keeps each IN list below the server's `in_predicate_conversion_threshold`, so a lock of 1,000 ids or values or more holds the rows it names alone, and a write's lock of the records it links to reads their primary key (details in `@jskit-ai/resource-runtime`'s changelog).
|
|
6
7
|
- Depends on json-rest-api 3.3.1 exactly (from 3.3.0), the version resource-runtime takes: a lock's to-one link check reads the linked table through its primary key on MySQL and MariaDB and holds the linked rows alone (details in `@jskit-ai/resource-runtime`'s changelog). No crud-core code changes.
|
|
7
8
|
- Depends on json-rest-api 3.3.0 exactly (from 3.2.0), the version resource-runtime takes: its change adds a locking aggregate (`aggregate` with `lockMode` inside a transaction; details in `@jskit-ai/resource-runtime`'s changelog) and names the fix in the single-table refusal of a lock, neither of which a CRUD route reaches, so a CRUD route reads and writes as it did.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/crud-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.52",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24.0.0"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@jskit-ai/resource-core": "0.1.224",
|
|
24
24
|
"@jskit-ai/resource-crud-core": "0.1.226",
|
|
25
|
-
"json-rest-api": "3.3.
|
|
25
|
+
"json-rest-api": "3.3.3",
|
|
26
26
|
"json-rest-schema": "^1.0.20"
|
|
27
27
|
},
|
|
28
28
|
"description": "Shared server-side CRUD service, repository, route, and query helpers.",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@jskit-ai/http-runtime": "0.2.
|
|
52
|
+
"@jskit-ai/http-runtime": "0.2.34",
|
|
53
53
|
"@jskit-ai/kernel": "0.2.33",
|
|
54
|
-
"@jskit-ai/resource-runtime": "0.2.
|
|
54
|
+
"@jskit-ai/resource-runtime": "0.2.48"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -87,7 +87,7 @@ test("assistant list traverses real SQL pages with sparse fields and capped limi
|
|
|
87
87
|
const expectedIds = await knex("books")
|
|
88
88
|
.where("workspace_id", 1)
|
|
89
89
|
.orderBy("created_at", "desc")
|
|
90
|
-
.orderBy("id", "
|
|
90
|
+
.orderBy("id", "desc")
|
|
91
91
|
.pluck("id");
|
|
92
92
|
|
|
93
93
|
for (const limit of [100, 200]) {
|
|
@@ -4,7 +4,7 @@ import test from "node:test";
|
|
|
4
4
|
import { createPackageTestKnex, createTestResourceRuntime } from "@jskit-ai/resource-runtime/test";
|
|
5
5
|
import { bookCrud, bookResource } from "../patterns/crud-feature-package/example/packages/books/src/shared/bookResource.js";
|
|
6
6
|
|
|
7
|
-
// SQLite in memory, or a
|
|
7
|
+
// SQLite in memory, or on a DB_CLIENT=pg or mysql2 run a schema or database of its own (see createPackageTestKnex).
|
|
8
8
|
const testKnex = (t) => createPackageTestKnex(t, { environment: process.env });
|
|
9
9
|
|
|
10
10
|
const providerPath = new URL(
|
|
@@ -13,7 +13,7 @@ import { CrudContractsProvider, createCrudContracts } from "../src/server/crudCo
|
|
|
13
13
|
import { defineCrudFeature } from "../src/server/defineCrudFeature.js";
|
|
14
14
|
import { crudJsonApiActionOptions } from "./support/crudJsonApiActionOptions.js";
|
|
15
15
|
|
|
16
|
-
// SQLite in memory, or a
|
|
16
|
+
// SQLite in memory, or on a DB_CLIENT=pg or mysql2 run a schema or database of its own (see createPackageTestKnex).
|
|
17
17
|
const testKnex = (t) => createPackageTestKnex(t, { environment: process.env });
|
|
18
18
|
|
|
19
19
|
const WORKSPACE_ONE = Object.freeze({ scopeValues: Object.freeze({ workspaceId: "1" }) });
|
|
@@ -6,7 +6,7 @@ import { defineCrudContract } from "@jskit-ai/resource-crud-core/shared/crudCont
|
|
|
6
6
|
import { defineCrudFeature } from "../src/server/defineCrudFeature.js";
|
|
7
7
|
import { CrudContractsProvider } from "../src/server/crudContracts.js";
|
|
8
8
|
|
|
9
|
-
// SQLite in memory, or a
|
|
9
|
+
// SQLite in memory, or on a DB_CLIENT=pg or mysql2 run a schema or database of its own (see createPackageTestKnex).
|
|
10
10
|
const testKnex = (t) => createPackageTestKnex(t, { environment: process.env });
|
|
11
11
|
|
|
12
12
|
test("a CRUD feature's repository reads a hidden field of its table only in a system context; its owner's methods read it", async (t) => {
|