From 3edf2db6a10fce1f4514e164a7371e64dafc557b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 16 Apr 2021 16:42:19 +0100 Subject: [PATCH] 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 --- tsc-wrap | 11 +++++++++++ 1 file changed, 11 insertions(+) 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]" -- 2.30.2