rescript-relay 1.0.4 → 1.0.5

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
@@ -1,5 +1,11 @@
1
1
  # master
2
2
 
3
+ # 1.0.5
4
+
5
+ ## Bug Fixes
6
+
7
+ - Fix fairly large performance issue with runtime conversion. This should give a large speedup in certain cases.
8
+
3
9
  # 1.0.4
4
10
 
5
11
  ## Improvements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rescript-relay",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "main": "src/RescriptRelay.res",
5
5
  "license": "MIT",
6
6
  "author": "Gabriel Nordeborn",
package/ppx-macos-latest CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/src/utils.js CHANGED
@@ -49,8 +49,20 @@ function traverse(
49
49
  }
50
50
 
51
51
  for (var key in currentObj) {
52
+ // Internal ReScript polymorphic variant representation, ignore.
52
53
  if (key === "VAL" || key === "NAME") continue;
53
54
 
55
+ // Ensure we don't move into internal properties coming from Relay, with the
56
+ // exception of the few names allowed to start with double underscores
57
+ // ("__typename" and "__id"), and any Relay provided variables.
58
+ if (
59
+ key.startsWith("__") &&
60
+ key !== "__typename" &&
61
+ key !== "__id" &&
62
+ !key.startsWith("__relay_internal")
63
+ )
64
+ continue;
65
+
54
66
  var isUnion = false;
55
67
  var originalValue = currentObj[key];
56
68
 
package/src/utils.mjs CHANGED
@@ -49,8 +49,20 @@ function traverse(
49
49
  }
50
50
 
51
51
  for (var key in currentObj) {
52
+ // Internal ReScript polymorphic variant representation, ignore.
52
53
  if (key === "VAL" || key === "NAME") continue;
53
54
 
55
+ // Ensure we don't move into internal properties coming from Relay, with the
56
+ // exception of the few names allowed to start with double underscores
57
+ // ("__typename" and "__id"), and any Relay provided variables.
58
+ if (
59
+ key.startsWith("__") &&
60
+ key !== "__typename" &&
61
+ key !== "__id" &&
62
+ !key.startsWith("__relay_internal")
63
+ )
64
+ continue;
65
+
54
66
  var isUnion = false;
55
67
  var originalValue = currentObj[key];
56
68