@modernpoacher/deps 2.2.31 → 2.2.32
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/deps.sh +0 -7
- package/bin/bash/head.sh +0 -7
- package/bin/bash/push.sh +0 -7
- package/bin/bash/wipe.sh +0 -7
- package/bin/common/index.mjs +55 -7
- package/bin/deps/deps.sh +0 -7
- package/bin/deps/execute.sh +0 -7
- package/bin/deps/head.sh +0 -7
- package/bin/deps/install.sh +0 -7
- package/bin/deps/push.sh +0 -7
- package/bin/deps/wipe.sh +0 -7
- package/bin/deps.sh +0 -7
- package/bin/node/deps.mjs +2 -3
- package/bin/node/head.mjs +1 -4
- package/bin/node/push.mjs +1 -4
- package/bin/node/wipe.mjs +1 -4
- package/package.json +3 -3
- package/src/common/git/index.mjs +48 -7
- package/src/common/index.mjs +25 -4
- package/src/index.mjs +38 -4
package/bin/bash/deps.sh
CHANGED
package/bin/bash/head.sh
CHANGED
package/bin/bash/push.sh
CHANGED
package/bin/bash/wipe.sh
CHANGED
package/bin/common/index.mjs
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* @returns {void}
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
import stripAnsi from 'strip-ansi'
|
|
20
|
+
|
|
19
21
|
import {
|
|
20
22
|
argv
|
|
21
23
|
} from 'node:process'
|
|
@@ -41,11 +43,6 @@ import {
|
|
|
41
43
|
|
|
42
44
|
import debug from '#deps/src/common/debug'
|
|
43
45
|
|
|
44
|
-
import {
|
|
45
|
-
use,
|
|
46
|
-
tidy
|
|
47
|
-
} from '#deps/src/common/format'
|
|
48
|
-
|
|
49
46
|
import {
|
|
50
47
|
VERSION,
|
|
51
48
|
PLATFORM,
|
|
@@ -79,14 +76,31 @@ const CODE = 0
|
|
|
79
76
|
|
|
80
77
|
const MESSAGE = 'Either no error message has been defined or no error has been supplied'
|
|
81
78
|
|
|
79
|
+
const LF = String.fromCodePoint(10)
|
|
82
80
|
const SP = String.fromCodePoint(32)
|
|
83
81
|
|
|
84
82
|
/**
|
|
85
83
|
* @param {string} v
|
|
86
84
|
* @returns {string}
|
|
87
85
|
*/
|
|
88
|
-
export {
|
|
89
|
-
|
|
86
|
+
export function trim (v) {
|
|
87
|
+
return v.split(LF).map(trimEnd).join(LF).trim()
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @param {string} v
|
|
92
|
+
* @returns {string}
|
|
93
|
+
*/
|
|
94
|
+
export function trimEnd (v) {
|
|
95
|
+
return v.trimEnd()
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @param {string} v
|
|
100
|
+
* @returns {string}
|
|
101
|
+
*/
|
|
102
|
+
export function tidy (v) {
|
|
103
|
+
return v.replace(/\n{2,}}/gm, LF).trim()
|
|
90
104
|
}
|
|
91
105
|
|
|
92
106
|
const getRmrfCommands = PLATFORM === 'win32'
|
|
@@ -141,6 +155,40 @@ export const ARGS = PLATFORM === 'win32'
|
|
|
141
155
|
? ARGV.map(toDouble).join(SP)
|
|
142
156
|
: ARGV.map(toSingle).join(SP)
|
|
143
157
|
|
|
158
|
+
/**
|
|
159
|
+
* @param {string} v
|
|
160
|
+
* @returns {boolean}
|
|
161
|
+
*/
|
|
162
|
+
function filter (v) {
|
|
163
|
+
return Boolean(stripAnsi(v).trim())
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @param {string} key
|
|
168
|
+
* @returns {(value: string) => void}
|
|
169
|
+
*/
|
|
170
|
+
export function use (key) {
|
|
171
|
+
const log = debug(`@modernpoacher/deps:${key}`)
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @param {string} v
|
|
175
|
+
* @returns {void}
|
|
176
|
+
*/
|
|
177
|
+
function write (v) {
|
|
178
|
+
log(v.trimEnd())
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @param {string} value
|
|
183
|
+
* @returns {void}
|
|
184
|
+
*/
|
|
185
|
+
return function use (value) {
|
|
186
|
+
value.split(LF)
|
|
187
|
+
.filter(filter)
|
|
188
|
+
.forEach(write)
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
144
192
|
/**
|
|
145
193
|
* @param {{ code?: number, message?: string }} [e]
|
|
146
194
|
*/
|
package/bin/deps/deps.sh
CHANGED
package/bin/deps/execute.sh
CHANGED
package/bin/deps/head.sh
CHANGED
package/bin/deps/install.sh
CHANGED
package/bin/deps/push.sh
CHANGED
package/bin/deps/wipe.sh
CHANGED
package/bin/deps.sh
CHANGED
package/bin/node/deps.mjs
CHANGED
|
@@ -6,9 +6,7 @@ import {
|
|
|
6
6
|
|
|
7
7
|
import '#deps/src/common/write'
|
|
8
8
|
|
|
9
|
-
import
|
|
10
|
-
use
|
|
11
|
-
} from '#deps/src/common/format'
|
|
9
|
+
import '#deps/src/common/debug'
|
|
12
10
|
|
|
13
11
|
import {
|
|
14
12
|
getOptions
|
|
@@ -17,6 +15,7 @@ import {
|
|
|
17
15
|
import {
|
|
18
16
|
DEPS,
|
|
19
17
|
ARGS,
|
|
18
|
+
use,
|
|
20
19
|
handleComplete
|
|
21
20
|
} from '#deps/bin/common'
|
|
22
21
|
|
package/bin/node/head.mjs
CHANGED
|
@@ -8,10 +8,6 @@ import '#deps/src/common/write'
|
|
|
8
8
|
|
|
9
9
|
import '#deps/src/common/debug'
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
use
|
|
13
|
-
} from '#deps/src/common/format'
|
|
14
|
-
|
|
15
11
|
import {
|
|
16
12
|
getOptions
|
|
17
13
|
} from '#deps/src/common/options'
|
|
@@ -19,6 +15,7 @@ import {
|
|
|
19
15
|
import {
|
|
20
16
|
HEAD,
|
|
21
17
|
ARGS,
|
|
18
|
+
use,
|
|
22
19
|
handleComplete
|
|
23
20
|
} from '#deps/bin/common'
|
|
24
21
|
|
package/bin/node/push.mjs
CHANGED
|
@@ -8,10 +8,6 @@ import '#deps/src/common/write'
|
|
|
8
8
|
|
|
9
9
|
import '#deps/src/common/debug'
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
use
|
|
13
|
-
} from '#deps/src/common/format'
|
|
14
|
-
|
|
15
11
|
import {
|
|
16
12
|
getOptions
|
|
17
13
|
} from '#deps/src/common/options'
|
|
@@ -19,6 +15,7 @@ import {
|
|
|
19
15
|
import {
|
|
20
16
|
PUSH,
|
|
21
17
|
ARGS,
|
|
18
|
+
use,
|
|
22
19
|
handleComplete
|
|
23
20
|
} from '#deps/bin/common'
|
|
24
21
|
|
package/bin/node/wipe.mjs
CHANGED
|
@@ -8,10 +8,6 @@ import '#deps/src/common/write'
|
|
|
8
8
|
|
|
9
9
|
import '#deps/src/common/debug'
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
use
|
|
13
|
-
} from '#deps/src/common/format'
|
|
14
|
-
|
|
15
11
|
import {
|
|
16
12
|
getOptions
|
|
17
13
|
} from '#deps/src/common/options'
|
|
@@ -19,6 +15,7 @@ import {
|
|
|
19
15
|
import {
|
|
20
16
|
WIPE,
|
|
21
17
|
ARGS,
|
|
18
|
+
use,
|
|
22
19
|
handleComplete
|
|
23
20
|
} from '#deps/bin/common'
|
|
24
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modernpoacher/deps",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.32",
|
|
4
4
|
"description": "Update NPM package dependencies from the command line",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deps",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"deps-wipe": "bin/deps/wipe.sh"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@sequencemedia/write": "^0.2.
|
|
57
|
+
"@sequencemedia/write": "^0.2.9",
|
|
58
58
|
"commander": "^14.0.1",
|
|
59
59
|
"debug": "^4.4.3",
|
|
60
60
|
"glob": "^11.0.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@sequencemedia/eslint-config-standard": "^0.2.85",
|
|
66
|
-
"@sequencemedia/eslint-config-typescript": "^0.1.
|
|
66
|
+
"@sequencemedia/eslint-config-typescript": "^0.1.146",
|
|
67
67
|
"@sequencemedia/eslint-merge": "^0.0.52",
|
|
68
68
|
"@types/chai": "^5.2.2",
|
|
69
69
|
"@types/debug": "^4.1.12",
|
package/src/common/git/index.mjs
CHANGED
|
@@ -21,11 +21,6 @@ import {
|
|
|
21
21
|
|
|
22
22
|
import debug from '#deps/src/common/debug'
|
|
23
23
|
|
|
24
|
-
import {
|
|
25
|
-
use,
|
|
26
|
-
trim
|
|
27
|
-
} from '#deps/src/common/format'
|
|
28
|
-
|
|
29
24
|
import {
|
|
30
25
|
BIN,
|
|
31
26
|
VERSION,
|
|
@@ -78,8 +73,28 @@ log(`\`common/git\` (${VERSION} - ${PLATFORM}) is awake`)
|
|
|
78
73
|
|
|
79
74
|
const LF = String.fromCodePoint(10)
|
|
80
75
|
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
/**
|
|
77
|
+
* @param {string} v
|
|
78
|
+
* @returns {string}
|
|
79
|
+
*/
|
|
80
|
+
export function trim (v) {
|
|
81
|
+
return v.split(LF).map(trimEnd).join(LF).trim()
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @param {string} v
|
|
86
|
+
* @returns {string}
|
|
87
|
+
*/
|
|
88
|
+
export function trimEnd (v) {
|
|
89
|
+
return v.trimEnd()
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @param {string} v
|
|
94
|
+
* @returns {string}
|
|
95
|
+
*/
|
|
96
|
+
export function tidy (v) {
|
|
97
|
+
return v.replace(/\n{2,}}/gm, LF).trim()
|
|
83
98
|
}
|
|
84
99
|
|
|
85
100
|
/**
|
|
@@ -108,6 +123,32 @@ function isFatal (v) {
|
|
|
108
123
|
return v.toLowerCase().startsWith('fatal: not a git repository')
|
|
109
124
|
}
|
|
110
125
|
|
|
126
|
+
/**
|
|
127
|
+
* @param {string} key
|
|
128
|
+
* @returns {(value: string) => void}
|
|
129
|
+
*/
|
|
130
|
+
export function use (key) {
|
|
131
|
+
const log = debug(`@modernpoacher/deps:${key}`)
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @param {string} v
|
|
135
|
+
* @returns {void}
|
|
136
|
+
*/
|
|
137
|
+
function write (v) {
|
|
138
|
+
log(v.trimEnd())
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @param {string} value
|
|
143
|
+
* @returns {void}
|
|
144
|
+
*/
|
|
145
|
+
return function use (value) {
|
|
146
|
+
value.split(LF)
|
|
147
|
+
.filter(filter)
|
|
148
|
+
.forEach(write)
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
111
152
|
/**
|
|
112
153
|
* @param {string} key
|
|
113
154
|
* @param {string} directory
|
package/src/common/index.mjs
CHANGED
|
@@ -13,10 +13,6 @@ import PATH from '#where-am-i'
|
|
|
13
13
|
|
|
14
14
|
import debug from '#deps/src/common/debug'
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
tidy
|
|
18
|
-
} from '#deps/src/common/format'
|
|
19
|
-
|
|
20
16
|
import {
|
|
21
17
|
VERSION,
|
|
22
18
|
PLATFORM
|
|
@@ -34,8 +30,33 @@ const log = debug('@modernpoacher/deps')
|
|
|
34
30
|
|
|
35
31
|
log(`\`common\` (${VERSION} - ${PLATFORM}) is awake`)
|
|
36
32
|
|
|
33
|
+
const LF = String.fromCodePoint(10)
|
|
37
34
|
const SP = String.fromCodePoint(32)
|
|
38
35
|
|
|
36
|
+
/**
|
|
37
|
+
* @param {string} v
|
|
38
|
+
* @returns {string}
|
|
39
|
+
*/
|
|
40
|
+
export function trim (v) {
|
|
41
|
+
return v.split(LF).map(trimEnd).join(LF).trim()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @param {string} v
|
|
46
|
+
* @returns {string}
|
|
47
|
+
*/
|
|
48
|
+
export function trimEnd (v) {
|
|
49
|
+
return v.trimEnd()
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @param {string} v
|
|
54
|
+
* @returns {string}
|
|
55
|
+
*/
|
|
56
|
+
export function tidy (v) {
|
|
57
|
+
return v.replace(/\n{2,}}/gm, LF).trim()
|
|
58
|
+
}
|
|
59
|
+
|
|
39
60
|
/**
|
|
40
61
|
* @function getSaveProdParameter
|
|
41
62
|
* @description
|
package/src/index.mjs
CHANGED
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
* @returns {void}
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
import stripAnsi from 'strip-ansi'
|
|
23
|
+
|
|
22
24
|
import {
|
|
23
25
|
normalize
|
|
24
26
|
} from 'node:path'
|
|
@@ -29,10 +31,6 @@ import {
|
|
|
29
31
|
|
|
30
32
|
import debug from '#deps/src/common/debug'
|
|
31
33
|
|
|
32
|
-
import {
|
|
33
|
-
use
|
|
34
|
-
} from '#deps/src/common/format'
|
|
35
|
-
|
|
36
34
|
import {
|
|
37
35
|
VERSION,
|
|
38
36
|
PLATFORM
|
|
@@ -64,6 +62,42 @@ const info = debug('@modernpoacher/deps:info')
|
|
|
64
62
|
|
|
65
63
|
log(`\`deps\` (${VERSION} - ${PLATFORM}) is awake`)
|
|
66
64
|
|
|
65
|
+
const LF = String.fromCodePoint(10)
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @param {string} v
|
|
69
|
+
* @returns {boolean}
|
|
70
|
+
*/
|
|
71
|
+
function filter (v) {
|
|
72
|
+
return Boolean(stripAnsi(v).trim())
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @param {string} key
|
|
77
|
+
* @returns {(value: string) => void}
|
|
78
|
+
*/
|
|
79
|
+
export function use (key) {
|
|
80
|
+
const log = debug(`@modernpoacher/deps:${key}`)
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @param {string} v
|
|
84
|
+
* @returns {void}
|
|
85
|
+
*/
|
|
86
|
+
function write (v) {
|
|
87
|
+
log(v.trimEnd())
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @param {string} value
|
|
92
|
+
* @returns {void}
|
|
93
|
+
*/
|
|
94
|
+
return function use (value) {
|
|
95
|
+
value.split(LF)
|
|
96
|
+
.filter(filter)
|
|
97
|
+
.forEach(write)
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
67
101
|
/**
|
|
68
102
|
* @function getInstallSaveExactCommands
|
|
69
103
|
* @description
|