anyone know when the upgraded JS engine is suppose...
# suitescript
s
anyone know when the upgraded JS engine is supposed to hit? I'm running into issues with how their old Rhino is configured conflicting with 3rd party libs
w
@erictgrubaugh was going to ask them about this in January but I can't seem to find the followup post
e
There's probably way more info after SuiteWorld, which I did not attend
s
so just as an FYI ( I have run into this before but forget) it seems Rhino supports but is not configured at NS to allow reserved words in certain otherwise valid locations. Specifically, I've run into issues more than once where a function or getter in a 3rd party lib was named default() and it results in an arcane error in NS when trying to load the module.
k
At suiteworld it was mentioned that in 20.1, SuiteScript will move to version 2.1, which will allow ESNext syntax, however, your script header will specifically need to include
@NApiVersion 2.1
instead of
@NApiVersion 2.x
until an unspecified time in the future when ESNext becomes available to the general audience (so probably 20.2 or later), which would then allow ESNext syntax with scripts defined with
@NApiVersion 2.x
Kinda confusing, someone at Netsuite would know more specifics
m
Open beta is supposed to be in 2019.2 - but as mentioned, script headers will need a
@NApiVersion 2.1
to leverage the new engine.
👏 1
.. Which will be absolutely stable, fully functional, and include all features bug-free on initial rollout as expected.
s
well, Rhino is a very old implementation born of time when JS was still a toy
So I remain optimistic about whatever they are replacing it with. Anyone heard what specific JS engine they'll be using?
b
rhino might be spitting out the correct error, default is a reserved keyword
NetSuite plans on using https://github.com/graalvm/graaljs
s
looking at rhino docs, it appears there's a configuration setting whether to allow reserved words like that... and the related flag is apparently disabled (but is enabled by default in later versions, if I followed the Rhino history correctly) Thanks @battk - good to know (Graal)