Skip to content

Commit c24a72c

Browse files
committed
Refine Typescript scanning.
- Force npm install on conflicts. - Include React extension. - Always overwrite artifact file.
1 parent df577cc commit c24a72c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/downloader/downloadTypescriptProject.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ usePackageManagerToInstallDependencies() {
139139
case "${packageManager}" in
140140
npm)
141141
# npm ci is not sufficient for projects like "ant-design" that rely on generating the package-lock
142-
# Even if this is not standard, this is an acceptable solution for standard and edge cases.
143-
npm install --ignore-scripts --verbose || exit
142+
# Even if this is not standard, this is an acceptable solution since it is only used to prepare scanning.
143+
# The same applies to "--force" which shouldn't be done normally.
144+
npm install --ignore-scripts --force --verbose || exit
144145
;;
145146
pnpm)
146147
pnpm install --frozen-lockfile || exit
@@ -177,8 +178,8 @@ fi
177178
cd "${fullSourceDirectory}" || exit
178179
usePackageManagerToInstallDependencies
179180
echo "downloadTypescriptProject: Scanning Typescript source using @jqassistant/ts-lce..."
180-
npx --yes @jqassistant/[email protected] >"./../../runtime/logs/jqassistant-typescript-scan-${projectName}.log" 2>&1 || exit
181+
npx --yes @jqassistant/[email protected] --extension React >"./../../runtime/logs/jqassistant-typescript-scan-${projectName}.log" 2>&1 || exit
181182
)
182183
echo "downloadTypescriptProject: Moving scanned results into the artifacts/typescript directory..."
183184
mkdir -p artifacts/typescript
184-
mv -nv "${fullSourceDirectory}/.reports/jqa/ts-output.json" "artifacts/typescript/${fullProjectName}.json"
185+
mv -fv "${fullSourceDirectory}/.reports/jqa/ts-output.json" "artifacts/typescript/${fullProjectName}.json"

0 commit comments

Comments
 (0)