Replies: 4 comments 2 replies
-
Latest Jint 3 beta seems to work correctly:
So the library should be updated or some custom JS function to be used (can also be CLR function if this SSJS thing allows registering those). |
Beta Was this translation helpful? Give feedback.
-
@lahma unfortunately CLR is not enabled (for obvious security reasons) in SFMC :-( I doubt that Salesforce will update the JS runtime engine if they haven't done it in years :-( stuck at ES3...I think it says it all. Trying to get a workaround with custom JS but it is far from ideal. |
Beta Was this translation helpful? Give feedback.
-
I don't know if Salesforce has any issue tracker to file an issue about updating. They would benefit in many ways, like new syntax support, manyfold performance increase in some scenarios. |
Beta Was this translation helpful? Give feedback.
-
I added my feedback on the closest thing as an issue tracker they've for the public: https://ideas.salesforce.com/s/idea/a0B8W00000GdfBLUAZ/update-ssjs-to-use-modern-javascript |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Tried to implement hmac sha-256 for marketing cloud in SSJS which is powered by some old version of Jint and it turns out that most of the bitwise operations are either returning wrong result or throwing ArithmeticOverflowException.
Simplest issue I ran into is this:
Correct value would be:
-67108864
Do you recall any issue around this Sebastien?
This shows the issue in more detail: https://salesforce.stackexchange.com/questions/363226/ssjs-left-shift-operator-and-2s-complement-different-behaviour-than-in-j
Beta Was this translation helpful? Give feedback.
All reactions