8000 Bug-fix eslint (#14335) · arangodb/arangodb@06a1544 · GitHub
[go: up one dir, main page]

Skip to content

Commit 06a1544

Browse files
fcellerKVS85
andauthored
Bug-fix eslint (#14335)
* fix for windows install * Update CHANGELOG * Adjust no-eslint to current packages state * Add npm module delisting script (for js/node modules) * Remove unreliable node modules regex * Fix typo * Fix typo * Clear js/node/package-lock.json-no-* * Update package.json-no-eslint and package-lock.json-no-eslint with delisted eslint Co-authored-by: Vadim <vadim@arangodb.com>
1 parent 276bf69 commit 06a1544

File tree

5 files changed

+3193
-0
lines changed

5 files changed

+3193
-0
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
devel
22
-----
33

4+
* Fixed ES-867 and ES-922: removed eslint from NPM packages descriptions and
5+
updated netmask package to non-vulnerable version.
6+
47
* Web UI: Fixes a logical error which occured after re-visiting the logs view
58
which lead to not displaying the logs view and its entries correctly
69
(BTS-507).
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
ferr() { echo "$*"; exit 1; }
4+
5+
if [ -z "${1// /}" ]; then
6+
ferr "Package must be specified!"
7+
else
8+
package=$1
9+
fi
10+
11+
installDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
12+
13+
if [[ ! -e $installDir/../js/node/package.json || ! -e $installDir/../js/node/package-lock.json ]]; then
14+
ferr "No $installDir/../js/node/package.json or $installDir/../js/node/package-lock.json is present!"
15+
fi
16+
17+
if [[ $(type npm >/dev/null 2>&1) ]]; then
18+
ferr "npm isn't present in PATH or not installed in system!"
19+
elif [[ $(npm --version | cut -d'.' -f 1) < 5 ]]; then
20+
echo "A" #ferr "Installed npm is $(npm --version). 5+ version is required!"
21+
fi
22+
23+
test -d $installDir/../tmp/node && rm -rf $installDir/../tmp/node ; mkdir -p $installDir/../tmp/node
24+
pushd $installDir/../tmp/node
25+
cp $installDir/../js/node/package{,-lock}.json .
26+
npm un --save $package && $(for i in package{,-lock}.json; do cp $i $installDir/../js/node/$i-no-$package; done)
27+
popd
28+
29+
rm -rf $installDir/../tmp/node
30+
31+
git add $installDir/../js/node/package{,-lock}.json-no-$package
32+
git commit -m "Update package.json-no-$package and package-lock.json-no-$package with delisted $package"

cmake/InstallArangoDBJSClient.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,17 @@ install(
3838
REGEX "^.*/eslint" EXCLUDE
3939
REGEX "^.*/.npmignore" EXCLUDE
4040
REGEX "^.*/.bin" EXCLUDE
41+
REGEX "^.*/.*-no-eslint" EXCLUDE
42+
)
43+
44+
install(
45+
FILES ${ARANGODB_SOURCE_DIR}/js/node/package.json-no-eslint
46+
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR_ARANGO}/${ARANGODB_JS_VERSION}/node
47+
RENAME package.json
48+
)
49+
50+
install(
51+
FILES ${ARANGODB_SOURCE_DIR}/js/node/package-lock.json-no-eslint
52+
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR_ARANGO}/${ARANGODB_JS_VERSION}/node
53+
RENAME package-lock.json
4154
)

0 commit comments

Comments
 (0)
0