diff --git a/build/workers/messageParent.js b/build/workers/messageParent.js index 54f2bf3..994c899 100644 --- a/build/workers/messageParent.js +++ b/build/workers/messageParent.js @@ -39,7 +39,13 @@ function messageParent(message, parentProcess = process) { parentPort.postMessage([_types().PARENT_MESSAGE_CUSTOM, message]); } else if (typeof parentProcess.send === 'function') { - parentProcess.send([_types().PARENT_MESSAGE_CUSTOM, message]); + try { + parentProcess.send([_types().PARENT_MESSAGE_CUSTOM, message]); + } catch (error) { + console.error('jest-worker message serialization failed', error); + console.dir(message, {depth: 10}); + throw error; + } } else { throw new Error('"messageParent" can only be used inside a worker'); } diff --git a/package.json b/package.json index a1e45f9..069e70d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jest-worker", - "version": "27.0.2", + "version": "27.0.2-bigintfix", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -36,4 +36,4 @@ ,"_resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.2.tgz" ,"_integrity": "sha512-EoBdilOTTyOgmHXtw/cPc+ZrCA0KJMrkXzkrPGNwLmnvvlN1nj7MPrxpT7m+otSv2e1TLaVffzDnE/LB14zJMg==" ,"_from": "jest-worker@27.0.2" -} \ No newline at end of file +}