8000 Bug-fix eslint by fceller · Pull Request #14335 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Bug-fix eslint #14335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 6, 2021
Prev Previous commit
Next Next commit
Add npm module delisting script (for js/node modules)
  • Loading branch information
KVS85 committed Aug 5, 2021
commit 72268e56210517f84ef563049d768f9b5196ef6e
32 changes: 32 additions & 0 deletions Installation/delistClienNodePackage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

ferr() { echo "$*"; exit 1; }

if [ -z "${1// /}" ]; then
ferr "Package must be specified!"
else
package=$1
fi

installDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

if [[ ! -e $installDir/../js/node/package.json || ! -e $installDir/../js/node/package-lock.json ]]; then
ferr "No $installDir/../js/node/package.json or $installDir/../js/node/package-lock.json present!"
fi

if [[ $(type npm >/dev/null 2>&1) ]]; then
ferr "npm isn't present in PATH or not installed in system!"
elif [[ $(npm --version | cut -d'.' -f 1) < 5 ]]; then
echo "A" #ferr "Installed npm is $(npm --version). 5+ version is required!"
fi

test -d $installDir/../tmp/node && rm -rf $installDir/../tmp/node ; mkdir -p $installDir/../tmp/node
pushd $installDir/../tmp/node
cp $installDir/../js/node/package{,-lock}.json .
npm un --save $package && $(for i in ( package.json package-lock.json ); do cp ./$i $installDir/../js/node/$i-no-$package)
popd

rm -rf $installDir/../tmp/node

git add $installDir/../js/node/package{,-lock}.json-no-$package
git commit -m "Update package.json-no-$package and package-lock.json-no-$package with delisted $package"
0