mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
chore: Allow namespaced requires to be sanity-checked
Fixes #2120 Change-type: patch
This commit is contained in:
parent
835f2cf769
commit
6647167d02
@ -36,7 +36,7 @@ NPM_DEV_MODULES=($(jq -r '.devDependencies | keys | .[]' "$PACKAGE_JSON"))
|
||||
|
||||
DEV_FILES_REGEX=^\(tests\|scripts\)/
|
||||
# need to do a non-greedy match, which is why we're not using (.*)
|
||||
REQUIRE_REGEX=require\\\(\'\([-_/\.a-z0-9]+\)\'\\\)
|
||||
REQUIRE_REGEX=require\\\(\'\(@?[-_/\.a-z0-9]+\)\'\\\)
|
||||
JS_OR_JSON_REGEX=\.js\(on\)?$
|
||||
HTML_REGEX=\.html$
|
||||
|
||||
@ -68,7 +68,9 @@ git ls-tree -r HEAD | while IFS='' read line; do
|
||||
requirement_found=1
|
||||
fi
|
||||
else
|
||||
required=${required%%/*}
|
||||
if [[ ! "$required" =~ ^@ ]]; then
|
||||
required=${required%%/*}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [[ $is_local -eq 0 ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user