From 50bbaa40db578ea9261099a9da5a2743ff31197b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 13 Jul 2021 13:55:43 +0200 Subject: [PATCH] cli: polyfill for older node versions --- packages/taler-wallet-cli/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index 2fac85a7e..091ca2ff8 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -21,6 +21,12 @@ import os from "os"; import fs from "fs"; import * as clk from "./clk.js"; import { deepStrictEqual } from "assert"; +// Polyfill for encoding which isn't present globally in older nodejs versions +import { TextEncoder, TextDecoder } from "util"; +// @ts-ignore +global.TextEncoder = TextEncoder; +// @ts-ignore +global.TextDecoder = TextDecoder; import { getTestInfo, runTests } from "./integrationtests/testrunner.js"; import { PreparePayResultType,