Skip to content

Commit 27c71d3

Browse files
committed
Fix npm package.json scan error by removing the author.
Workaround can be removed when jqassistant-plugin/jqassistant-npm-plugin#5 is fixed.
1 parent 6eb4fb2 commit 27c71d3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/copyPackageJsonFiles.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fi
2121
cd "./${SOURCE_DIRECTORY}"
2222

2323
echo "copyPackageJsonFiles: Existing package.json files will be copied from from ${SOURCE_DIRECTORY} to ../${ARTIFACTS_DIRECTORY}/${NPM_PACKAGE_JSON_ARTIFACTS_DIRECTORY}"
24+
echo "copyPackageJsonFiles: Author will be removed as workaround for https://github.com/jqassistant-plugin/jqassistant-npm-plugin/issues/5"
2425

2526
for file in $( find . -path ./node_modules -prune -o -name 'package.json' -print0 | xargs -0 -r -I {}); do
2627
fileDirectory=$(dirname "${file}")
@@ -29,5 +30,11 @@ fi
2930

3031
mkdir -p "${targetDirectory}"
3132
cp "${file}" "${targetDirectory}"
33+
34+
# Workaround until the following issue is resolved:
35+
# https://github.com/jqassistant-plugin/jqassistant-npm-plugin/issues/5
36+
fileName=$(basename "${file}")
37+
sed -i.backup '/"author":.*".*"/d' "${targetDirectory}/${fileName}"
38+
rm -f "${targetDirectory}/${fileName}.backup"
3239
done
3340
)

0 commit comments

Comments
 (0)