From: Ian Jackson Date: Fri, 16 Apr 2021 15:42:19 +0000 (+0100) Subject: tsc-wrap: Support tsc version 4.x which has its own webassembly-types X-Git-Tag: otter-0.5.0~38 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3edf2db6a10fce1f4514e164a7371e64dafc557b;p=otter.git tsc-wrap: Support tsc version 4.x which has its own webassembly-types Empirically, on Debian bullseye, these are in "dom" Reported-by: Matthew Vernon Signed-off-by: Ian Jackson --- diff --git a/tsc-wrap b/tsc-wrap index 23066d5b..df23590f 100755 --- a/tsc-wrap +++ b/tsc-wrap @@ -4,8 +4,19 @@ set -e out="$1"; shift tsconfig="$1"; shift +tsc_version=$(LC_ALL=C.UTF-8 tsc --version) + files_json='[' for f in "$@"; do + case "$f" in + *webassembly-types*) + case "${tsc_version#Version }" in + 3.*) ;; + *) continue ;; + esac + ;; + esac + files_json="${files_json}\"$f\", " done files_json="$files_json]"