You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is one known case where we get this trace when using String.replaceAll from src/providers/annotations.ts.
rejected promise not handled within 1 second: TypeError: contentText.replaceAll is not a function
/home/sagar/.vscode-server/bin/ee8c7def80afc00dd6e593ef12f37756d8f504ea/out/bootstrap-fork.js:5
stack trace: TypeError: contentText.replaceAll is not a function
at evaluated (/home/sagar/calva/src/providers/annotations.ts:57:42)
at Object.decorateResults (/home/sagar/calva/src/providers/annotations.ts:126:22)
at /home/sagar/calva/src/evaluate.ts:95:45
at Generator.next (<anonymous>)
at /home/sagar/calva/out/evaluate.js:8:71
at new Promise (<anonymous>)
at __awaiter (/home/sagar/calva/out/evaluate.js:4:12)
at /home/sagar/calva/src/evaluate.ts:79:65
at /home/sagar/calva/src/results-output/results-doc.ts:297:25
at processTicksAndRejections (internal/process/task_queues.js:93:5)
We can work around it with using replace(/foo/g, "bar"). instead. In fact we are, in #1338. But this is probably rather a symptom about that current assumptions on ECMA levels do not hold.
A comment on this SO answer says that replaceAll was added to Nodejs 15: https://stackoverflow.com/a/1145525/44639
but clearly this works for most Calva users, so this can not be the only issue, since currently VS Code uses Node js 14.16.0.
It is probably not about VS Code/Electron/Chrome/V8 versions either, and not solely a WIndows issue. Here are the specs for a system where replaceAll is missing:
There is one known case where we get this trace when using
String.replaceAll
fromsrc/providers/annotations.ts
.We can work around it with using
replace(/foo/g, "bar")
. instead. In fact we are, in #1338. But this is probably rather a symptom about that current assumptions on ECMA levels do not hold.A comment on this SO answer says that
replaceAll
was added to Nodejs 15: https://stackoverflow.com/a/1145525/44639but clearly this works for most Calva users, so this can not be the only issue, since currently VS Code uses Node js 14.16.0.
It is probably not about VS Code/Electron/Chrome/V8 versions either, and not solely a WIndows issue. Here are the specs for a system where
replaceAll
is missing:Here the specs for two systems where it is not missing:
There might be something with
tsconfig.json
and/orwebpack.config.js
we can use. But really, currently we are pretty clueless.This caused #1332 and also stops custom command snippets from working.
The text was updated successfully, but these errors were encountered: