@modernpoacher/deps 2.1.27 → 2.1.29

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.
package/bin/bash/b.sh CHANGED
@@ -5,10 +5,10 @@ cd "$HOME"
5
5
  if [ -f .bashrc ];
6
6
  then
7
7
  source .bashrc
8
-
9
- export ZSH_AUTH_SOCK=$ZSH_AUTH_SOCK
10
- export PATH=$PATH
11
- export HOME=$HOME
12
8
  fi
13
9
 
10
+ export ZSH_AUTH_SOCK=$ZSH_AUTH_SOCK
11
+ export PATH=$PATH
12
+ export HOME=$HOME
13
+
14
14
  exit 0
package/bin/bash/deps.sh CHANGED
@@ -103,7 +103,7 @@ function execute {
103
103
  return 0
104
104
  }
105
105
 
106
- HOME=$PWD
106
+ TOP=$PWD
107
107
 
108
108
  echo
109
109
  echo -e "\033[0;32mStarting \`deps\` ...\033[0m" # "Starting ..."
@@ -189,7 +189,7 @@ else
189
189
  done
190
190
  fi
191
191
 
192
- cd "$HOME"
192
+ cd "$TOP"
193
193
  else
194
194
  if [ ! -z "$from" ]
195
195
  then
package/bin/bash/head.sh CHANGED
@@ -161,7 +161,7 @@ function execute {
161
161
  fi
162
162
  }
163
163
 
164
- HOME=$PWD
164
+ TOP=$PWD
165
165
 
166
166
  echo
167
167
  echo -e "\033[0;32mStarting \`deps-head\` ...\033[0m" # "Starting ..."
@@ -229,7 +229,7 @@ else
229
229
  done
230
230
  fi
231
231
 
232
- cd "$HOME"
232
+ cd "$TOP"
233
233
  fi
234
234
  fi
235
235
 
package/bin/bash/push.sh CHANGED
@@ -86,7 +86,7 @@ function execute {
86
86
  return 0
87
87
  }
88
88
 
89
- HOME=$PWD
89
+ TOP=$PWD
90
90
 
91
91
  echo
92
92
  echo -e "\033[0;32mStarting \`deps-push\` ...\033[0m" # "Starting ..."
@@ -154,7 +154,7 @@ else
154
154
  done
155
155
  fi
156
156
 
157
- cd "$HOME"
157
+ cd "$TOP"
158
158
  fi
159
159
  fi
160
160
 
package/bin/bash/wipe.sh CHANGED
@@ -87,7 +87,7 @@ function execute {
87
87
  return 0
88
88
  }
89
89
 
90
- HOME=$PWD
90
+ TOP=$PWD
91
91
 
92
92
  echo
93
93
  echo -e "\033[0;32mStarting \`deps-wipe\` ...\033[0m" # "Starting ..."
@@ -155,7 +155,7 @@ else
155
155
  done
156
156
  fi
157
157
 
158
- cd "$HOME"
158
+ cd "$TOP"
159
159
  fi
160
160
  fi
161
161
 
package/bin/bash/z.sh CHANGED
@@ -5,10 +5,10 @@ cd "$HOME"
5
5
  if [ -f .zshrc ];
6
6
  then
7
7
  source .zshrc
8
-
9
- export ZSH_AUTH_SOCK=$ZSH_AUTH_SOCK
10
- export PATH=$PATH
11
- export HOME=$HOME
12
8
  fi
13
9
 
14
- cd "$CWD"
10
+ export ZSH_AUTH_SOCK=$ZSH_AUTH_SOCK
11
+ export PATH=$PATH
12
+ export HOME=$HOME
13
+
14
+ exit 0
@@ -14,6 +14,7 @@ import {
14
14
 
15
15
  import {
16
16
  resolve,
17
+ join,
17
18
  relative,
18
19
  normalize
19
20
  } from 'node:path'
@@ -136,11 +137,11 @@ const handlePackageError = ({ message = MESSAGE } = {}) => { log(`Package error:
136
137
 
137
138
  const handleConfigurationError = ({ message = MESSAGE } = {}) => { log(`Configuration error: "${message}"`) }
138
139
 
139
- const getPackageJsonPath = (directory = DIRECTORY) => resolve(directory, 'package.json')
140
+ const getPackageJsonPath = (directory = DIRECTORY) => resolve(join(directory, 'package.json'))
140
141
 
141
- const getDepsRcPath = (directory = DIRECTORY) => resolve(directory, '.depsrc')
142
+ const getDepsRcPath = (directory = DIRECTORY) => resolve(join(directory, '.depsrc'))
142
143
 
143
- const getDepsRcJsonPath = (directory = DIRECTORY) => resolve(directory, '.depsrc.json')
144
+ const getDepsRcJsonPath = (directory = DIRECTORY) => resolve(join(directory, '.depsrc.json'))
144
145
 
145
146
  async function getPackageJson (directory = DIRECTORY) {
146
147
  log('getPackageJson')
package/bin/deps/deps.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  } from 'node:child_process'
10
10
 
11
11
  import {
12
- resolve
12
+ join
13
13
  } from 'node:path'
14
14
 
15
15
  import {
@@ -36,8 +36,8 @@ debug.enable(DEBUG)
36
36
 
37
37
  const command = (
38
38
  PLATFORM === 'win32'
39
- ? `bash "${resolve(PATH, '.\\bin\\bash\\deps.sh')}"`
40
- : `bash '${resolve(PATH, './bin/bash/deps.sh')}'`
39
+ ? `bash "${join(PATH, '.\\bin\\bash\\deps.sh')}"`
40
+ : `bash '${join(PATH, './bin/bash/deps.sh')}'`
41
41
  )
42
42
 
43
43
  const args = getArgs()
package/bin/deps/head.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  } from 'node:child_process'
10
10
 
11
11
  import {
12
- resolve
12
+ join
13
13
  } from 'node:path'
14
14
 
15
15
  import {
@@ -36,8 +36,8 @@ debug.enable(DEBUG)
36
36
 
37
37
  const command = (
38
38
  PLATFORM === 'win32'
39
- ? `bash "${resolve(PATH, '.\\bin\\bash\\head.sh')}"`
40
- : `bash '${resolve(PATH, './bin/bash/head.sh')}'`
39
+ ? `bash "${join(PATH, '.\\bin\\bash\\head.sh')}"`
40
+ : `bash '${join(PATH, './bin/bash/head.sh')}'`
41
41
  )
42
42
 
43
43
  const args = getArgs()
package/bin/deps/push.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  } from 'node:child_process'
10
10
 
11
11
  import {
12
- resolve
12
+ join
13
13
  } from 'node:path'
14
14
 
15
15
  import {
@@ -36,8 +36,8 @@ debug.enable(DEBUG)
36
36
 
37
37
  const command = (
38
38
  PLATFORM === 'win32'
39
- ? `bash "${resolve(PATH, '.\\bin\\bash\\push.sh')}"`
40
- : `bash '${resolve(PATH, './bin/bash/push.sh')}'`
39
+ ? `bash "${join(PATH, '.\\bin\\bash\\push.sh')}"`
40
+ : `bash '${join(PATH, './bin/bash/push.sh')}'`
41
41
  )
42
42
 
43
43
  const args = getArgs()
package/bin/deps/wipe.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  } from 'node:child_process'
10
10
 
11
11
  import {
12
- resolve
12
+ join
13
13
  } from 'node:path'
14
14
 
15
15
  import {
@@ -36,8 +36,8 @@ debug.enable(DEBUG)
36
36
 
37
37
  const command = (
38
38
  PLATFORM === 'win32'
39
- ? `bash "${resolve(PATH, '.\\bin\\bash\\wipe.sh')}"`
40
- : `bash '${resolve(PATH, './bin/bash/wipe.sh')}'`
39
+ ? `bash "${join(PATH, '.\\bin\\bash\\wipe.sh')}"`
40
+ : `bash '${join(PATH, './bin/bash/wipe.sh')}'`
41
41
  )
42
42
 
43
43
  const args = getArgs()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.1.27",
3
+ "version": "2.1.29",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -14,14 +14,6 @@ import {
14
14
  platform
15
15
  } from 'node:os'
16
16
 
17
- const {
18
- env: {
19
- HOME
20
- }
21
- } = process
22
-
23
- const BASH = join(PATH, 'bin/bash')
24
-
25
17
  const {
26
18
  name: NAME,
27
19
  version: VERSION
@@ -29,14 +21,24 @@ const {
29
21
 
30
22
  const PLATFORM = platform()
31
23
 
24
+ const {
25
+ env: {
26
+ HOME
27
+ }
28
+ } = process
29
+
30
+ const BASH = PLATFORM === 'win32'
31
+ ? join(PATH, '.\\bin\\bash')
32
+ : join(PATH, './bin/bash')
33
+
32
34
  const log = debug('@modernpoacher/deps')
33
35
 
34
36
  log(`\`common/env\` (${NAME} - ${VERSION} - ${PLATFORM}) is awake`)
35
37
 
36
38
  export {
37
- HOME,
38
- BASH,
39
39
  NAME,
40
40
  VERSION,
41
- PLATFORM
41
+ PLATFORM,
42
+ HOME,
43
+ BASH
42
44
  }