@modernpoacher/deps 2.0.22 → 2.0.24

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.
@@ -43,13 +43,13 @@ log(`\`common\` (${VERSION} - ${PLATFORM}) is awake`)
43
43
 
44
44
  const OPTIONS = {
45
45
  maxBuffer: 1024 * 2000,
46
- shell: true,
47
46
  stdio: 'inherit',
48
47
  env: {
49
48
  DEBUG_COLORS: 'yes',
50
49
  FORCE_COLOR: PLATFORM === 'win32'
51
50
  ? 3
52
- : 2
51
+ : 2,
52
+ PATH: process.env.PATH
53
53
  }
54
54
  }
55
55
 
package/bin/deps.sh CHANGED
@@ -47,9 +47,18 @@ function can_update {
47
47
 
48
48
  if [ -z "$default_branch" ]
49
49
  then
50
- echo -e "Failed to identify the default branch for \033[0;35m$directory_name\033[0m"
50
+ default_branch=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
51
51
 
52
- return 1
52
+ if [ -z "$default_branch" ]
53
+ then
54
+ echo -e "Failed to identify the default branch for \033[0;35m$directory_name\033[0m"
55
+
56
+ return 1
57
+ else
58
+ echo -e "The default branch for \033[0;35m$directory_name\033[0m is '$default_branch'"
59
+
60
+ return 0
61
+ fi
53
62
  else
54
63
  echo -e "The default branch for \033[0;35m$directory_name\033[0m is '$default_branch'"
55
64
 
package/bin/head.sh CHANGED
@@ -75,9 +75,18 @@ function can_git_remote_set_head {
75
75
 
76
76
  if [ -z "$default_branch" ]
77
77
  then
78
- echo -e "Failed to identify the default branch for \033[0;35m$directory_name\033[0m"
78
+ default_branch=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
79
79
 
80
- return 1
80
+ if [ -z "$default_branch" ]
81
+ then
82
+ echo -e "Failed to identify the default branch for \033[0;35m$directory_name\033[0m"
83
+
84
+ return 1
85
+ else
86
+ echo -e "The default branch for \033[0;35m$directory_name\033[0m is '$default_branch'"
87
+
88
+ return 0
89
+ fi
81
90
  else
82
91
  echo -e "The default branch for \033[0;35m$directory_name\033[0m is '$default_branch'"
83
92
 
package/bin/push.sh CHANGED
@@ -17,17 +17,26 @@ function report {
17
17
  }
18
18
 
19
19
  function checkout_default_branch {
20
- DIR=$(echo "$PWD" | sed 's/\\/\//g' | sed 's/://') && [[ $(cat "$DIR/.git/refs/remotes/origin/HEAD" 2> /dev/null) =~ $EXP ]] && default_branch="${BASH_REMATCH[0]}"
21
-
22
20
  local directory_name
23
21
 
24
22
  directory_name="${1##*/}" # directory_name="$(basename "$(git rev-parse --show-toplevel)")"
25
23
 
24
+ DIR=$(echo "$PWD" | sed 's/\\/\//g' | sed 's/://') && [[ $(cat "$DIR/.git/refs/remotes/origin/HEAD" 2> /dev/null) =~ $EXP ]] && default_branch="${BASH_REMATCH[0]}"
25
+
26
26
  if [ -z "$default_branch" ]
27
27
  then
28
- echo -e "Failed to identify the default branch for \033[0;35m$directory_name\033[0m"
28
+ default_branch=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
29
+
30
+ if [ -z "$default_branch" ]
31
+ then
32
+ echo -e "Failed to identify the default branch for \033[0;35m$directory_name\033[0m"
29
33
 
30
- return 1
34
+ return 1
35
+ else
36
+ echo -e "The default branch for \033[0;35m$directory_name\033[0m is '$default_branch'"
37
+
38
+ return 0
39
+ fi
31
40
  else
32
41
  echo -e "The default branch for \033[0;35m$directory_name\033[0m is '$default_branch'"
33
42
 
package/bin/wipe.sh CHANGED
@@ -17,17 +17,26 @@ function report {
17
17
  }
18
18
 
19
19
  function checkout_default_branch {
20
- DIR=$(echo "$PWD" | sed 's/\\/\//g' | sed 's/://') && [[ $(cat "$DIR/.git/refs/remotes/origin/HEAD" 2> /dev/null) =~ $EXP ]] && default_branch="${BASH_REMATCH[0]}"
21
-
22
20
  local directory_name
23
21
 
24
22
  directory_name="${1##*/}" # directory_name="$(basename "$(git rev-parse --show-toplevel)")"
25
23
 
24
+ DIR=$(echo "$PWD" | sed 's/\\/\//g' | sed 's/://') && [[ $(cat "$DIR/.git/refs/remotes/origin/HEAD" 2> /dev/null) =~ $EXP ]] && default_branch="${BASH_REMATCH[0]}"
25
+
26
26
  if [ -z "$default_branch" ]
27
27
  then
28
- echo -e "Failed to identify the default branch for \033[0;35m$directory_name\033[0m"
28
+ default_branch=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
29
+
30
+ if [ -z "$default_branch" ]
31
+ then
32
+ echo -e "Failed to identify the default branch for \033[0;35m$directory_name\033[0m"
29
33
 
30
- return 1
34
+ return 1
35
+ else
36
+ echo -e "The default branch for \033[0;35m$directory_name\033[0m is '$default_branch'"
37
+
38
+ return 0
39
+ fi
31
40
  else
32
41
  echo -e "The default branch for \033[0;35m$directory_name\033[0m is '$default_branch'"
33
42
 
package/nvm.sh CHANGED
@@ -30,8 +30,6 @@ then
30
30
  else
31
31
  echo Environment has NVM version $VERSION installed
32
32
 
33
- set -e
34
-
35
33
  nvm use
36
34
 
37
35
  if [[ $? != 0 ]];
@@ -41,3 +39,5 @@ else
41
39
  echo Environment has NVM version $VERSION configured
42
40
  fi
43
41
  fi
42
+
43
+ exit 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.0.22",
3
+ "version": "2.0.24",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -63,7 +63,7 @@
63
63
  "@babel/preset-env": "^7.21.5",
64
64
  "@babel/register": "^7.21.0",
65
65
  "chai": "^4.3.7",
66
- "core-js": "^3.30.1",
66
+ "core-js": "^3.30.2",
67
67
  "cross-env": "^7.0.3",
68
68
  "eslint": "^8.40.0",
69
69
  "eslint-config-standard": "^17.0.0",
@@ -51,13 +51,13 @@ eval $(ssh-agent -k) 1> /dev/null
51
51
 
52
52
  const OPTIONS = {
53
53
  maxBuffer: 1024 * 2000,
54
- shell: true,
55
54
  stdio: 'inherit',
56
55
  env: {
57
56
  DEBUG_COLORS: 'yes',
58
57
  FORCE_COLOR: PLATFORM === 'win32'
59
58
  ? 3
60
- : 2
59
+ : 2,
60
+ PATH: process.env.PATH
61
61
  }
62
62
  }
63
63
 
package/src/index.mjs CHANGED
@@ -46,13 +46,13 @@ log(`\`deps\` (${VERSION} - ${PLATFORM}) is awake`)
46
46
 
47
47
  const OPTIONS = {
48
48
  maxBuffer: 1024 * 2000,
49
- shell: true,
50
49
  stdio: 'inherit',
51
50
  env: {
52
51
  DEBUG_COLORS: 'yes',
53
52
  FORCE_COLOR: PLATFORM === 'win32'
54
53
  ? 3
55
- : 2
54
+ : 2,
55
+ PATH: process.env.PATH
56
56
  }
57
57
  }
58
58
 
@@ -43,13 +43,13 @@ log(`\`install\` (${VERSION} - ${PLATFORM}) is awake`)
43
43
 
44
44
  const OPTIONS = {
45
45
  maxBuffer: 1024 * 2000,
46
- shell: true,
47
46
  stdio: 'inherit',
48
47
  env: {
49
48
  DEBUG_COLORS: 'yes',
50
49
  FORCE_COLOR: PLATFORM === 'win32'
51
50
  ? 3
52
- : 2
51
+ : 2,
52
+ PATH: process.env.PATH
53
53
  }
54
54
  }
55
55