Skip to content

Conversation

erossignon
Copy link

…with babel

@fatso83
Copy link

fatso83 commented Apr 23, 2018

Bump. This would fix a major issue present for the last three years. Perhaps @adohe lacks write rights?

@fatso83
Copy link

fatso83 commented Apr 23, 2018

I was looking into this, when I wondered: why didn't you simply supply a fix to the callsite library? I mean, it is supposed to abstract away some details of the Stack Trace API, so might as well put the fix there.

Or doesn't the prepareStackTrace/captureStackTrace support source maps? It is a bit strange, since using the Error object is using the Stack Trace API (just implicitly).

GerHobbelt added a commit to GerHobbelt/better-assert that referenced this pull request Dec 11, 2018
…when babel has transpiled all `assert(...)` calls to something else (`(0, _.default)(...)` for example), we look for that transpiled code instead. (assuming Babel 7)

- augmented the tests to serve as unit tests which can be executed via `npm test`, including a minimal test to see if a babel-transpiled better-assert library will work.
GerHobbelt added a commit to GerHobbelt/better-assert that referenced this pull request Dec 11, 2018
…when babel has transpiled all `assert(...)` calls to something else (`(0, _.default)(...)` for example), we look for that transpiled code instead. (assuming Babel 7)

  Defensive coding ensures no crash when these assumptions don't match reality: instead of the function arguments, '???' is reported instead.
- Completely removed obsolete callsite references in the code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants