@modernpoacher/deps 2.3.4 → 2.3.6

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.
@@ -277,7 +277,7 @@ function toExcludePatterns (directory) {
277
277
  async function * genDirectory (directory) {
278
278
  log('genDirectory')
279
279
 
280
- for await (const packageJson of await glob(toPackagePatterns(directory), { exclude: toExcludePatterns (directory) })) yield dirname(packageJson)
280
+ for await (const p of glob(toPackagePatterns(directory), { exclude: toExcludePatterns (directory) })) yield dirname(p)
281
281
  }
282
282
 
283
283
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.3.4",
3
+ "version": "2.3.6",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -40,8 +40,8 @@ export function formatAuthor (name, email) {
40
40
  export const formatDirectory = PLATFORM === 'win32'
41
41
  ? (directory) => resolve(normalize(directory.trim()))
42
42
  : (directory) => {
43
- const d = resolve(normalize(directory.trim()))
44
- if (d.startsWith(HOME)) return d.replace(new RegExp('^' + HOME), '~')
43
+ const d = directory.trim()
44
+ if (d.startsWith(HOME)) return resolve(normalize(d.replace(new RegExp('^' + HOME), '~')))
45
45
  return d
46
46
  }
47
47
 
@@ -110,9 +110,8 @@ export function use (key) {
110
110
  function write (v) {
111
111
  const s = v.trim()
112
112
  if (s) {
113
- const d = resolve(normalize(s))
114
- if (d.startsWith(HOME)) {
115
- log(d.replace(new RegExp('^' + HOME), '~'))
113
+ if (s.startsWith(HOME)) {
114
+ log(resolve(normalize(s.replace(new RegExp('^' + HOME), '~'))))
116
115
  } else {
117
116
  log(v.trimEnd())
118
117
  }
@@ -134,9 +134,8 @@ export function out (key, directory) {
134
134
  function write (v) {
135
135
  const s = v.trim()
136
136
  if (s) {
137
- const d = resolve(normalize(s))
138
- if (d.startsWith(HOME)) {
139
- log(d.replace(new RegExp('^' + HOME), '~'))
137
+ if (s.startsWith(HOME)) {
138
+ log(resolve(normalize(s.replace(new RegExp('^' + HOME), '~'))))
140
139
  } else {
141
140
  log(v.trimEnd())
142
141
  }
@@ -183,9 +182,8 @@ export function err (key, directory) {
183
182
  function write (v) {
184
183
  const s = v.trim()
185
184
  if (s) {
186
- const d = resolve(normalize(s))
187
- if (d.startsWith(HOME)) {
188
- log(d.replace(new RegExp('^' + HOME), '~'))
185
+ if (s.startsWith(HOME)) {
186
+ log(resolve(normalize(s.replace(new RegExp('^' + HOME), '~'))))
189
187
  } else {
190
188
  log(v.trimEnd())
191
189
  }