From 174a172d8f85b54e7a8ddcaef74ed104768ecace Mon Sep 17 00:00:00 2001 From: Michael HENKENS Date: Mon, 9 Feb 2026 11:37:56 +0100 Subject: [PATCH 1/3] test(tsconfig): add testing validation for angular related tsconfig by adding testing the ngx subfolders ISSUES CLOSED: #541 --- test.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test.sh b/test.sh index 9247ba59..dca2310c 100644 --- a/test.sh +++ b/test.sh @@ -127,6 +127,24 @@ do logDebug "run command \"npx --yes -p typescript@${TSCONFIG_VERSION} -c 'tsc -p ${TEMP_CONFIG_TSCONFIG}'\"" npx --yes -p typescript@${TSCONFIG_VERSION} -c "tsc -p ${TEMP_CONFIG_TSCONFIG}" ghActionsGroupEnd "validate tsconfig ${TSCONFIG_VERSION}" + + # Check for ng subfolders and validate them + if [ $(ls ${tsconfigFolder}/${TSCONFIG_VERSION} | grep "^ng" | wc -l) != 0 ]; then + NG_SUBFOLDERS=($(ls ${tsconfigFolder}/${TSCONFIG_VERSION} | grep "^ng")) + if [ ${#NG_SUBFOLDERS[@]} -gt 0 ]; then + logDebug "Found ng subfolders: ${NG_SUBFOLDERS[*]}" + for NG_SUBFOLDER in ${NG_SUBFOLDERS[@]} + do + ghActionsGroupStart "validate tsconfig ${TSCONFIG_VERSION}/${NG_SUBFOLDER}" "no-xtrace" + TEMP_CONFIG_TSCONFIG_NG="${testFolder}/tsconfig-test-file-${TSCONFIG_VERSION}-${NG_SUBFOLDER}.json" + logDebug "create temporary tsconfig file: ${TEMP_CONFIG_TSCONFIG_NG}" + echo "{\"extends\":\"../../lib/tsconfig/${TSCONFIG_VERSION}/${NG_SUBFOLDER}/tsconfig.json\",\"compilerOptions\":{\"baseUrl\":\".\"}}" > ${TEMP_CONFIG_TSCONFIG_NG} + logDebug "run command \"npx --yes -p typescript@${TSCONFIG_VERSION} -c 'tsc -p ${TEMP_CONFIG_TSCONFIG_NG}'\"" + npx --yes -p typescript@${TSCONFIG_VERSION} -c "tsc -p ${TEMP_CONFIG_TSCONFIG_NG}" + ghActionsGroupEnd "validate tsconfig ${TSCONFIG_VERSION}/${NG_SUBFOLDER}" + done + fi + fi done #ghActionsGroupEnd "validate tsconfig configurations" From dc087aa0b00c77fa875e71f1e012332ede24ac8a Mon Sep 17 00:00:00 2001 From: Alexis GEORGES Date: Tue, 10 Feb 2026 11:46:45 +0100 Subject: [PATCH 2/3] test(all): fix test.sh execution in Git Bash on Windows --- test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index dca2310c..458b3f2a 100644 --- a/test.sh +++ b/test.sh @@ -3,8 +3,9 @@ set -u -e -o pipefail readonly currentDir=$(cd $(dirname $0); pwd) -readonly testFolder=${currentDir}/.tmp/test -readonly libFolder=${currentDir}/lib +readonly osBasedCurrentDir=$(if command -v cygpath &> /dev/null; then cygpath -w "${currentDir}"; else echo "${currentDir}"; fi) +readonly testFolder=${osBasedCurrentDir}/.tmp/test +readonly libFolder=${osBasedCurrentDir}/lib readonly prettierFolder=${libFolder}/prettier readonly stylelintFolder=${libFolder}/stylelint readonly tsconfigFolder=${libFolder}/tsconfig From 80e8e8c2535d8dad42d34354301bb70f928522fb Mon Sep 17 00:00:00 2001 From: Alexis GEORGES Date: Tue, 10 Feb 2026 12:12:16 +0100 Subject: [PATCH 3/3] test(tsconfig): simplify ng tsconfig implementation --- test.sh | 57 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/test.sh b/test.sh index 458b3f2a..d8806b2b 100644 --- a/test.sh +++ b/test.sh @@ -119,32 +119,43 @@ TEMP_TEST_TSCONFIG="${testFolder}/tsconfig-test.ts" logDebug "create temporary ts file: ${TEMP_TEST_TSCONFIG}" touch ${TEMP_TEST_TSCONFIG} +# Function to validate tsconfig with optional ng subfolder +validate_tsconfig() { + local tsconfig_version=$1 + local ng_version=${2:-} + + local config_path temp_config_file validation_label + + if [ -z "$ng_version" ]; then + validation_label="tsconfig ${tsconfig_version}" + config_path="../../lib/tsconfig/${tsconfig_version}/tsconfig.json" + temp_config_file="${testFolder}/tsconfig-test-file-${tsconfig_version}.json" + else + validation_label="tsconfig ${tsconfig_version}/${ng_version}" + config_path="../../lib/tsconfig/${tsconfig_version}/${ng_version}/tsconfig.json" + temp_config_file="${testFolder}/tsconfig-test-file-${tsconfig_version}-${ng_version}.json" + fi + + ghActionsGroupStart "validate ${validation_label}" "no-xtrace" + logDebug "create temporary tsconfig file: ${temp_config_file}" + echo "{\"extends\":\"${config_path}\",\"compilerOptions\":{\"baseUrl\":\".\"}}" > ${temp_config_file} + logDebug "run command \"npx --yes -p typescript@${tsconfig_version} -c 'tsc -p ${temp_config_file}'\"" + npx --yes -p typescript@${tsconfig_version} -c "tsc -p ${temp_config_file}" + ghActionsGroupEnd "validate ${validation_label}" +} + for TSCONFIG_VERSION in ${TSCONFIG_VERSIONS[@]} do - ghActionsGroupStart "validate tsconfig ${TSCONFIG_VERSION}" "no-xtrace" - TEMP_CONFIG_TSCONFIG="${testFolder}/tsconfig-test-file-${TSCONFIG_VERSION}.json" - logDebug "create temporary tsconfig file: ${TEMP_CONFIG_TSCONFIG}" - echo "{\"extends\":\"../../lib/tsconfig/${TSCONFIG_VERSION}/tsconfig.json\",\"compilerOptions\":{\"baseUrl\":\".\"}}" > ${TEMP_CONFIG_TSCONFIG} - logDebug "run command \"npx --yes -p typescript@${TSCONFIG_VERSION} -c 'tsc -p ${TEMP_CONFIG_TSCONFIG}'\"" - npx --yes -p typescript@${TSCONFIG_VERSION} -c "tsc -p ${TEMP_CONFIG_TSCONFIG}" - ghActionsGroupEnd "validate tsconfig ${TSCONFIG_VERSION}" - + validate_tsconfig ${TSCONFIG_VERSION} + # Check for ng subfolders and validate them - if [ $(ls ${tsconfigFolder}/${TSCONFIG_VERSION} | grep "^ng" | wc -l) != 0 ]; then - NG_SUBFOLDERS=($(ls ${tsconfigFolder}/${TSCONFIG_VERSION} | grep "^ng")) - if [ ${#NG_SUBFOLDERS[@]} -gt 0 ]; then - logDebug "Found ng subfolders: ${NG_SUBFOLDERS[*]}" - for NG_SUBFOLDER in ${NG_SUBFOLDERS[@]} - do - ghActionsGroupStart "validate tsconfig ${TSCONFIG_VERSION}/${NG_SUBFOLDER}" "no-xtrace" - TEMP_CONFIG_TSCONFIG_NG="${testFolder}/tsconfig-test-file-${TSCONFIG_VERSION}-${NG_SUBFOLDER}.json" - logDebug "create temporary tsconfig file: ${TEMP_CONFIG_TSCONFIG_NG}" - echo "{\"extends\":\"../../lib/tsconfig/${TSCONFIG_VERSION}/${NG_SUBFOLDER}/tsconfig.json\",\"compilerOptions\":{\"baseUrl\":\".\"}}" > ${TEMP_CONFIG_TSCONFIG_NG} - logDebug "run command \"npx --yes -p typescript@${TSCONFIG_VERSION} -c 'tsc -p ${TEMP_CONFIG_TSCONFIG_NG}'\"" - npx --yes -p typescript@${TSCONFIG_VERSION} -c "tsc -p ${TEMP_CONFIG_TSCONFIG_NG}" - ghActionsGroupEnd "validate tsconfig ${TSCONFIG_VERSION}/${NG_SUBFOLDER}" - done - fi + NG_SUBFOLDERS=($(ls ${tsconfigFolder}/${TSCONFIG_VERSION} | grep "^ng" || true)) + if [ ${#NG_SUBFOLDERS[@]} -gt 0 ]; then + logDebug "Found ng subfolders: ${NG_SUBFOLDERS[*]}" + for NG_SUBFOLDER in ${NG_SUBFOLDERS[@]} + do + validate_tsconfig ${TSCONFIG_VERSION} ${NG_SUBFOLDER} + done fi done