@modernpoacher/deps 2.3.1 → 2.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -71,7 +71,7 @@
71
71
  "chai": "^6.2.2",
72
72
  "cross-env": "^10.1.0",
73
73
  "eslint": "9.38.0",
74
- "eslint-plugin-jsdoc": "^63.0.13",
74
+ "eslint-plugin-jsdoc": "^63.2.0",
75
75
  "globals": "^17.7.0",
76
76
  "husky": "^9.1.7",
77
77
  "mocha": "^11.7.6"
@@ -38,9 +38,9 @@ export function formatAuthor (name, email) {
38
38
  * @type {(directory: string) => string}
39
39
  */
40
40
  export const formatDirectory = PLATFORM === 'win32'
41
- ? (directory) => resolve(normalize(directory)).trim()
41
+ ? (directory) => resolve(normalize(directory.trim()))
42
42
  : (directory) => {
43
- const d = resolve(normalize(directory)).trim()
43
+ const d = resolve(normalize(directory.trim()))
44
44
  if (d.startsWith(HOME)) return d.replace(new RegExp('^' + HOME), '~')
45
45
  return d
46
46
  }
@@ -108,7 +108,7 @@ export function use (key) {
108
108
  * @returns {void}
109
109
  */
110
110
  function write (v) {
111
- if (v.trim()) log(v.trimEnd())
111
+ if (v.trim()) log(formatDirectory(v.trimEnd()))
112
112
  }
113
113
 
114
114
  /**
@@ -131,7 +131,7 @@ export function out (key, directory) {
131
131
  * @returns {void}
132
132
  */
133
133
  function write (v) {
134
- if (v.trim()) log(v.trimEnd())
134
+ if (v.trim()) log(formatDirectory(v.trimEnd()))
135
135
  }
136
136
 
137
137
  return function out (value) {
@@ -168,7 +168,7 @@ export function err (key, directory) {
168
168
  * @returns {void}
169
169
  */
170
170
  function write (v) {
171
- if (v.trim()) log(v.trimEnd())
171
+ if (v.trim()) log(formatDirectory(v.trimEnd()))
172
172
  }
173
173
 
174
174
  return function err (value) {
@@ -182,8 +182,8 @@ export function err (key, directory) {
182
182
  * @function getErrorCode
183
183
  * @description
184
184
  * Get an error code from an error
185
- * @param {{code?: number, message?: string}} e
186
- * @returns {number}
185
+ * @param {{code?: string | number, message?: string}} e
186
+ * @returns {string | number}
187
187
  */
188
188
  const getErrorCode = ({ code = 0 }) => code
189
189
 
@@ -191,7 +191,7 @@ const getErrorCode = ({ code = 0 }) => code
191
191
  * @function getErrorMessage
192
192
  * @description
193
193
  * Get an error message from an error
194
- * @param {{code?: number, message?: string}} e
194
+ * @param {{code?: string | number, message?: string}} e
195
195
  * @returns {string}
196
196
  */
197
197
  const getErrorMessage = ({ message = '' }) => message
@@ -200,7 +200,7 @@ const getErrorMessage = ({ message = '' }) => message
200
200
  * @function isCommandError
201
201
  * @description
202
202
  * Determine whether an error is a safe non-zero exit from a Git command
203
- * @param {{code?: number, message?: string}} e
203
+ * @param {{code?: string | number, message?: string}} e
204
204
  * @returns {boolean}
205
205
  */
206
206
  function isCommandError (e) {
package/tsconfig.json CHANGED
@@ -5,7 +5,10 @@
5
5
  "allowJs": true,
6
6
  "checkJs": true,
7
7
  "noEmit": true,
8
- "strict": true
8
+ "strict": true,
9
+ "types": [
10
+ "node"
11
+ ]
9
12
  },
10
13
  "include": [
11
14
  "."
@@ -15,8 +18,5 @@
15
18
  ".github",
16
19
  ".husky",
17
20
  "test"
18
- ],
19
- "types": [
20
- "node"
21
21
  ]
22
22
  }