5454fi
5555
5656if [ -d " ./${SOURCE_DIRECTORY} " ] ; then
57+ # Scan package.json files for npm (nodes package manager) in the source directory
58+ # Since the following issue had been resolved, the scan be done here again:
59+ # https://github.com/jqassistant-plugin/jqassistant-npm-plugin/issues/5
60+ npmPackageJsonFiles=" $( findPackageJsonFiles " ./${SOURCE_DIRECTORY} " ) "
61+ if [ -n " ${npmPackageJsonFiles} " ]; then
62+ directoriesAndFilesToScan=" $( appendNonEmpty " ${directoriesAndFilesToScan} " ) ${npmPackageJsonFiles} "
63+ fi
64+
5765 # Scan Typescript analysis json data files in the source directory
66+ # Since Typescript scan might produce duplicate fileName properties on File nodes,
67+ # it is done after the npm package.json scan, that breaks the scan on duplicate fileName properties.
68+ # This order fixes "XOException: Expected exactly one result, but got CompositeRowObject".
5869 typescriptAnalysisFiles=" $( find -L " ./${SOURCE_DIRECTORY} " \
5970 -type d -name " node_modules" -prune -o \
6071 -type d -name " dist" -prune -o \
@@ -69,14 +80,6 @@ if [ -d "./${SOURCE_DIRECTORY}" ] ; then
6980 directoriesAndFilesToScan=" $( appendNonEmpty " ${directoriesAndFilesToScan} " ) ${typescriptAnalysisFiles} "
7081 fi
7182
72- # Scan package.json files for npm (nodes package manager) in the source directory
73- # Since the following issue had been resolved, the scan be done here again:
74- # https://github.com/jqassistant-plugin/jqassistant-npm-plugin/issues/5
75- npmPackageJsonFiles=" $( findPackageJsonFiles " ./${SOURCE_DIRECTORY} " ) "
76- if [ -n " ${npmPackageJsonFiles} " ]; then
77- directoriesAndFilesToScan=" $( appendNonEmpty " ${directoriesAndFilesToScan} " ) ${npmPackageJsonFiles} "
78- fi
79-
8083 # Scan git repositories in the artifacts directory
8184 if [ " ${IMPORT_GIT_LOG_DATA_IF_SOURCE_IS_PRESENT} " = " " ] || [ " ${IMPORT_GIT_LOG_DATA_IF_SOURCE_IS_PRESENT} " = " plugin" ] ; then
8285 gitDirectories=" $( find -L " ./${SOURCE_DIRECTORY} " \
0 commit comments