vine icon indicating copy to clipboard operation
vine copied to clipboard

ValidationError uses V8's stack trace API which breaks on Firefox

Open simoneNEMO opened this issue 1 year ago • 3 comments

Package version

v2.0.0

Describe the bug

Since you recently made some efforts to bring VineJS from Node to the Browser (h/t @Julien-R44) I wanted to flag that ValidationError uses Error.captureStackTrace which is a feature from V8's stack trace API and breaks on non V8 environments like Firefox.

Of course I understand VineJS is still officially a Node library but it is great to use on the Browser side as well, especially since it is already almost fully compatible.

Reproduction repo

No response

simoneNEMO avatar Apr 29 '24 15:04 simoneNEMO

What's the alternative to using Error.captureStackTrace in cross-browser environment?

thetutlage avatar Jun 02 '24 11:06 thetutlage

There is indeed no decent solution but seems most of codebases out there that want to be cross-browser engine compatible use something like this.

Of course is not the job of VineJS to adapt to every browser but opened this issue for awareness and to start the conversation.

simoneNEMO avatar Jun 02 '24 19:06 simoneNEMO

Is this planned? I fixed the issue on one of my projects using Yarn's patch feature, but now contributors can only use Yarn when working on it because it uses a protocol unknown to other package managers.

lahgolz avatar Jul 12 '24 12:07 lahgolz