mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 03:06:38 +00:00
Merge pull request #2123 from lurch/etcher-2120
chore: Allow namespaced requires to be sanity-checked
This commit is contained in:
commit
624b95921a
@ -36,7 +36,7 @@ NPM_DEV_MODULES=($(jq -r '.devDependencies | keys | .[]' "$PACKAGE_JSON"))
|
|||||||
|
|
||||||
DEV_FILES_REGEX=^\(tests\|scripts\)/
|
DEV_FILES_REGEX=^\(tests\|scripts\)/
|
||||||
# need to do a non-greedy match, which is why we're not using (.*)
|
# 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\)?$
|
JS_OR_JSON_REGEX=\.js\(on\)?$
|
||||||
HTML_REGEX=\.html$
|
HTML_REGEX=\.html$
|
||||||
|
|
||||||
@ -68,7 +68,9 @@ git ls-tree -r HEAD | while IFS='' read line; do
|
|||||||
requirement_found=1
|
requirement_found=1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
required=${required%%/*}
|
if [[ ! "$required" =~ ^@ ]]; then
|
||||||
|
required=${required%%/*}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $is_local -eq 0 ]]; then
|
if [[ $is_local -eq 0 ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user