-
Notifications
You must be signed in to change notification settings - Fork 183
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
fail test - bytenode, ncc, fastify ? #34
Comments
After a painful investigation, it seems that the issue lies in From the package README file:
So, this might be the cause of the issue. I have not figured out the exact reason why it does not play nice with bytenode. Still investigating. This is the portion that causes the error by the way: |
Found it. Here https://github.com/fastify/fast-json-stringify/blob/master/index.js#L53-L62 : code += `
${$asString.toString()}
${$asStringNullable.toString()}
${$asStringSmall.toString()}
${$asNumber.toString()}
${$asNumberNullable.toString()}
${$asIntegerNullable.toString()}
${$asNull.toString()}
${$asBoolean.toString()}
${$asBooleanNullable.toString()} The generated code uses So, in principle you can't use bytenode to protect a code that relies on |
Wow nice thanks! |
I will add this to the "known limitations" in the README file soon. Closing now. |
I got the same issue, some web framework dynamically loads its components, and uses toString to judge whether a class is loaded, which requires operator see: https://github.com/miguelmota/is-class/blob/master/is-class.js#L13 I am digging into v8 to find some workaround. |
The text was updated successfully, but these errors were encountered: