@nudojs/core 1.10.1 → 1.10.2

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.
@@ -47,7 +47,7 @@ import {
47
47
  withEvalBudgetOverride,
48
48
  withExecPhi,
49
49
  withFnBudgetOverride
50
- } from "./chunk-2ZIOQGW3.js";
50
+ } from "./chunk-VKSROGOF.js";
51
51
 
52
52
  // src/algebra/directive-scan.ts
53
53
  function cleanDirectiveLine(raw, kind) {
@@ -14772,14 +14772,32 @@ function $concat(a, b) {
14772
14772
  if (isMapAbs(x)) return mapEntriesAbs(x);
14773
14773
  const mi = matchIterElements(x);
14774
14774
  if (mi) return mi;
14775
+ if (x.shape.k === "brand") return expand(x.shape.shape);
14776
+ if (x.shape.k === "tuple") return [...x.shape.elements];
14775
14777
  return null;
14776
14778
  };
14779
+ const sideEl = (x, expanded) => {
14780
+ if (expanded) {
14781
+ return expanded.length ? expanded.reduce((u, y) => joinAbs(u, y)) : abs({ k: "never" }, void 0, void 0, "exact");
14782
+ }
14783
+ if (x?.shape?.k === "any") return anyMemberResult();
14784
+ if (x?.shape?.k === "tuple") {
14785
+ const els = x.shape.elements;
14786
+ return els.length ? els.reduce((u, y) => joinAbs(u, y)) : abs({ k: "never" }, void 0, void 0, "exact");
14787
+ }
14788
+ if (x?.shape?.k === "prim" && x.shape.type === "string") {
14789
+ return abs({ k: "prim", type: "string" }, void 0, void 0, "path");
14790
+ }
14791
+ if (x?.shape?.k === "arr") return x.shape.element;
14792
+ if (x?.shape?.k === "brand") return sideEl(x.shape.shape, null);
14793
+ return unknown;
14794
+ };
14777
14795
  if (as.k === "tuple") {
14778
14796
  const be = expand(b);
14779
14797
  if (be) {
14780
14798
  return tupleOrWiden([...as.elements, ...be], confJoin(a.conf, b.conf));
14781
14799
  }
14782
- const bEl = b?.shape?.k === "any" ? anyMemberResult() : unknown;
14800
+ const bEl = sideEl(b, be);
14783
14801
  return abs(
14784
14802
  { k: "arr", element: [...as.elements, bEl].reduce((x, y) => joinAbs(x, y)) },
14785
14803
  void 0,
@@ -14791,20 +14809,6 @@ function $concat(a, b) {
14791
14809
  if (ae && bs.k === "tuple") {
14792
14810
  return tupleOrWiden([...ae, ...bs.elements], confJoin(a.conf, b.conf));
14793
14811
  }
14794
- const sideEl = (x, expanded) => {
14795
- if (expanded) {
14796
- return expanded.length ? expanded.reduce((u, y) => joinAbs(u, y)) : abs({ k: "never" }, void 0, void 0, "exact");
14797
- }
14798
- if (x?.shape?.k === "any") return anyMemberResult();
14799
- if (x?.shape?.k === "tuple") {
14800
- const els = x.shape.elements;
14801
- return els.length ? els.reduce((u, y) => joinAbs(u, y)) : abs({ k: "never" }, void 0, void 0, "exact");
14802
- }
14803
- if (x?.shape?.k === "prim" && x.shape.type === "string") {
14804
- return abs({ k: "prim", type: "string" }, void 0, void 0, "path");
14805
- }
14806
- return unknown;
14807
- };
14808
14812
  return abs(
14809
14813
  { k: "arr", element: joinAbs(sideEl(a, ae), sideEl(b, expand(b))) },
14810
14814
  void 0,
@@ -14838,6 +14842,9 @@ function iterabilityKind(a) {
14838
14842
  if (s.slots["@@iterator"]) return "total";
14839
14843
  return s.open ? "may" : "definite";
14840
14844
  }
14845
+ if (s.k === "brand") {
14846
+ return iterabilityKind(s.shape) === "total" ? "total" : "may";
14847
+ }
14841
14848
  return "may";
14842
14849
  }
14843
14850
  function asyncIterabilityKind(a) {
@@ -14855,6 +14862,12 @@ function asyncIterabilityKind(a) {
14855
14862
  if (s.k === "obj" && !s.slots["@@iterator"] && s.slots["@@asyncIterator"]) {
14856
14863
  return "total";
14857
14864
  }
14865
+ if (s.k === "brand") {
14866
+ const ish = s.shape.shape;
14867
+ if (ish.k === "obj" && !ish.slots["@@iterator"] && ish.slots["@@asyncIterator"]) {
14868
+ return "total";
14869
+ }
14870
+ }
14858
14871
  return iterabilityKind(a);
14859
14872
  }
14860
14873
  function guardIterable(a, ctx2) {
@@ -14918,6 +14931,7 @@ function elemsOf(a) {
14918
14931
  if (a.shape.k === "prim" && a.shape.type === "string") {
14919
14932
  return [abs({ k: "prim", type: "string" }, void 0, void 0, "path")];
14920
14933
  }
14934
+ if (a.shape.k === "brand") return elemsOf(a.shape.shape);
14921
14935
  return [unknown];
14922
14936
  }
14923
14937
  function $forInKeys(o) {
@@ -21459,7 +21473,7 @@ ${js}`;
21459
21473
  (k) => !ENV_SHADOW_SKIP.has(k)
21460
21474
  );
21461
21475
  if (envInjectNames.length > 0) {
21462
- const envBinds = envInjectNames.map((k) => `const ${k} = __nudoEnv[${JSON.stringify(k)}];`).join("\n");
21476
+ const envBinds = envInjectNames.map((k) => `let ${k} = __nudoEnv[${JSON.stringify(k)}];`).join("\n");
21463
21477
  js = `${envBinds}
21464
21478
  ${js}`;
21465
21479
  }
package/dist/exec.js CHANGED
@@ -200,7 +200,7 @@ import {
200
200
  tryRunTranspiled,
201
201
  withEvalBudgetOverride,
202
202
  withExecPhi
203
- } from "./chunk-2ZIOQGW3.js";
203
+ } from "./chunk-VKSROGOF.js";
204
204
  export {
205
205
  $absVal,
206
206
  $add,
package/dist/index.js CHANGED
@@ -64,7 +64,7 @@ import {
64
64
  takeInterfaceDiagsSince,
65
65
  takeRefineDiags,
66
66
  takeRefineDiagsSince
67
- } from "./chunk-PKVKQB5S.js";
67
+ } from "./chunk-GHFGZ6PZ.js";
68
68
  import {
69
69
  $add,
70
70
  $arguments,
@@ -522,7 +522,7 @@ import {
522
522
  v,
523
523
  withExecPhi,
524
524
  withVar
525
- } from "./chunk-2ZIOQGW3.js";
525
+ } from "./chunk-VKSROGOF.js";
526
526
 
527
527
  // src/environment.ts
528
528
  function createEnvironment(parent, bindings = /* @__PURE__ */ new Map()) {
package/dist/internal.js CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  stableAnalyzeKeySource,
22
22
  stablePathKey,
23
23
  stablePathKeyGraph
24
- } from "./chunk-PKVKQB5S.js";
24
+ } from "./chunk-GHFGZ6PZ.js";
25
25
  import {
26
26
  $tryDigestSoft,
27
27
  $tryMarkSoft,
@@ -169,7 +169,7 @@ import {
169
169
  withEvalBudgetOverride,
170
170
  withFnBudgetOverride,
171
171
  wrapPromise
172
- } from "./chunk-2ZIOQGW3.js";
172
+ } from "./chunk-VKSROGOF.js";
173
173
 
174
174
  // src/algebra/inlay.ts
175
175
  function listFunctions(source) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nudojs/core",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },