From 18300c0f9392d7f0544f630a831b5e30c43dd834 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Thu, 9 Nov 2023 15:08:18 -0800 Subject: [PATCH 1/3] fix queue-microtask --- packages/util-actor/src/index.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/util-actor/src/index.ts b/packages/util-actor/src/index.ts index dd9f8ad2f..2c8fc349e 100644 --- a/packages/util-actor/src/index.ts +++ b/packages/util-actor/src/index.ts @@ -1,7 +1,12 @@ import {mailbox as createMailbox, type IMailbox} from "./mailbox" -// eslint-disable-next-line @typescript-eslint/no-var-requires -const queueMicrotask = require("queue-microtask") +let promise: any +const _queueMicrotask = (cb: any) => + (promise || (promise = Promise.resolve())).then(cb).catch((err: any) => + setTimeout(() => { + throw err + }, 0) + ) export const INIT = "INIT" export const SUBSCRIBE = "SUBSCRIBE" @@ -189,7 +194,7 @@ export const spawn = ( fn = fromHandlers(fnOrHandlers) else fn = fnOrHandlers - queueMicrotask(async () => { + _queueMicrotask(async () => { await fn(ctx) kill(addr) }) From ad6ec80ca47d37b308162ffe0c6af360c6066669 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Thu, 9 Nov 2023 15:10:41 -0800 Subject: [PATCH 2/3] changeset --- .changeset/yellow-carrots-change.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .changeset/yellow-carrots-change.md diff --git a/.changeset/yellow-carrots-change.md b/.changeset/yellow-carrots-change.md new file mode 100644 index 000000000..453c1dacc --- /dev/null +++ b/.changeset/yellow-carrots-change.md @@ -0,0 +1,23 @@ +--- +"@onflow/util-actor": patch +"@onflow/config": patch +"@onflow/fcl": patch +"@onflow/fcl-bundle": patch +"@onflow/fcl-wc": patch +"@onflow/protobuf": patch +"@onflow/rlp": patch +"@onflow/sdk": patch +"@onflow/transport-grpc": patch +"@onflow/transport-http": patch +"@onflow/typedefs": patch +"@onflow/types": patch +"@onflow/util-address": patch +"@onflow/util-encode-key": patch +"@onflow/util-invariant": patch +"@onflow/util-logger": patch +"@onflow/util-semver": patch +"@onflow/util-template": patch +"@onflow/util-uid": patch +--- + +Fix versioning & actor bug From d6603e49ef5865fe58f5c8078cf1b77e83a4133b Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Thu, 9 Nov 2023 15:17:41 -0800 Subject: [PATCH 3/3] remove typescript from @onflow/fcl --- packages/fcl/package.json | 4 ++-- packages/fcl/src/{fcl-react-native.ts => fcl-react-native.js} | 0 packages/fcl/src/{fcl.ts => fcl.js} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename packages/fcl/src/{fcl-react-native.ts => fcl-react-native.js} (100%) rename packages/fcl/src/{fcl.ts => fcl.js} (100%) diff --git a/packages/fcl/package.json b/packages/fcl/package.json index e2ea15be4..177dd3cb6 100644 --- a/packages/fcl/package.json +++ b/packages/fcl/package.json @@ -30,12 +30,12 @@ "typescript": "^4.9.5" }, "source": { - "src/fcl.ts": { + "src/fcl.js": { "cjs": "./dist/fcl.js", "esm": "./dist/fcl.module.js", "umd": "./dist/fcl.umd.min.js" }, - "src/fcl-react-native.ts": { + "src/fcl-react-native.js": { "cjs": "./dist/fcl-react-native.js", "esm": "./dist/fcl-react-native.module.js", "umd": "./dist/fcl-react-native.umd.min.js" diff --git a/packages/fcl/src/fcl-react-native.ts b/packages/fcl/src/fcl-react-native.js similarity index 100% rename from packages/fcl/src/fcl-react-native.ts rename to packages/fcl/src/fcl-react-native.js diff --git a/packages/fcl/src/fcl.ts b/packages/fcl/src/fcl.js similarity index 100% rename from packages/fcl/src/fcl.ts rename to packages/fcl/src/fcl.js