rescript-relay 1.0.1 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # master
2
2
 
3
+ # 1.0.2
4
+
5
+ ## Bug Fixes
6
+
7
+ - `private` is now correctly marked as a reserved word.
8
+
9
+ ## Improvements
10
+
11
+ - Add ReScript 10 compat in peerDependencies https://github.com/zth/rescript-relay/pull/397 @MoOx
12
+ - `makeConnectionId` helpers are now marked as `@live` to not trigger the dead code analysis.
13
+
3
14
  # 1.0.1
4
15
 
5
16
  ## Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rescript-relay",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "src/RescriptRelay.res",
5
5
  "license": "MIT",
6
6
  "author": "Gabriel Nordeborn",
@@ -39,7 +39,7 @@
39
39
  "test:ci": "jest --ci --runInBand"
40
40
  },
41
41
  "devDependencies": {
42
- "rescript": "^9.1.2",
42
+ "rescript": "^10.0.0",
43
43
  "@rescript/react": "0.10.3",
44
44
  "@testing-library/jest-dom": "^5.16.3",
45
45
  "@testing-library/react": "^13.0.0-alpha.6",
@@ -57,7 +57,7 @@
57
57
  "@rescript/react": "*",
58
58
  "react-relay": ">=11.0.0",
59
59
  "relay-runtime": "*",
60
- "rescript": "^9.1.2"
60
+ "rescript": ">=9.1.2"
61
61
  },
62
62
  "dependencies": {
63
63
  "detect-libc": "^2.0.1"
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -13,7 +13,6 @@ function renderConcurrentRootAtElementWithId(content, id) {
13
13
  };
14
14
  }
15
15
  Client.createRoot(element).render(content);
16
-
17
16
  }
18
17
 
19
18
  exports.renderConcurrentRootAtElementWithId = renderConcurrentRootAtElementWithId;
@@ -9,7 +9,7 @@ function useTransition(param) {
9
9
  return [
10
10
  match[0],
11
11
  React.useCallback((function (cb) {
12
- return startTransition(cb, undefined);
12
+ startTransition(cb, undefined);
13
13
  }), [startTransition])
14
14
  ];
15
15
  }
@@ -131,7 +131,7 @@ var Store = {
131
131
  };
132
132
 
133
133
  function toJs(f, arg) {
134
- return Curry._3(f, arg.kind, arg.owner, arg.fieldPath);
134
+ Curry._3(f, arg.kind, arg.owner, arg.fieldPath);
135
135
  }
136
136
 
137
137
  function make$1(network, store, getDataID, treatMissingFieldsAsNull, missingFieldHandlers, requiredFieldLogger, isServer, param) {
@@ -238,10 +238,10 @@ function MakeLoadQuery(C) {
238
238
  if (o !== undefined) {
239
239
  Caml_option.valFromOption(o).subscribe({
240
240
  complete: (function (param) {
241
- return resolve({
242
- TAG: /* Ok */0,
243
- _0: undefined
244
- });
241
+ resolve({
242
+ TAG: /* Ok */0,
243
+ _0: undefined
244
+ });
245
245
  })
246
246
  });
247
247
  return ;
@@ -36,38 +36,37 @@ function resolveNestedRecordFromRoot(store, path) {
36
36
  }
37
37
 
38
38
  function removeNodeFromConnections(store, node, connections) {
39
- return Belt_List.forEach(connections, (function (connectionConfig) {
40
- var owner = store.get(connectionConfig.parentID);
41
- if (owner == null) {
42
- return ;
43
- }
44
- var connection = RelayRuntime.ConnectionHandler.getConnection(owner, connectionConfig.key, connectionConfig.filters !== undefined ? Caml_option.valFromOption(connectionConfig.filters) : undefined);
45
- if (!(connection == null)) {
46
- RelayRuntime.ConnectionHandler.deleteNode(connection, node.getDataID());
47
- return ;
48
- }
49
-
50
- }));
39
+ Belt_List.forEach(connections, (function (connectionConfig) {
40
+ var owner = store.get(connectionConfig.parentID);
41
+ if (owner == null) {
42
+ return ;
43
+ }
44
+ var connection = RelayRuntime.ConnectionHandler.getConnection(owner, connectionConfig.key, connectionConfig.filters !== undefined ? Caml_option.valFromOption(connectionConfig.filters) : undefined);
45
+ if (!(connection == null)) {
46
+ RelayRuntime.ConnectionHandler.deleteNode(connection, node.getDataID());
47
+ return ;
48
+ }
49
+
50
+ }));
51
51
  }
52
52
 
53
53
  function createAndAddEdgeToConnections(store, node, connections, edgeName, insertAt) {
54
- return Belt_List.forEach(connections, (function (connectionConfig) {
55
- var connectionOwner = store.get(connectionConfig.parentID);
56
- if (connectionOwner == null) {
57
- return ;
58
- }
59
- var connection = RelayRuntime.ConnectionHandler.getConnection(connectionOwner, connectionConfig.key, connectionConfig.filters !== undefined ? Caml_option.valFromOption(connectionConfig.filters) : undefined);
60
- if (connection == null) {
61
- return ;
62
- }
63
- var edge = RelayRuntime.ConnectionHandler.createEdge(store, connection, node, edgeName);
64
- if (insertAt) {
65
- RelayRuntime.ConnectionHandler.insertEdgeBefore(connection, edge, undefined);
66
- } else {
67
- RelayRuntime.ConnectionHandler.insertEdgeAfter(connection, edge, undefined);
68
- }
69
-
70
- }));
54
+ Belt_List.forEach(connections, (function (connectionConfig) {
55
+ var connectionOwner = store.get(connectionConfig.parentID);
56
+ if (connectionOwner == null) {
57
+ return ;
58
+ }
59
+ var connection = RelayRuntime.ConnectionHandler.getConnection(connectionOwner, connectionConfig.key, connectionConfig.filters !== undefined ? Caml_option.valFromOption(connectionConfig.filters) : undefined);
60
+ if (connection == null) {
61
+ return ;
62
+ }
63
+ var edge = RelayRuntime.ConnectionHandler.createEdge(store, connection, node, edgeName);
64
+ if (insertAt) {
65
+ RelayRuntime.ConnectionHandler.insertEdgeBefore(connection, edge, undefined);
66
+ } else {
67
+ RelayRuntime.ConnectionHandler.insertEdgeAfter(connection, edge, undefined);
68
+ }
69
+ }));
71
70
  }
72
71
 
73
72
  exports.resolveNestedRecord = resolveNestedRecord;
@@ -37,7 +37,7 @@ function internal_removeUndefinedAndConvertNullsRaw(record) {
37
37
  return internal_keepMapFieldsRaw(record, (function (param) {
38
38
  var value = param[1];
39
39
  var key = param[0];
40
- var match = Caml_obj.caml_equal(value, Caml_option.some(undefined));
40
+ var match = Caml_obj.equal(value, Caml_option.some(undefined));
41
41
  if (value !== undefined) {
42
42
  return [
43
43
  key,