@graffy/common 0.15.16 → 0.15.17

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.
Files changed (3) hide show
  1. package/index.cjs +9 -5
  2. package/index.mjs +9 -5
  3. package/package.json +3 -3
package/index.cjs CHANGED
@@ -1060,18 +1060,22 @@ function decode(nodes = [], { isGraph } = {}) {
1060
1060
  delete item.$key;
1061
1061
  return collection;
1062
1062
  }
1063
- const _a = item, { $key, $val } = _a, rest = __objRest(_a, ["$key", "$val"]);
1063
+ const { $key, $val } = item;
1064
+ delete item.$key;
1065
+ delete item.$val;
1064
1066
  if (typeof $val === "object")
1065
1067
  $val.$val = true;
1066
- collection[$key] = isDef($val) ? $val : !isEmpty(rest) ? rest : isGraph ? null : true;
1068
+ collection[$key] = isDef($val) ? $val : !isEmpty(item) ? item : isGraph ? null : true;
1067
1069
  return collection;
1068
1070
  }, allStrs ? {} : []);
1069
1071
  }
1070
1072
  if (isGraph && putRanges.length) {
1071
1073
  if (putRanges[0].key === "" && putRanges[0].end === "\uFFFF") {
1072
- result.$put = true;
1074
+ Object.defineProperty(result, "$put", { value: true });
1073
1075
  } else {
1074
- result.$put = putRanges.map((rNode) => decode$2(rNode));
1076
+ Object.defineProperty(result, "$put", {
1077
+ value: putRanges.map((rNode) => decode$2(rNode))
1078
+ });
1075
1079
  }
1076
1080
  }
1077
1081
  return result;
@@ -1196,7 +1200,7 @@ function decorate(rootGraph, rootQuery) {
1196
1200
  } else if (Array.isArray(plumGraph)) {
1197
1201
  graph = decodeGraph(plumGraph);
1198
1202
  } else {
1199
- throw Error("decorate.unexpected_graph", plumGraph);
1203
+ throw Error("decorate.unexpected_graph");
1200
1204
  }
1201
1205
  }
1202
1206
  if (plumGraph[REF])
package/index.mjs CHANGED
@@ -1052,18 +1052,22 @@ function decode(nodes = [], { isGraph } = {}) {
1052
1052
  delete item.$key;
1053
1053
  return collection;
1054
1054
  }
1055
- const _a = item, { $key, $val } = _a, rest = __objRest(_a, ["$key", "$val"]);
1055
+ const { $key, $val } = item;
1056
+ delete item.$key;
1057
+ delete item.$val;
1056
1058
  if (typeof $val === "object")
1057
1059
  $val.$val = true;
1058
- collection[$key] = isDef($val) ? $val : !isEmpty(rest) ? rest : isGraph ? null : true;
1060
+ collection[$key] = isDef($val) ? $val : !isEmpty(item) ? item : isGraph ? null : true;
1059
1061
  return collection;
1060
1062
  }, allStrs ? {} : []);
1061
1063
  }
1062
1064
  if (isGraph && putRanges.length) {
1063
1065
  if (putRanges[0].key === "" && putRanges[0].end === "\uFFFF") {
1064
- result.$put = true;
1066
+ Object.defineProperty(result, "$put", { value: true });
1065
1067
  } else {
1066
- result.$put = putRanges.map((rNode) => decode$2(rNode));
1068
+ Object.defineProperty(result, "$put", {
1069
+ value: putRanges.map((rNode) => decode$2(rNode))
1070
+ });
1067
1071
  }
1068
1072
  }
1069
1073
  return result;
@@ -1188,7 +1192,7 @@ function decorate(rootGraph, rootQuery) {
1188
1192
  } else if (Array.isArray(plumGraph)) {
1189
1193
  graph = decodeGraph(plumGraph);
1190
1194
  } else {
1191
- throw Error("decorate.unexpected_graph", plumGraph);
1195
+ throw Error("decorate.unexpected_graph");
1192
1196
  }
1193
1197
  }
1194
1198
  if (plumGraph[REF])
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graffy/common",
3
3
  "description": "Common libraries that used by various Graffy modules.",
4
4
  "author": "aravind (https://github.com/aravindet)",
5
- "version": "0.15.16",
5
+ "version": "0.15.17",
6
6
  "main": "./index.cjs",
7
7
  "exports": {
8
8
  "import": "./index.mjs",
@@ -18,7 +18,7 @@
18
18
  "dependencies": {
19
19
  "lodash": "^4.17.19",
20
20
  "merge-async-iterators": "^0.2.1",
21
- "@graffy/stream": "0.15.16",
22
- "nanoid": "^3.1.31"
21
+ "@graffy/stream": "0.15.17",
22
+ "nanoid": "^3.2.0"
23
23
  }
24
24
  }