Skip to content

Commit b5eaf7d

Browse files
authored
Merge pull request #107 from windingtree/fix/stringify
fix: add superjson serialize for BigInt
2 parents 04e3f7d + b924b29 commit b5eaf7d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

packages/queue/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"@windingtree/contracts": "^1.0.0",
3333
"@windingtree/sdk-logger": "workspace:*",
3434
"@windingtree/sdk-storage": "workspace:*",
35-
"@windingtree/sdk-utils": "workspace:*"
35+
"@windingtree/sdk-utils": "workspace:*",
36+
"superjson": "^2.2.1"
3637
},
3738
"scripts": {
3839
"build": "tsup",

packages/queue/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { simpleUid } from '@windingtree/contracts';
33
import { Storage } from '@windingtree/sdk-storage';
44
import { backoffWithJitter } from '@windingtree/sdk-utils';
55
import { createLogger } from '@windingtree/sdk-logger';
6+
import { serialize } from 'superjson';
67

78
const logger = createLogger('Queue');
89

@@ -704,7 +705,7 @@ export class Queue extends EventEmitter<QueueEvents> {
704705
}
705706

706707
this.jobs.push(job);
707-
logger.trace('Job added:', JSON.stringify(job, null, 2));
708+
logger.trace('Job added:', JSON.stringify(serialize(job), null, 2));
708709
void this.storageUpdate(job.id, job);
709710
void this.start();
710711
return job.id;

pnpm-lock.yaml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)