Skip to content

Commit f607fe2

Browse files
committed
Make Typescript scan heap memory configurable
1 parent d46b1da commit f607fe2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/scanTypescript.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ set -o errexit -o pipefail
99

1010
ARTIFACTS_DIRECTORY=${ARTIFACTS_DIRECTORY:-"artifacts"}
1111
SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-"source"}
12+
TYPESCRIPT_SCAN_HEAP_MEMORY=${TYPESCRIPT_SCAN_HEAP_MEMORY:-"4096"} # Heap memory in megabytes for Typescript scanning with (Node.js process). Defaults to 4096 MB.
1213

1314
## Get this "scripts" directory if not already set
1415
# Even if $BASH_SOURCE is made for Bourne-like shells it is also supported by others and therefore here the preferred solution.
@@ -54,7 +55,7 @@ else
5455
# For later troubleshooting, the output is also copied to a dedicated log file using "tee".
5556
# Note: Don't worry about the hardcoded version number. It will be updated by Renovate using a custom Manager.
5657
# Note: NODE_OPTIONS --max-old-space-size=4096 increases the memory for larger projects to scan
57-
NODE_OPTIONS="${NODE_OPTIONS} --max-old-space-size=4096" npx --yes @jqassistant/[email protected] "${directory}" --extension React 2>&1 | tee "${LOG_DIRECTORY}/jqassistant-typescript-scan-${directory_name}.log" >&2
58+
NODE_OPTIONS="${NODE_OPTIONS} --max-old-space-size=${TYPESCRIPT_SCAN_HEAP_MEMORY}" npx --yes @jqassistant/[email protected] "${directory}" --extension React 2>&1 | tee "${LOG_DIRECTORY}/jqassistant-typescript-scan-${directory_name}.log" >&2
5859
done
5960

6061
changeDetectionReturnCode=$( source "${SCRIPTS_DIR}/detectChangedFiles.sh" --hashfile "${changeDetectionHashFilePath}" --paths "./${SOURCE_DIRECTORY}")

0 commit comments

Comments
 (0)