@modernpoacher/deps 2.1.28 → 2.1.30
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/common/index.mjs +4 -3
- package/bin/deps/deps.mjs +3 -3
- package/bin/deps/head.mjs +3 -3
- package/bin/deps/push.mjs +3 -3
- package/bin/deps/wipe.mjs +3 -3
- package/package.json +2 -2
- package/src/common/env/index.mjs +13 -11
- package/src/common/git/index.mjs +4 -4
package/bin/common/index.mjs
CHANGED
|
@@ -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
|
-
|
|
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 "${
|
|
40
|
-
: `bash '${
|
|
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
|
-
|
|
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 "${
|
|
40
|
-
: `bash '${
|
|
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
|
-
|
|
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 "${
|
|
40
|
-
: `bash '${
|
|
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
|
-
|
|
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 "${
|
|
40
|
-
: `bash '${
|
|
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.
|
|
3
|
+
"version": "2.1.30",
|
|
4
4
|
"description": "Update NPM package dependencies from the command line",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deps",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"cross-env": "^7.0.3",
|
|
70
70
|
"eslint": "8.57.1",
|
|
71
71
|
"eslint-config-standard": "^17.1.0",
|
|
72
|
-
"husky": "^9.1.
|
|
72
|
+
"husky": "^9.1.7",
|
|
73
73
|
"mocha": "^10.8.2"
|
|
74
74
|
},
|
|
75
75
|
"imports": {
|
package/src/common/env/index.mjs
CHANGED
|
@@ -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
|
}
|
package/src/common/git/index.mjs
CHANGED
|
@@ -253,13 +253,13 @@ export function awkGitRemoteShowOriginHead (d = DIRECTORY) {
|
|
|
253
253
|
|
|
254
254
|
return (
|
|
255
255
|
new Promise((resolve, reject) => {
|
|
256
|
-
const
|
|
256
|
+
const commands = 'git remote show origin | awk \'/HEAD branch/ {print $NF}\''
|
|
257
257
|
const options = getOptions(directory)
|
|
258
258
|
|
|
259
259
|
const {
|
|
260
260
|
stdout,
|
|
261
261
|
stderr
|
|
262
|
-
} = exec(
|
|
262
|
+
} = exec(commands, options, (e, v = '') => {
|
|
263
263
|
(!e)
|
|
264
264
|
? resolve(trim(v))
|
|
265
265
|
: reject(e)
|
|
@@ -321,13 +321,13 @@ export function gitRevParseAbbrevRefHead (d = DIRECTORY) {
|
|
|
321
321
|
|
|
322
322
|
return (
|
|
323
323
|
new Promise((resolve, reject) => {
|
|
324
|
-
const
|
|
324
|
+
const commands = 'git rev-parse --abbrev-ref HEAD'
|
|
325
325
|
const options = getOptions(directory)
|
|
326
326
|
|
|
327
327
|
const {
|
|
328
328
|
stdout,
|
|
329
329
|
stderr
|
|
330
|
-
} = exec(
|
|
330
|
+
} = exec(commands, options, (e, v = '') => {
|
|
331
331
|
(!e)
|
|
332
332
|
? resolve(trim(v))
|
|
333
333
|
: reject(e)
|