@reventlessdev/reventless-core 3.0.0-alpha.275 → 3.0.0-alpha.277
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
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.277 (2026-09-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @reventlessdev/reventless-core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 3.0.0-alpha.276 (2026-09-25)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **spec:** a chapter that carries both keys backs neither ([cbd823e](https://github.com/ReventlessDev/reventless-core/commit/cbd823e4f87ddd5810debd929bb536b2003d0e4c))
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 3.0.0-alpha.275 (2026-09-25)
|
|
7
22
|
|
|
8
23
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-core",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.277",
|
|
4
4
|
"description": "Core package for Reventless framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"sury": "11.0.0",
|
|
30
30
|
"uuid": "^13.0.0",
|
|
31
31
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.34",
|
|
32
|
-
"@reventlessdev/rescript-fast-csv": "2.0.0-alpha.15",
|
|
33
32
|
"@reventlessdev/rescript-hash-object": "1.2.0-alpha.15",
|
|
33
|
+
"@reventlessdev/rescript-fast-csv": "2.0.0-alpha.15",
|
|
34
34
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.11",
|
|
35
|
-
"@reventlessdev/rescript-node": "2.0.0-alpha.15",
|
|
36
35
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.22",
|
|
36
|
+
"@reventlessdev/rescript-node": "2.0.0-alpha.15",
|
|
37
37
|
"@reventlessdev/rescript-ssh2": "2.0.0-alpha.15",
|
|
38
38
|
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
|
|
39
|
-
"@reventlessdev/reventless-infra": "3.0.0-alpha.175",
|
|
40
39
|
"@reventlessdev/reventless-interop": "3.0.0-alpha.38",
|
|
41
|
-
"@reventlessdev/reventless-
|
|
40
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.177",
|
|
41
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.149"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"rescript": "12.3.1",
|
|
@@ -545,12 +545,37 @@ describe("DcbScopeInference:", () => {
|
|
|
545
545
|
},
|
|
546
546
|
)
|
|
547
547
|
|
|
548
|
+
// Every producer is present, so the arms it reads by `categoryId` all come from
|
|
549
|
+
// category slices: only the chapter can refuse the hint.
|
|
550
|
+
let categories = [
|
|
551
|
+
{...addCategory, chapter: "Category"},
|
|
552
|
+
{...renameCategory, chapter: "Category"},
|
|
553
|
+
{...archiveCategory, chapter: "Category"},
|
|
554
|
+
]
|
|
555
|
+
|
|
548
556
|
testSync(
|
|
549
557
|
"a hint its chapter disagrees with is still a contradiction",
|
|
550
558
|
() => {
|
|
551
|
-
//
|
|
559
|
+
// `RenameProduct` writes only `productId`, so `Product/` is about products.
|
|
560
|
+
let renameProduct = slice(
|
|
561
|
+
"RenameProduct",
|
|
562
|
+
~chapter="Product",
|
|
563
|
+
~consumed=[ev("ProductAdded", [scal("productId")])],
|
|
564
|
+
~produced=[ev("ProductRenamed", [scal("productId")])],
|
|
565
|
+
)
|
|
566
|
+
let inProduct = {...hinted(addProduct, "categoryId"), chapter: "Product"}
|
|
567
|
+
let issues = check([inProduct, renameProduct, ...categories])
|
|
568
|
+
expect(issues.contradictions->names)->toEqual(["AddProduct"])
|
|
569
|
+
expect(issues.overrides)->toEqual([])
|
|
570
|
+
},
|
|
571
|
+
)
|
|
572
|
+
|
|
573
|
+
testSync(
|
|
574
|
+
"a chapter that carries both keys everywhere backs neither",
|
|
575
|
+
() => {
|
|
576
|
+
// One slice, one event with both ids: the chapter cannot say which one it is about.
|
|
552
577
|
let inProduct = {...hinted(addProduct, "categoryId"), chapter: "Product"}
|
|
553
|
-
let issues = check([inProduct,
|
|
578
|
+
let issues = check([inProduct, ...categories])
|
|
554
579
|
expect(issues.contradictions->names)->toEqual(["AddProduct"])
|
|
555
580
|
expect(issues.overrides)->toEqual([])
|
|
556
581
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
+
import * as Belt_Array from "@rescript/runtime/lib/es6/Belt_Array.js";
|
|
3
4
|
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
4
5
|
import * as Primitive_string from "@rescript/runtime/lib/es6/Primitive_string.js";
|
|
5
6
|
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
@@ -884,14 +885,47 @@ globalThis.describe("DcbScopeInference:", () => {
|
|
|
884
885
|
globalThis.expect(issues.contradictions.map(e => e.sliceName)).toEqual(["ShipOrder"]);
|
|
885
886
|
globalThis.expect(issues.overrides).toEqual([]);
|
|
886
887
|
});
|
|
888
|
+
let newrecord = {...addCategory};
|
|
889
|
+
let newrecord$1 = {...renameCategory};
|
|
890
|
+
let newrecord$2 = {...archiveCategory};
|
|
891
|
+
let categories = [
|
|
892
|
+
(newrecord.chapter = "Category", newrecord),
|
|
893
|
+
(newrecord$1.chapter = "Category", newrecord$1),
|
|
894
|
+
(newrecord$2.chapter = "Category", newrecord$2)
|
|
895
|
+
];
|
|
887
896
|
globalThis.test("a hint its chapter disagrees with is still a contradiction", () => {
|
|
897
|
+
let renameProduct = slice("RenameProduct", undefined, [{
|
|
898
|
+
eventType: "ProductAdded",
|
|
899
|
+
idFields: [{
|
|
900
|
+
name: "productId",
|
|
901
|
+
isList: false
|
|
902
|
+
}]
|
|
903
|
+
}], [{
|
|
904
|
+
eventType: "ProductRenamed",
|
|
905
|
+
idFields: [{
|
|
906
|
+
name: "productId",
|
|
907
|
+
isList: false
|
|
908
|
+
}]
|
|
909
|
+
}], undefined, "Product");
|
|
888
910
|
let newrecord = {...hinted(addProduct, "categoryId")};
|
|
889
911
|
newrecord.chapter = "Product";
|
|
890
|
-
let
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
912
|
+
let issues = DcbValidation$Reventless.validatePartitionHintsVsInference(Belt_Array.concatMany([
|
|
913
|
+
[
|
|
914
|
+
newrecord,
|
|
915
|
+
renameProduct
|
|
916
|
+
],
|
|
917
|
+
categories
|
|
918
|
+
]));
|
|
919
|
+
globalThis.expect(issues.contradictions.map(e => e.sliceName)).toEqual(["AddProduct"]);
|
|
920
|
+
globalThis.expect(issues.overrides).toEqual([]);
|
|
921
|
+
});
|
|
922
|
+
globalThis.test("a chapter that carries both keys everywhere backs neither", () => {
|
|
923
|
+
let newrecord = {...hinted(addProduct, "categoryId")};
|
|
924
|
+
newrecord.chapter = "Product";
|
|
925
|
+
let issues = DcbValidation$Reventless.validatePartitionHintsVsInference(Belt_Array.concatMany([
|
|
926
|
+
[newrecord],
|
|
927
|
+
categories
|
|
928
|
+
]));
|
|
895
929
|
globalThis.expect(issues.contradictions.map(e => e.sliceName)).toEqual(["AddProduct"]);
|
|
896
930
|
globalThis.expect(issues.overrides).toEqual([]);
|
|
897
931
|
});
|