@modernpoacher/deps 2.2.9 → 2.2.11

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 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.2.9",
3
+ "version": "2.2.11",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "commander": "^13.0.0",
57
57
  "debug": "^4.4.0",
58
- "glob": "^11.0.0",
58
+ "glob": "^11.0.1",
59
59
  "strip-ansi": "^7.1.0",
60
60
  "supports-color": "^10.0.0"
61
61
  },
@@ -65,7 +65,7 @@
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.39.0",
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",
package/src/index.mjs CHANGED
@@ -83,13 +83,12 @@ export function use (key) {
83
83
  export function getInstallSaveExactCommands (deps, r, f) {
84
84
  log('getInstallSaveExactCommands')
85
85
 
86
- const c = transform(deps)
87
- const commands = `npm i ${c}`
86
+ const commands = getRegistryParameter(r, getForceParameter(f, getSaveExactParameter(`npm i ${transform(deps)}`)))
88
87
 
89
88
  info(commands)
90
89
 
91
- return normalizeCommands(
92
- getRegistryParameter(r, getForceParameter(f, getSaveExactParameter(commands)))
90
+ return (
91
+ normalizeCommands(commands)
93
92
  )
94
93
  }
95
94
 
@@ -107,13 +106,12 @@ export function getInstallSaveExactCommands (deps, r, f) {
107
106
  export function getInstallCommands (deps, r, f) {
108
107
  log('getInstallCommands')
109
108
 
110
- const c = transform(deps)
111
- const commands = `npm i ${c}`
109
+ const commands = getRegistryParameter(r, getForceParameter(f, `npm i ${transform(deps)}`))
112
110
 
113
111
  info(commands)
114
112
 
115
- return normalizeCommands(
116
- getRegistryParameter(r, getForceParameter(f, commands))
113
+ return (
114
+ normalizeCommands(commands)
117
115
  )
118
116
  }
119
117
 
@@ -131,10 +129,10 @@ export function getInstallCommands (deps, r, f) {
131
129
  export function getInstallSaveBundleSaveExactCommands (deps, r, f) {
132
130
  log('getInstallSaveBundleSaveExactCommands')
133
131
 
134
- const commands = getInstallSaveExactCommands(deps, r, f)
132
+ const commands = getSaveBundleParameter(getInstallSaveExactCommands(deps, r, f))
135
133
 
136
- return normalizeCommands(
137
- getSaveBundleParameter(commands)
134
+ return (
135
+ normalizeCommands(commands)
138
136
  )
139
137
  }
140
138
 
@@ -152,10 +150,10 @@ export function getInstallSaveBundleSaveExactCommands (deps, r, f) {
152
150
  export function getInstallSaveBundleCommands (deps, r, f) {
153
151
  log('getInstallSaveBundleCommands')
154
152
 
155
- const commands = getInstallCommands(deps, r, f)
153
+ const commands = getSaveBundleParameter(getInstallCommands(deps, r, f))
156
154
 
157
- return normalizeCommands(
158
- getSaveBundleParameter(commands)
155
+ return (
156
+ normalizeCommands(commands)
159
157
  )
160
158
  }
161
159
 
@@ -173,10 +171,10 @@ export function getInstallSaveBundleCommands (deps, r, f) {
173
171
  export function getInstallSaveOptionalSaveExactCommands (deps, r, f) {
174
172
  log('getInstallSaveOptionalSaveExactCommands')
175
173
 
176
- const commands = getInstallSaveExactCommands(deps, r, f)
174
+ const commands = getSaveOptionalParameter(getInstallSaveExactCommands(deps, r, f))
177
175
 
178
- return normalizeCommands(
179
- getSaveOptionalParameter(commands)
176
+ return (
177
+ normalizeCommands(commands)
180
178
  )
181
179
  }
182
180
 
@@ -194,10 +192,10 @@ export function getInstallSaveOptionalSaveExactCommands (deps, r, f) {
194
192
  export function getInstallSaveOptionalCommands (deps, r, f) {
195
193
  log('getInstallSaveOptionalCommands')
196
194
 
197
- const commands = getInstallCommands(deps, r, f)
195
+ const commands = getSaveOptionalParameter(getInstallCommands(deps, r, f))
198
196
 
199
- return normalizeCommands(
200
- getSaveOptionalParameter(commands)
197
+ return (
198
+ normalizeCommands(commands)
201
199
  )
202
200
  }
203
201
 
@@ -215,10 +213,10 @@ export function getInstallSaveOptionalCommands (deps, r, f) {
215
213
  export function getInstallSaveDevSaveExactCommands (deps, r, f) {
216
214
  log('getInstallSaveDevSaveExactCommands')
217
215
 
218
- const commands = getInstallSaveExactCommands(deps, r, f)
216
+ const commands = getSaveDevParameter(getInstallSaveExactCommands(deps, r, f))
219
217
 
220
- return normalizeCommands(
221
- getSaveDevParameter(commands)
218
+ return (
219
+ normalizeCommands(commands)
222
220
  )
223
221
  }
224
222
 
@@ -236,10 +234,10 @@ export function getInstallSaveDevSaveExactCommands (deps, r, f) {
236
234
  export function getInstallSaveDevCommands (deps, r, f) {
237
235
  log('getInstallSaveDevCommands')
238
236
 
239
- const commands = getInstallCommands(deps, r, f)
237
+ const commands = getSaveDevParameter(getInstallCommands(deps, r, f))
240
238
 
241
- return normalizeCommands(
242
- getSaveDevParameter(commands)
239
+ return (
240
+ normalizeCommands(commands)
243
241
  )
244
242
  }
245
243
 
@@ -257,10 +255,10 @@ export function getInstallSaveDevCommands (deps, r, f) {
257
255
  export function getInstallSaveProdSaveExactCommands (deps, r, f) {
258
256
  log('getInstallSaveProdSaveExactCommands')
259
257
 
260
- const commands = getInstallSaveExactCommands(deps, r, f)
258
+ const commands = getSaveProdParameter(getInstallSaveExactCommands(deps, r, f))
261
259
 
262
- return normalizeCommands(
263
- getSaveProdParameter(commands)
260
+ return (
261
+ normalizeCommands(commands)
264
262
  )
265
263
  }
266
264
 
@@ -278,10 +276,10 @@ export function getInstallSaveProdSaveExactCommands (deps, r, f) {
278
276
  export function getInstallSaveProdCommands (deps, r, f) {
279
277
  log('getInstallSaveProdCommands')
280
278
 
281
- const commands = getInstallCommands(deps, r, f)
279
+ const commands = getSaveProdParameter(getInstallCommands(deps, r, f))
282
280
 
283
- return normalizeCommands(
284
- getSaveProdParameter(commands)
281
+ return (
282
+ normalizeCommands(commands)
285
283
  )
286
284
  }
287
285
 
@@ -60,11 +60,10 @@ log(`\`install\` (${VERSION} - ${PLATFORM}) is awake`)
60
60
  export function getInstallSaveExactCommands (p, s, r, f) {
61
61
  log('getInstallSaveExactCommands')
62
62
 
63
- const c = transform(p)
64
- const commands = `npm i ${c}`
63
+ const commands = getNoSaveParameter(s, getRegistryParameter(r, getForceParameter(f, getSaveExactParameter(`npm i ${transform(p)}`))))
65
64
 
66
- return normalizeCommands(
67
- getNoSaveParameter(s, getRegistryParameter(r, getForceParameter(f, getSaveExactParameter(commands))))
65
+ return (
66
+ normalizeCommands(commands)
68
67
  )
69
68
  }
70
69
 
@@ -83,11 +82,10 @@ export function getInstallSaveExactCommands (p, s, r, f) {
83
82
  export function getInstallCommands (p, s, r, f) {
84
83
  log('getInstallCommands')
85
84
 
86
- const c = transform(p)
87
- const commands = `npm i ${c}`
85
+ const commands = getNoSaveParameter(s, getRegistryParameter(r, getForceParameter(f, `npm i ${transform(p)}`)))
88
86
 
89
- return normalizeCommands(
90
- getNoSaveParameter(s, getRegistryParameter(r, getForceParameter(f, commands)))
87
+ return (
88
+ normalizeCommands(commands)
91
89
  )
92
90
  }
93
91