- Install https://www.npmjs.com/package/patch-package
- add 3 files to /patches
- add
"postinstall": "yarn patch-package"
topackage.json
scripts.
Last active
October 18, 2024 16:41
-
-
Save cinoss/df65833fe0e7a38f51c1170979011cf8 to your computer and use it in GitHub Desktop.
Temporary fix for JS Absinthe Socket Uncaught TypeError: Cannot instantiate an arrow using patch-package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/@absinthe/socket/src/cancel.js b/node_modules/@absinthe/socket/src/cancel.js | |
index 1cd731e..75803a4 100644 | |
--- a/node_modules/@absinthe/socket/src/cancel.js | |
+++ b/node_modules/@absinthe/socket/src/cancel.js | |
@@ -60,7 +60,7 @@ const cancelActive = (absintheSocket, notifier) => | |
* unsubscribing in case it holds a subscription request | |
* | |
* @example | |
- * import * as withAbsintheSocket from "@absinthe/socket"; | |
+ * import * as withAbsintheSocket from "@absinthe/socket/src"; | |
* | |
* withAbsintheSocket.cancel(absintheSocket, notifier); | |
*/ | |
diff --git a/node_modules/@absinthe/socket/src/create.js b/node_modules/@absinthe/socket/src/create.js | |
index 9b51355..d05e116 100644 | |
--- a/node_modules/@absinthe/socket/src/create.js | |
+++ b/node_modules/@absinthe/socket/src/create.js | |
@@ -70,7 +70,7 @@ const absintheChannelName = "__absinthe__:control"; | |
* Creates an Absinthe Socket using the given Phoenix Socket instance | |
* | |
* @example | |
- * import * as withAbsintheSocket from "@absinthe/socket"; | |
+ * import * as withAbsintheSocket from "@absinthe/socket/src"; | |
* import {Socket as PhoenixSocket} from "phoenix"; | |
* const absintheSocket = withAbsintheSocket.create( | |
diff --git a/node_modules/@absinthe/socket/src/notifier/create.js b/node_modules/@absinthe/socket/src/notifier/create.js | |
index 445a611..7c4ad95 100644 | |
--- a/node_modules/@absinthe/socket/src/notifier/create.js | |
+++ b/node_modules/@absinthe/socket/src/notifier/create.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {getOperationType} from "@jumpn/utils-graphql"; | |
+import {getOperationType} from "@jumpn/utils-graphql/src"; | |
import type {GqlRequest} from "@jumpn/utils-graphql/compat/cjs/types"; | |
diff --git a/node_modules/@absinthe/socket/src/notifier/find.js b/node_modules/@absinthe/socket/src/notifier/find.js | |
index 497f27e..4ad05df 100644 | |
--- a/node_modules/@absinthe/socket/src/notifier/find.js | |
+++ b/node_modules/@absinthe/socket/src/notifier/find.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {hasIn} from "@jumpn/utils-composite"; | |
+import {hasIn} from "@jumpn/utils-composite/src"; | |
import type {Notifier} from "./types"; | |
diff --git a/node_modules/@absinthe/socket/src/notifier/findIndex.js b/node_modules/@absinthe/socket/src/notifier/findIndex.js | |
index f5ab71f..27f3ab4 100644 | |
--- a/node_modules/@absinthe/socket/src/notifier/findIndex.js | |
+++ b/node_modules/@absinthe/socket/src/notifier/findIndex.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {hasIn} from "@jumpn/utils-composite"; | |
+import {hasIn} from "@jumpn/utils-composite/src"; | |
import type {Notifier} from "./types"; | |
diff --git a/node_modules/@absinthe/socket/src/notifier/refresh.js b/node_modules/@absinthe/socket/src/notifier/refresh.js | |
index c19012a..d8ba76c 100644 | |
--- a/node_modules/@absinthe/socket/src/notifier/refresh.js | |
+++ b/node_modules/@absinthe/socket/src/notifier/refresh.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {replace as arrayReplace} from "@jumpn/utils-array"; | |
+import {replace as arrayReplace} from "@jumpn/utils-array/compat/cjs"; | |
import findIndex from "./findIndex"; | |
diff --git a/node_modules/@absinthe/socket/src/notifier/remove.js b/node_modules/@absinthe/socket/src/notifier/remove.js | |
index 06734ec..cd40936 100644 | |
--- a/node_modules/@absinthe/socket/src/notifier/remove.js | |
+++ b/node_modules/@absinthe/socket/src/notifier/remove.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {remove as arrayRemove} from "@jumpn/utils-array"; | |
+import {remove as arrayRemove} from "@jumpn/utils-array/compat/cjs"; | |
import findIndex from "./findIndex"; | |
diff --git a/node_modules/@absinthe/socket/src/notifier/unobserve.js b/node_modules/@absinthe/socket/src/notifier/unobserve.js | |
index 614e620..55f7cbb 100644 | |
--- a/node_modules/@absinthe/socket/src/notifier/unobserve.js | |
+++ b/node_modules/@absinthe/socket/src/notifier/unobserve.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {remove as arrayRemove} from "@jumpn/utils-array"; | |
+import {remove as arrayRemove} from "@jumpn/utils-array/compat/cjs"; | |
import type {Notifier, Observer} from "./types"; | |
diff --git a/node_modules/@absinthe/socket/src/observe.js b/node_modules/@absinthe/socket/src/observe.js | |
index 2004cb6..66d0990 100644 | |
--- a/node_modules/@absinthe/socket/src/observe.js | |
+++ b/node_modules/@absinthe/socket/src/observe.js | |
@@ -10,7 +10,7 @@ import type {Notifier, Observer} from "./notifier/types"; | |
* Observes given notifier using the provided observer | |
* | |
* @example | |
- * import * as withAbsintheSocket from "@absinthe/socket" | |
+ * import * as withAbsintheSocket from "@absinthe/socket/src" | |
* | |
* const logEvent = eventName => (...args) => console.log(eventName, ...args); | |
* | |
diff --git a/node_modules/@absinthe/socket/src/pushAbsintheEvent.js b/node_modules/@absinthe/socket/src/pushAbsintheEvent.js | |
index 290c751..72f097a 100644 | |
--- a/node_modules/@absinthe/socket/src/pushAbsintheEvent.js | |
+++ b/node_modules/@absinthe/socket/src/pushAbsintheEvent.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {map} from "@jumpn/utils-composite"; | |
+import {map} from "@jumpn/utils-composite/src"; | |
import type {GqlRequest} from "@jumpn/utils-graphql/compat/cjs/types"; | |
diff --git a/node_modules/@absinthe/socket/src/pushRequestUsing.js b/node_modules/@absinthe/socket/src/pushRequestUsing.js | |
index 9e5f12d..7389233 100644 | |
--- a/node_modules/@absinthe/socket/src/pushRequestUsing.js | |
+++ b/node_modules/@absinthe/socket/src/pushRequestUsing.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {requestToCompat} from "@jumpn/utils-graphql"; | |
+import {requestToCompat} from "@jumpn/utils-graphql/src"; | |
import abortNotifier from "./abortNotifier"; | |
import notifierNotifyActive from "./notifier/notifyActive"; | |
diff --git a/node_modules/@absinthe/socket/src/send.js b/node_modules/@absinthe/socket/src/send.js | |
index d1e52ab..6443ed3 100644 | |
--- a/node_modules/@absinthe/socket/src/send.js | |
+++ b/node_modules/@absinthe/socket/src/send.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {append} from "@jumpn/utils-array"; | |
+import {append} from "@jumpn/utils-array/compat/cjs"; | |
import type {GqlRequest} from "@jumpn/utils-graphql/compat/cjs/types"; | |
@@ -62,7 +62,7 @@ const getExistentIfAny = (absintheSocket, request) => { | |
* (see observe function) | |
* | |
* @example | |
- * import * as withAbsintheSocket from "@absinthe/socket"; | |
+ * import * as withAbsintheSocket from "@absinthe/socket/src"; | |
* | |
* const operation = ` | |
* subscription userSubscription($userId: ID!) { | |
diff --git a/node_modules/@absinthe/socket/src/subscription.js b/node_modules/@absinthe/socket/src/subscription.js | |
index de44085..7242e5e 100644 | |
--- a/node_modules/@absinthe/socket/src/subscription.js | |
+++ b/node_modules/@absinthe/socket/src/subscription.js | |
@@ -1,6 +1,6 @@ | |
// @flow | |
-import {errorsToString as gqlErrorsToString} from "@jumpn/utils-graphql"; | |
+import {errorsToString as gqlErrorsToString} from "@jumpn/utils-graphql/src"; | |
import type { | |
GqlError, | |
diff --git a/node_modules/@absinthe/socket/src/toObservable.js b/node_modules/@absinthe/socket/src/toObservable.js | |
index 0ae5320..e5710bb 100644 | |
--- a/node_modules/@absinthe/socket/src/toObservable.js | |
+++ b/node_modules/@absinthe/socket/src/toObservable.js | |
@@ -53,7 +53,7 @@ const createObserver = (notifier, handlers, observableObserver) => ({ | |
* @return {Observable} | |
* | |
* @example | |
- * import * as withAbsintheSocket from "@absinthe/socket"; | |
+ * import * as withAbsintheSocket from "@absinthe/socket/src"; | |
* | |
* const unobserveOrCancelIfNeeded = (absintheSocket, notifier, observer) => { | |
* if (notifier && observer) { | |
diff --git a/node_modules/@absinthe/socket/src/unobserve.js b/node_modules/@absinthe/socket/src/unobserve.js | |
index e740f18..e34794b 100644 | |
--- a/node_modules/@absinthe/socket/src/unobserve.js | |
+++ b/node_modules/@absinthe/socket/src/unobserve.js | |
@@ -17,7 +17,7 @@ const ensureHasActiveObserver = (notifier, observer) => { | |
* Detaches observer from notifier | |
* | |
* @example | |
- * import * as withAbsintheSocket from "@absinthe/socket"; | |
+ * import * as withAbsintheSocket from "@absinthe/socket/src"; | |
* | |
* withAbsintheSocket.unobserve(absintheSocket, notifier, observer); | |
*/ | |
diff --git a/node_modules/@absinthe/socket/src/unobserveOrCancel.js b/node_modules/@absinthe/socket/src/unobserveOrCancel.js | |
index ad456e7..faafa8f 100644 | |
--- a/node_modules/@absinthe/socket/src/unobserveOrCancel.js | |
+++ b/node_modules/@absinthe/socket/src/unobserveOrCancel.js | |
@@ -16,7 +16,7 @@ const doUnobserveOrCancel = (absintheSocket, notifier, observer) => | |
* detaches given observer from notifier otherwise | |
* | |
* @example | |
- * import * as withAbsintheSocket from "@absinthe/socket"; | |
+ * import * as withAbsintheSocket from "@absinthe/socket/src"; | |
* | |
* withAbsintheSocket.unobserve(absintheSocket, notifier, observer); | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/@absinthe/socket-apollo-link/src/createAbsintheSocketLink.js b/node_modules/@absinthe/socket-apollo-link/src/createAbsintheSocketLink.js | |
index 4ea7860..948408d 100644 | |
--- a/node_modules/@absinthe/socket-apollo-link/src/createAbsintheSocketLink.js | |
+++ b/node_modules/@absinthe/socket-apollo-link/src/createAbsintheSocketLink.js | |
@@ -1,11 +1,11 @@ | |
// @flow | |
import {ApolloLink} from "apollo-link"; | |
-import {send, toObservable, unobserveOrCancel} from "@absinthe/socket"; | |
+import {send, toObservable, unobserveOrCancel} from "@absinthe/socket/src"; | |
import {compose} from "flow-static-land/lib/Fun"; | |
import {print} from "graphql"; | |
-import type {AbsintheSocket, GqlRequest, Observer} from "@absinthe/socket"; | |
+import type {AbsintheSocket, GqlRequest, Observer} from "@absinthe/socket/src"; | |
import type {DocumentNode} from "graphql/language/ast"; | |
type ApolloOperation<Variables> = {| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/@jumpn/utils-composite/src/getIn.js b/node_modules/@jumpn/utils-composite/src/getIn.js | |
index 63daa43..8141bb6 100644 | |
--- a/node_modules/@jumpn/utils-composite/src/getIn.js | |
+++ b/node_modules/@jumpn/utils-composite/src/getIn.js | |
@@ -1,7 +1,7 @@ | |
// @flow | |
import {curry} from "flow-static-land/lib/Fun"; | |
-import {isLastIndex} from "@jumpn/utils-array"; | |
+import {isLastIndex} from "@jumpn/utils-array/compat/cjs"; | |
import get from "./get"; | |
import isComposite from "./is"; | |
diff --git a/node_modules/@jumpn/utils-composite/src/remove.js b/node_modules/@jumpn/utils-composite/src/remove.js | |
index d0b0a33..44a3ad8 100644 | |
--- a/node_modules/@jumpn/utils-composite/src/remove.js | |
+++ b/node_modules/@jumpn/utils-composite/src/remove.js | |
@@ -1,7 +1,7 @@ | |
// @flow | |
import {curry} from "flow-static-land/lib/Fun"; | |
-import {remove as arrayRemove} from "@jumpn/utils-array"; | |
+import {remove as arrayRemove} from "@jumpn/utils-array/compat/cjs"; | |
import type {Composite, Key} from "./types"; | |
diff --git a/node_modules/@jumpn/utils-composite/src/updateIn.js b/node_modules/@jumpn/utils-composite/src/updateIn.js | |
index 7754dd0..928a8ed 100644 | |
--- a/node_modules/@jumpn/utils-composite/src/updateIn.js | |
+++ b/node_modules/@jumpn/utils-composite/src/updateIn.js | |
@@ -1,7 +1,7 @@ | |
// @flow | |
import {curry} from "flow-static-land/lib/Fun"; | |
-import {isLastIndex} from "@jumpn/utils-array"; | |
+import {isLastIndex} from "@jumpn/utils-array/compat/cjs"; | |
import get from "./get"; | |
import hasKey from "./hasKey"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
createAbsintheSocketLink, | |
type AbsintheSocketLink, | |
} from "@absinthe/socket-apollo-link/src"; | |
import * as AbsintheSocket from "@absinthe/socket/src"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment