Skip to content

Commit

Permalink
chore: Bump volta to node 20 (#15315)
Browse files Browse the repository at this point in the history
  • Loading branch information
chargome authored Feb 6, 2025
1 parent e10db30 commit f2a777a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"yalc:publish": "lerna run yalc:publish"
},
"volta": {
"node": "18.20.5",
"node": "20.18.2",
"yarn": "1.22.22",
"pnpm": "9.15.0"
},
Expand Down
13 changes: 8 additions & 5 deletions packages/browser/src/eventbuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ export function extractType(ex: Error & { message: { error?: Error } }): string
export function extractMessage(ex: Error & { message: { error?: Error } }): string {
const message = ex?.message;

if (isWebAssemblyException(ex)) {
// For Node 18, Emscripten sets array[type, message] to the "message" property on the WebAssembly.Exception object
if (Array.isArray(ex.message) && ex.message.length == 2) {
return ex.message[1];
}
return 'wasm exception';
}

if (!message) {
return 'No error message';
}
Expand All @@ -207,11 +215,6 @@ export function extractMessage(ex: Error & { message: { error?: Error } }): stri
return message.error.message;
}

// Emscripten sets array[type, message] to the "message" property on the WebAssembly.Exception object
if (isWebAssemblyException(ex) && Array.isArray(ex.message) && ex.message.length == 2) {
return ex.message[1];
}

return message;
}

Expand Down

0 comments on commit f2a777a

Please sign in to comment.