Christiano Becker
Christiano Becker
NodeJS uses the `".mjs"` file extension, the `package.json` `"type"` field, or the `--input-type` flag. How this can be implemented? V8Js::executeModule()? And if after that I call V8Js::executeScript()? It's possible? Every...
I will look on this to use here for now, I really liked. Today I have typescript compiler embedded, like deno do. 😅 So, why not babel? 😆 But to...
I implemented a basic compileModuleString, executeModule and executeModuleString. Lacks imports resolution. It just return the referrer module itself for testing purposes. If someone is interested, my code is here: https://github.com/chrisbckr/v8js/tree/php8-es6_modules
V8JS_ZSTR uses v8::String::NewFromUtf8, so I think that is the problem. And explains why using mb_convert_encoding from ASCII to UTF-8 works. I think that we need to find a way to...
Hmmm found something interesting... zend_string.h => ZSTR_IS_VALID_UTF8() I'll test this!
Need more tests (and improvements), but... v8js_convert.cc -> zval_to_v8js ```c++ case IS_STRING: value_str = Z_STR_P(value); if (ZSTR_LEN(value_str) > std::numeric_limits::max()) { zend_throw_exception(php_ce_v8js_exception, "String exceeds maximum string length", 0); break; } zval...
And maybe we can enable this checking with a flag or something like this.
And maybe we can enable this checking with a flag or something like this.
Good point. I will investigate this.
Test this @redbullmarky ! https://github.com/chrisbckr/v8js/tree/php8-binary_data