asyncjs: add then, catch for promise pipelining (#16871)
* asyncjs: add then * improve tests, changelog, API * fix cryptic windows error: The parameter is incorrect * address comments
This commit is contained in:
parent
99633d7682
commit
a4e6b242d5
7 changed files with 166 additions and 24 deletions
|
|
@ -95,9 +95,15 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
|
|||
var cmdPrefix = ""
|
||||
case conf.backend
|
||||
of backendC, backendCpp, backendObjc: discard
|
||||
of backendJs: cmdPrefix = findNodeJs() & " "
|
||||
of backendJs:
|
||||
# D20210217T215950:here this flag is needed for node < v15.0.0, otherwise
|
||||
# tasyncjs_fail` would fail, refs https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode
|
||||
cmdPrefix = findNodeJs() & " --unhandled-rejections=strict "
|
||||
else: doAssert false, $conf.backend
|
||||
# No space before command otherwise on windows you'd get a cryptic:
|
||||
# `The parameter is incorrect`
|
||||
execExternalProgram(conf, cmdPrefix & output.quoteShell & ' ' & conf.arguments)
|
||||
# execExternalProgram(conf, cmdPrefix & ' ' & output.quoteShell & ' ' & conf.arguments)
|
||||
of cmdDocLike, cmdRst2html, cmdRst2tex: # bugfix(cmdRst2tex was missing)
|
||||
if conf.arguments.len > 0:
|
||||
# reserved for future use
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue