@modernpoacher/deps 2.1.5 → 2.1.8

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.
@@ -95,23 +95,28 @@ export function use (key) {
95
95
  const log = debug(`@modernpoacher/deps:${key}`)
96
96
 
97
97
  return function use (v) {
98
- const s = v.trim()
99
-
100
- if (s !== '') log(trim(s))
98
+ if (v.includes('\n')) v.split('\n').map((s) => trim(s)).filter(Boolean).forEach((s) => log(s))
99
+ else {
100
+ const s = v.trim()
101
+ if (s !== '') log(trim(s))
102
+ }
101
103
  }
102
104
  }
103
105
 
104
106
  export function handleError (e = {}) {
105
107
  const {
106
- code = CODE,
107
- message = MESSAGE
108
+ code = CODE
108
109
  } = e
109
110
 
110
111
  if (code > 1) error(code)
112
+ const {
113
+ message = MESSAGE
114
+ } = e
115
+
111
116
  error(message)
112
117
  }
113
118
 
114
- export function handleComplete (e) {
119
+ export function handleComplete (e = null) {
115
120
  if (!e) return log('👍')
116
121
  error('👎')
117
122
  }
@@ -67,15 +67,7 @@ function handleCommandError (e) {
67
67
  code = 0
68
68
  } = e
69
69
 
70
- if (code !== 128) {
71
- const {
72
- message
73
- } = e
74
-
75
- const log = debug('@modernpoacher/deps:error')
76
- if (code > 1) log(code)
77
- log(message)
78
- }
70
+ if (code !== 128) handleError(e)
79
71
  }
80
72
 
81
73
  async function getDefaultBranch (directory) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.1.5",
3
+ "version": "2.1.8",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",