@modernpoacher/deps 2.1.28 → 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.
@@ -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.28",
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
  }