-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw as instance of JS new Error()
#6611
Conversation
Adapted from melange-re/melange#1036 Thanks @anmonteiro
Should it be somehow marked as a ReScript exception? |
Ah, I see there's a discussion exactly about this in the Melange PR melange-re/melange#1036 (comment) |
Related issue: #4898 |
Ready for review. I don't know if it should go to v12 or v11 |
Since |
Can't we just drop support for nodejs 16 and only support node > 18? They dropped support for node 16 last August already. |
related: #6429 |
Sorry, missed this. Looks like a good change! @cristianoc any thoughts? |
Would be useful to have an assessment of the consequences of this change, as well as a description. |
@aspeddro and anyone else interested - some more research needed here, let us know if you're interested in tackling it. |
@aspeddro Could you rebase? |
Rebase done!! Are we going to merge this? I need to update the changelog |
LGTM and could be merged after after updating the CHANGELOG. We can investigate whether to port melange-re/melange#1043 separately later on. |
CHANGELOG updated 15ea253 |
Good to go from my end. |
Was wondering why CI wouldn't run, but then noticed the |
With large scale codebases (especially web clients) this is a bit of an issue. Error usage is a major cause of bundle bloat, and major libraries such as React and Apollo additionally use a system called "invariant" to reduce bundle size bloating by errors. As we own the toolchain, there remains the potential to create a much better & performant result. |
Throws an instance of JavaScript's
new Error()
and adds the extension payload forcause
optionBreaking Changes
cause
has a good support on browsers. See caniuse.comAdapted from melange-re/melange#1036
Thanks @anmonteiro