Opened 4 years ago

Last modified 4 years ago

#4353 closed change

Update Js Shell version, replace non-standard "for each" syntax — at Initial Version

Reported by: kzar Assignee: kzar
Priority: P3 Milestone:
Module: Automation Keywords:
Cc: sebastian, trev, fhd Blocked By:
Blocking: #4350 Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



For issue #4350 we want to update punycode.js to the latest version (2.0.0). Unfortunately the version of Js Shell we use for transpilation with Js Hydra does not support the for (const foo of bar) syntax used in the newer versions:

325:6 SyntaxError: invalid for/in left-hand side:
325:6 	for (const currentValue of input) {
325:6 .............^

We therefore need to update Js Shell. Unfortunately the newer versions of Js Shell (for example 45) do not support the non-standard and deprecated for each syntax which is used in many of the Js Hydra scripts:

astDecompile.js:10:33 SyntaxError: missing ( after for:
astDecompile.js:10:33   return [decompileAST(stmt) for each (stmt in ast.body)].join('\n');
astDecompile.js:10:33 .................................^

What to change

Update Js Shell to version 45 in

JSSHELL_DIR = "mozilla-esr45"
               "/2016/05/2016-05-29-00-15-03-%s/" % JSSHELL_DIR)

Replace any non standard "for each" syntax used by the Js Hydra scripts with standard JavaScript.

Change History (0)

Note: See TracTickets for help on using tickets.