@modernpoacher/deps 2.2.8 → 2.2.10
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/wipe.sh +5 -1
- package/bin/common/index.mjs +11 -7
- package/package.json +6 -6
package/bin/bash/wipe.sh
CHANGED
|
@@ -16,6 +16,10 @@ source_home "$BIN"
|
|
|
16
16
|
|
|
17
17
|
EXP="[-0-9a-zA-Z]*$"
|
|
18
18
|
|
|
19
|
+
function has_git {
|
|
20
|
+
[ ! -z $(git status 2> /dev/null) ]
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
function report {
|
|
20
24
|
local directory_name
|
|
21
25
|
|
|
@@ -37,7 +41,7 @@ function checkout_default_branch {
|
|
|
37
41
|
|
|
38
42
|
if [ -z "$default_branch" ]
|
|
39
43
|
then
|
|
40
|
-
default_branch=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
|
|
44
|
+
default_branch=$(git remote show origin 2> /dev/null | awk '/HEAD branch/ {print $NF}')
|
|
41
45
|
|
|
42
46
|
if [ -z "$default_branch" ]
|
|
43
47
|
then
|
package/bin/common/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
resolve,
|
|
17
17
|
join,
|
|
18
|
-
relative,
|
|
18
|
+
// relative,
|
|
19
19
|
normalize
|
|
20
20
|
} from 'node:path'
|
|
21
21
|
|
|
@@ -63,7 +63,7 @@ export const tidy = (v) => v.replace(/\n{2,}}/gm, String.fromCharCode(10)).trim(
|
|
|
63
63
|
|
|
64
64
|
export const trim = (v) => v.split(String.fromCharCode(10)).map((v) => v.trimEnd()).join(String.fromCharCode(10)).trim()
|
|
65
65
|
|
|
66
|
-
const toRelativePath = (to) => relative(process.cwd(), to) // const toRelativePath = relative.bind(null, process.cwd())
|
|
66
|
+
// const toRelativePath = (to) => relative(process.cwd(), to) // const toRelativePath = relative.bind(null, process.cwd())
|
|
67
67
|
|
|
68
68
|
const getRmrfCommands = PLATFORM === 'win32'
|
|
69
69
|
? () => tidy(`
|
|
@@ -170,13 +170,15 @@ async function getDepsRcJson (directory = DIRECTORY) {
|
|
|
170
170
|
async function hasPackage (directory = DIRECTORY) {
|
|
171
171
|
log('hasPackage')
|
|
172
172
|
|
|
173
|
+
log(`Directory is "${directory}"`)
|
|
174
|
+
|
|
173
175
|
try {
|
|
174
176
|
await access(getPackageJsonPath(directory), constants.R_OK)
|
|
175
177
|
|
|
176
|
-
log(
|
|
178
|
+
log('Package at "package.json"')
|
|
177
179
|
return true
|
|
178
180
|
} catch {
|
|
179
|
-
log(
|
|
181
|
+
log('No package at "package.json"')
|
|
180
182
|
return false
|
|
181
183
|
}
|
|
182
184
|
}
|
|
@@ -194,10 +196,12 @@ async function getPackage (directory = DIRECTORY) {
|
|
|
194
196
|
async function hasConfiguration (directory = DIRECTORY) {
|
|
195
197
|
log('hasConfiguration')
|
|
196
198
|
|
|
199
|
+
log(`Directory is "${directory}"`)
|
|
200
|
+
|
|
197
201
|
try {
|
|
198
202
|
await access(getDepsRcPath(directory), constants.R_OK)
|
|
199
203
|
|
|
200
|
-
log(
|
|
204
|
+
log('Configuration at ".depsrc"')
|
|
201
205
|
return true
|
|
202
206
|
} catch (e) {
|
|
203
207
|
const {
|
|
@@ -210,7 +214,7 @@ async function hasConfiguration (directory = DIRECTORY) {
|
|
|
210
214
|
try {
|
|
211
215
|
await access(getDepsRcJsonPath(directory), constants.R_OK)
|
|
212
216
|
|
|
213
|
-
log(
|
|
217
|
+
log('Configuration at ".depsrc.json"')
|
|
214
218
|
return true
|
|
215
219
|
} catch (e) {
|
|
216
220
|
const {
|
|
@@ -224,7 +228,7 @@ async function hasConfiguration (directory = DIRECTORY) {
|
|
|
224
228
|
}
|
|
225
229
|
}
|
|
226
230
|
|
|
227
|
-
log(
|
|
231
|
+
log('No configuration at ".depsrc" nor ".depsrc.json"') // at "${toRelativePath(getDepsRcPath(directory))}" or "${toRelativePath(getDepsRcJsonPath(directory))}"`)
|
|
228
232
|
return false
|
|
229
233
|
}
|
|
230
234
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modernpoacher/deps",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.10",
|
|
4
4
|
"description": "Update NPM package dependencies from the command line",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deps",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"deps-wipe": "bin/deps/wipe.sh"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"commander": "^
|
|
57
|
-
"debug": "^4.
|
|
56
|
+
"commander": "^13.0.0",
|
|
57
|
+
"debug": "^4.4.0",
|
|
58
58
|
"glob": "^11.0.0",
|
|
59
59
|
"strip-ansi": "^7.1.0",
|
|
60
|
-
"supports-color": "^
|
|
60
|
+
"supports-color": "^10.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@babel/core": "^7.26.0",
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
"@babel/preset-env": "^7.26.0",
|
|
66
66
|
"@babel/register": "^7.25.9",
|
|
67
67
|
"chai": "^5.1.2",
|
|
68
|
-
"core-js": "^3.
|
|
68
|
+
"core-js": "^3.40.0",
|
|
69
69
|
"cross-env": "^7.0.3",
|
|
70
70
|
"eslint": "8.57.1",
|
|
71
71
|
"eslint-config-standard": "^17.1.0",
|
|
72
72
|
"husky": "^9.1.7",
|
|
73
|
-
"mocha": "^
|
|
73
|
+
"mocha": "^11.0.1"
|
|
74
74
|
},
|
|
75
75
|
"imports": {
|
|
76
76
|
"#deps/bin": "./bin/index.mjs",
|