nudojs 1.3.8 → 1.3.10
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/README.md +1 -1
- package/dist/index.js +26 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -21,6 +21,6 @@ nudojs <version>
|
|
|
21
21
|
@nudojs/core <version> # when resolvable
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
> **Migration:** `@nudojs/cli`
|
|
24
|
+
> **Migration:** the `@nudojs/cli` forward stub has been retired — install `nudojs` only.
|
|
25
25
|
|
|
26
26
|
Full documentation: <https://nudojs.github.io/nudo/>
|
package/dist/index.js
CHANGED
|
@@ -29792,7 +29792,20 @@ function applyInstanceFields(spec, thisVal) {
|
|
|
29792
29792
|
}
|
|
29793
29793
|
function constructClass(className, thisVal, args) {
|
|
29794
29794
|
const spec = getEvalClass(className);
|
|
29795
|
-
if (!spec)
|
|
29795
|
+
if (!spec) {
|
|
29796
|
+
if (isErrorCtorName(className)) {
|
|
29797
|
+
const eb = errorBrandAbs(className, args);
|
|
29798
|
+
const instName = thisVal.shape.k === "brand" ? thisVal.shape.name : className;
|
|
29799
|
+
const inner = eb.shape.k === "brand" ? eb.shape.shape : objOf({});
|
|
29800
|
+
return abs(
|
|
29801
|
+
{ k: "brand", name: instName, shape: inner },
|
|
29802
|
+
eb.term,
|
|
29803
|
+
eb.pred,
|
|
29804
|
+
eb.conf
|
|
29805
|
+
);
|
|
29806
|
+
}
|
|
29807
|
+
return thisVal;
|
|
29808
|
+
}
|
|
29796
29809
|
if (spec.ctor) {
|
|
29797
29810
|
let tv = thisVal;
|
|
29798
29811
|
if (!spec.superName && !spec.superNull) tv = applyInstanceFields(spec, tv);
|
|
@@ -40807,6 +40820,15 @@ function flattenSumArms(ret) {
|
|
|
40807
40820
|
function isWidenedSumArm(m, parent) {
|
|
40808
40821
|
return parent.conf === "partial" && m.shape.k === "prim" && !m.term && (!m.pred || m.pred.op === "true");
|
|
40809
40822
|
}
|
|
40823
|
+
function provesBarePrimDomain(arm, constraint) {
|
|
40824
|
+
if (!constraint.prim || constraint.preds.length > 0 || isIntFlag(constraint)) {
|
|
40825
|
+
return false;
|
|
40826
|
+
}
|
|
40827
|
+
if (constraint.fields || constraint.element || constraint.members || constraint.fn) {
|
|
40828
|
+
return false;
|
|
40829
|
+
}
|
|
40830
|
+
return arm.shape.k === "prim" && arm.shape.type === constraint.prim;
|
|
40831
|
+
}
|
|
40810
40832
|
function assertImplies(ret, constraint, opts) {
|
|
40811
40833
|
const phi2 = opts?.phi ?? pTrue;
|
|
40812
40834
|
if (ret.shape.k === "never") return proved();
|
|
@@ -40841,6 +40863,9 @@ function assertSumArms(arms, parent, constraint, opts, phi2) {
|
|
|
40841
40863
|
continue;
|
|
40842
40864
|
}
|
|
40843
40865
|
if (isValueSetUnknown(arm) || isWidenedSumArm(arm, parent)) {
|
|
40866
|
+
if (isWidenedSumArm(arm, parent) && provesBarePrimDomain(arm, constraint)) {
|
|
40867
|
+
continue;
|
|
40868
|
+
}
|
|
40844
40869
|
sawUnprovable = true;
|
|
40845
40870
|
continue;
|
|
40846
40871
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nudojs",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.10",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20"
|
|
6
6
|
},
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@babel/generator": "^8.0.6",
|
|
48
48
|
"@babel/types": "^8.0.6",
|
|
49
|
-
"@nudojs/core": "1.7.
|
|
50
|
-
"@nudojs/env": "0.4.
|
|
51
|
-
"@nudojs/harvester": "0.3.
|
|
52
|
-
"@nudojs/parser": "1.4.
|
|
53
|
-
"@nudojs/service": "1.6.
|
|
49
|
+
"@nudojs/core": "1.7.9",
|
|
50
|
+
"@nudojs/env": "0.4.24",
|
|
51
|
+
"@nudojs/harvester": "0.3.10",
|
|
52
|
+
"@nudojs/parser": "1.4.6",
|
|
53
|
+
"@nudojs/service": "1.6.9",
|
|
54
54
|
"commander": "^15.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|