Skip to content

Commit

Permalink
Add bun compatibility
Browse files Browse the repository at this point in the history
Fixes #1802. I'm not sure if this is something you want, but it's an easy fix that doesn't break anything.

The underlying issue in Bun is probably harder for their team to fix, because it would very likely require changes to WebKit.
  • Loading branch information
AaronDewes authored Sep 9, 2023
1 parent 619e049 commit 41e52e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/caller.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ function noOpPrepareStackTrace (_, stack) {
module.exports = function getCallers () {
const originalPrepare = Error.prepareStackTrace
Error.prepareStackTrace = noOpPrepareStackTrace
const stack = new Error().stack
const tmpError = {};

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 14 macOS-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 16 macOS-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 18 macOS-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 19 macOS-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 20 macOS-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 16 windows-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 18 windows-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 19 windows-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 20 windows-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 14 ubuntu-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 16 ubuntu-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 18 ubuntu-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 19 ubuntu-latest

Extra semicolon

Check failure on line 10 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 20 ubuntu-latest

Extra semicolon
Error.captureStackTrace(tmpError)
const { stack } = tmpError;

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 14 macOS-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 16 macOS-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 18 macOS-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 19 macOS-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 20 macOS-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 16 windows-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 18 windows-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 19 windows-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 20 windows-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 14 ubuntu-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 16 ubuntu-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 18 ubuntu-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 19 ubuntu-latest

Extra semicolon

Check failure on line 12 in lib/caller.js

View workflow job for this annotation

GitHub Actions / 20 ubuntu-latest

Extra semicolon
Error.prepareStackTrace = originalPrepare

if (!Array.isArray(stack)) {
Expand Down

0 comments on commit 41e52e3

Please sign in to comment.