guess-js-deps-bash 0.1.67 → 0.1.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/guess-js-deps.sh +5 -1
  2. package/package.json +1 -1
package/guess-js-deps.sh CHANGED
@@ -647,11 +647,14 @@ function find_imports_in_files () {
647
647
  eval "$(init_resolve_cache)"
648
648
  local SBC_RGX='($bogus^'"$(printf '|%s' "${AUTOGUESS_SHEBANG_CMDS[@]}"))"
649
649
  LANG=C grep -PHone '#!.*$|^(\xEF\xBB\xBF|)\s*'$(
650
- )'(import|\W*from)\s.*$|require\([^()]+\)' -- "$@" \
650
+ )'(import|\W*from)\s.*$|.?require\([^()]+\)' -- "$@" \
651
651
  | tr "'" '"' | LANG=C sed -rf <(echo '
652
652
  s~\s+~ ~g
653
653
  s~^(\./|)([^: ]+):~\2\t~
654
654
  s~^(\S+\t[0-9]+:)\xEF\xBB\xBF~\1~
655
+ s~^(\S+\t[0-9]+:)\.(require)~\r~
656
+ s~^(\S+\t[0-9]+:).(require)~\1\2~
657
+ /\r/d
655
658
  ') | LANG=C sed -nrf <(echo '
656
659
  /\t1:#!/{
657
660
  s~^(\S+)\t1:#! *(/\S*\s*|)\b'"$SBC_RGX"'\b(\s.*|)$~\3\t\1~p
@@ -812,6 +815,7 @@ function guess_one_dep_type () {
812
815
  if [ "$DEP_TYPE" == dep ]; then
813
816
  SUBDIR="${REQ_FILE%%/*}"
814
817
  case "${SUBDIR%s}" in
818
+ benchmark | \
815
819
  build | \
816
820
  debug | \
817
821
  demo | \
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  { "name": "guess-js-deps-bash",
2
- "version": "0.1.67",
2
+ "version": "0.1.68",
3
3
  "description": "A bash attempt at npm-forgot: Guess JavaScript require() dependencies, detect their versions, compare with package.json.",
4
4
 
5
5
  "keywords": [