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 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 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) })