@modernpoacher/deps 2.0.0-beta.2 → 2.0.1

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/README.md CHANGED
@@ -129,13 +129,3 @@ Again, with the `.depsrc` configuration file as the example above:
129
129
  - If `package.json` defines `gulp` at version `4.0.2` then *Deps* will update to the latest version
130
130
 
131
131
  There is no other behaviour! *Deps* will update to the latest version.
132
-
133
- ### Etc
134
-
135
- *Deps* is written in *ES* and is transpiled to *JS* with Babel.
136
-
137
- *ES* functions can be found in `src`.
138
-
139
- *JS* functions can be found in `lib`.
140
-
141
- To build *Deps*, change into its root directory and at the command line execute `npm i && npm run build`.
@@ -62,25 +62,25 @@ const trim = (v) => v.split('\n').map((v) => v.trim()).join('\n').trim()
62
62
  const toRelativePath = (to) => relative(process.cwd(), to) // const toRelativePath = relative.bind(null, process.cwd())
63
63
 
64
64
  const getRmrfCommands = PLATFORM === 'win32'
65
- ? (directory = DIRECTORY) => tidy(`
65
+ ? () => tidy(`
66
66
  rmdir /s /q node_modules 2> nul & \
67
67
  del package-lock.json 2> nul
68
68
  `)
69
- : (directory = DIRECTORY) => tidy(`
69
+ : () => tidy(`
70
70
  rm -rf node_modules package-lock.json
71
71
  `)
72
72
 
73
73
  const getNpmiCommands = PLATFORM === 'win32'
74
- ? (directory = DIRECTORY, registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'npm i')))
75
- : (directory = DIRECTORY, registry = REGISTRY, force = false) => tidy(`
74
+ ? (registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'npm i')))
75
+ : (registry = REGISTRY, force = false) => tidy(`
76
76
  export PATH=/usr/local/bin:$PATH &> /dev/null
77
77
  . "${NVM}" 2> /dev/null
78
78
  ${getRegistryParameter(registry, getForceParameter(force, 'npm i'))}
79
79
  `)
80
80
 
81
81
  const getDepsCommands = PLATFORM === 'win32'
82
- ? (directory = DIRECTORY, registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'deps')))
83
- : (directory = DIRECTORY, registry = REGISTRY, force = false) => tidy(`
82
+ ? (registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'deps')))
83
+ : (registry = REGISTRY, force = false) => tidy(`
84
84
  export PATH=/usr/local/bin:$PATH &> /dev/null
85
85
  . "${NVM}" 2> /dev/null
86
86
  ${getRegistryParameter(registry, getForceParameter(force, 'deps'))}
@@ -92,11 +92,7 @@ function use (key) {
92
92
  return function use (v) {
93
93
  const s = v.trim()
94
94
 
95
- if (s === '') return
96
-
97
- return (
98
- log(trim(s))
99
- )
95
+ if (s !== '') log(trim(s))
100
96
  }
101
97
  }
102
98
 
@@ -105,15 +101,15 @@ function handleError (e = {}) {
105
101
  code = CODE,
106
102
  message = MESSAGE
107
103
  } = e
104
+
108
105
  const log = debug('@modernpoacher/deps:error')
109
106
  if (code > 1) log(code)
110
107
  log(message)
111
- log(e)
112
108
  }
113
109
 
114
- const handlePackageError = ({ message = MESSAGE } = {}) => log(`Package error: "${message}"`)
110
+ const handlePackageError = ({ message = MESSAGE } = {}) => { log(`Package error: "${message}"`) }
115
111
 
116
- const handleConfigurationError = ({ message = MESSAGE } = {}) => log(`Configuration error: "${message}"`)
112
+ const handleConfigurationError = ({ message = MESSAGE } = {}) => { log(`Configuration error: "${message}"`) }
117
113
 
118
114
  const getPackageJsonPath = (directory = DIRECTORY) => resolve(directory, 'package.json')
119
115
 
@@ -153,7 +149,7 @@ async function hasPackage (directory = DIRECTORY) {
153
149
 
154
150
  log(`Package at "${toRelativePath(getPackageJsonPath(directory))}"`)
155
151
  return true
156
- } catch (e) {
152
+ } catch {
157
153
  log(`No package at "${toRelativePath(getPackageJsonPath(directory))}"`)
158
154
  return false
159
155
  }
@@ -239,17 +235,18 @@ function rmrf (directory = DIRECTORY) {
239
235
 
240
236
  return (
241
237
  new Promise((resolve, reject) => {
242
- const log = use('rmrf')
243
- const commands = getRmrfCommands(directory)
244
-
245
- /**
246
- * log(commands)
247
- */
238
+ const commands = getRmrfCommands()
248
239
 
249
240
  const {
250
241
  stdout,
251
242
  stderr
252
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => (!e) ? resolve(v) : reject(e))
243
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => {
244
+ (!e)
245
+ ? resolve(v)
246
+ : reject(e)
247
+ })
248
+
249
+ const log = use('rmrf')
253
250
 
254
251
  stdout.on('data', log)
255
252
  stderr.on('data', log)
@@ -262,17 +259,18 @@ function npmi (directory = DIRECTORY, registry = REGISTRY, force = false) {
262
259
 
263
260
  return (
264
261
  new Promise((resolve, reject) => {
265
- const log = use('npmi')
266
- const commands = getNpmiCommands(directory, registry, force)
267
-
268
- /**
269
- * log(commands)
270
- */
262
+ const commands = getNpmiCommands(registry, force)
271
263
 
272
264
  const {
273
265
  stdout,
274
266
  stderr
275
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => (!e) ? resolve(v) : reject(e))
267
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => {
268
+ (!e)
269
+ ? resolve(v)
270
+ : reject(e)
271
+ })
272
+
273
+ const log = use('npmi')
276
274
 
277
275
  stdout.on('data', log)
278
276
  stderr.on('data', log)
@@ -285,17 +283,18 @@ function deps (directory = DIRECTORY, registry = REGISTRY, force = false) {
285
283
 
286
284
  return (
287
285
  new Promise((resolve, reject) => {
288
- const log = use('deps')
289
- const commands = getDepsCommands(directory, registry, force)
290
-
291
- /**
292
- * log(commands)
293
- */
286
+ const commands = getDepsCommands(registry, force)
294
287
 
295
288
  const {
296
289
  stdout,
297
290
  stderr
298
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => (!e) ? resolve(v) : reject(e))
291
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => {
292
+ (!e)
293
+ ? resolve(v)
294
+ : reject(e)
295
+ })
296
+
297
+ const log = use('deps')
299
298
 
300
299
  stdout.on('data', log)
301
300
  stderr.on('data', log)
@@ -72,7 +72,6 @@ function handleCommandError (e) {
72
72
  const log = debug('@modernpoacher/deps:error')
73
73
  if (code > 1) log(code)
74
74
  log(message)
75
- log(e)
76
75
  }
77
76
  }
78
77
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.2",
4
+ "version": "2.0.1",
5
5
  "description": "Update NPM package dependencies from the command line",
6
6
  "keywords": [
7
7
  "deps",
@@ -109,8 +109,6 @@ const getErrorMessage = ({ message = '' } = {}) => message
109
109
  *
110
110
  * Compatible with MacOS and Windows
111
111
  *
112
- * @param {String} directory - A directory configured for Git
113
- *
114
112
  * @return {String}
115
113
  */
116
114
  function getCatGitRefsRemotesOriginHeadCommands () { /* eslint-disable no-useless-escape */
@@ -155,17 +153,16 @@ export function catGitRefsRemotesOriginHead (directory = DIRECTORY) {
155
153
 
156
154
  return (
157
155
  new Promise((resolve, reject) => {
158
- // const log = use('cat-git-refs-remotes-origin-head')
159
156
  const commands = getCatGitRefsRemotesOriginHeadCommands()
160
157
 
161
- /**
162
- * log(commands)
163
- */
164
-
165
158
  const {
166
159
  stdout,
167
160
  stderr
168
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v = '') => (!e) ? resolve(trim(v)) : reject(e))
161
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v = '') => {
162
+ (!e)
163
+ ? resolve(trim(v))
164
+ : reject(e)
165
+ })
169
166
 
170
167
  stdout.on('data', out('cat-git-refs-remotes-origin-head', directory.trim()))
171
168
  stderr.on('data', err('cat-git-refs-remotes-origin-head', directory.trim()))
@@ -187,17 +184,16 @@ export function gitRevParse (directory = DIRECTORY) {
187
184
 
188
185
  return (
189
186
  new Promise((resolve, reject) => {
190
- // const log = out('git-rev-parse')
191
187
  const commands = 'git rev-parse --show-toplevel'
192
188
 
193
- /**
194
- * log(commands)
195
- */
196
-
197
189
  const {
198
190
  stdout,
199
191
  stderr
200
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v = '') => (!e) ? resolve(trim(v)) : reject(e))
192
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v = '') => {
193
+ (!e)
194
+ ? resolve(trim(v))
195
+ : reject(e)
196
+ })
201
197
 
202
198
  stdout.on('data', out('git-rev-parse', directory.trim()))
203
199
  stderr.on('data', err('git-rev-parse', directory.trim()))
@@ -220,17 +216,20 @@ export function gitCheckout (directory = DIRECTORY, branch = BRANCH) {
220
216
 
221
217
  return (
222
218
  new Promise((resolve, reject) => {
223
- const log = use('git-checkout')
224
219
  const commands = `git checkout ${branch}`
225
220
 
226
- /**
227
- * log(commands)
228
- */
229
-
230
221
  const {
231
222
  stdout,
232
223
  stderr
233
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => (e) ? isCommandError(e) ? resolve(v) : reject(e) : resolve(v))
224
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => {
225
+ (!e)
226
+ ? resolve(v)
227
+ : isCommandError(e)
228
+ ? resolve(v)
229
+ : reject(e)
230
+ })
231
+
232
+ const log = use('git-checkout')
234
233
 
235
234
  stdout.on('data', log)
236
235
  stderr.on('data', log)
@@ -252,17 +251,20 @@ export function gitPull (directory = DIRECTORY) {
252
251
 
253
252
  return (
254
253
  new Promise((resolve, reject) => {
255
- const log = use('git-pull')
256
254
  const commands = 'git pull'
257
255
 
258
- /**
259
- * log(commands)
260
- */
261
-
262
256
  const {
263
257
  stdout,
264
258
  stderr
265
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => (e) ? isCommandError(e) ? resolve(v) : reject(e) : resolve(v))
259
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => {
260
+ (!e)
261
+ ? resolve(v)
262
+ : isCommandError(e)
263
+ ? resolve(v)
264
+ : reject(e)
265
+ })
266
+
267
+ const log = use('git-pull')
266
268
 
267
269
  stdout.on('data', log)
268
270
  stderr.on('data', log)
@@ -284,17 +286,20 @@ export function gitPush (directory = DIRECTORY) {
284
286
 
285
287
  return (
286
288
  new Promise((resolve, reject) => {
287
- const log = use('git-push')
288
289
  const commands = 'git push'
289
290
 
290
- /**
291
- * log(commands)
292
- */
293
-
294
291
  const {
295
292
  stdout,
296
293
  stderr
297
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => (e) ? isCommandError(e) ? resolve(v) : reject(e) : resolve(v))
294
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => {
295
+ (!e)
296
+ ? resolve(v)
297
+ : isCommandError(e)
298
+ ? resolve(v)
299
+ : reject(e)
300
+ })
301
+
302
+ const log = use('git-push')
298
303
 
299
304
  stdout.on('data', log)
300
305
  stderr.on('data', log)
@@ -316,17 +321,20 @@ export function gitPushTags (directory = DIRECTORY) {
316
321
 
317
322
  return (
318
323
  new Promise((resolve, reject) => {
319
- const log = use('git-push-tags')
320
324
  const commands = 'git push --tags'
321
325
 
322
- /**
323
- * log(commands)
324
- */
325
-
326
326
  const {
327
327
  stdout,
328
328
  stderr
329
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => (e) ? isCommandError(e) ? resolve(v) : reject(e) : resolve(v))
329
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => {
330
+ (!e)
331
+ ? resolve(v)
332
+ : isCommandError(e)
333
+ ? resolve(v)
334
+ : reject(e)
335
+ })
336
+
337
+ const log = use('git-push-tags')
330
338
 
331
339
  stdout.on('data', log)
332
340
  stderr.on('data', log)
@@ -349,17 +357,20 @@ export function gitAdd (directory = DIRECTORY, add = ADD) {
349
357
 
350
358
  return (
351
359
  new Promise((resolve, reject) => {
352
- const log = use('git-add')
353
360
  const commands = `git add ${add}`
354
361
 
355
- /**
356
- * log(commands)
357
- */
358
-
359
362
  const {
360
363
  stdout,
361
364
  stderr
362
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => (e) ? isCommandError(e) ? resolve(v) : reject(e) : resolve(v))
365
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => {
366
+ (!e)
367
+ ? resolve(v)
368
+ : isCommandError(e)
369
+ ? resolve(v)
370
+ : reject(e)
371
+ })
372
+
373
+ const log = use('git-add')
363
374
 
364
375
  stdout.on('data', log)
365
376
  stderr.on('data', log)
@@ -382,17 +393,20 @@ export function gitCommit (directory = DIRECTORY, message = MESSAGE, author = AU
382
393
 
383
394
  return (
384
395
  new Promise((resolve, reject) => {
385
- const log = use('git-commit')
386
396
  const commands = `git commit -m "${message}" --author "${author}"`
387
397
 
388
- /**
389
- * log(commands)
390
- */
391
-
392
398
  const {
393
399
  stdout,
394
400
  stderr
395
- } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => (e) ? isCommandError(e) ? resolve(v) : reject(e) : resolve(v))
401
+ } = exec(commands, { ...OPTIONS, cwd: normalize(directory) }, (e, v) => {
402
+ (!e)
403
+ ? resolve(v)
404
+ : isCommandError(e)
405
+ ? resolve(v)
406
+ : reject(e)
407
+ })
408
+
409
+ const log = use('git-commit')
396
410
 
397
411
  stdout.on('data', log)
398
412
  stderr.on('data', log)
package/src/index.mjs CHANGED
@@ -288,17 +288,19 @@ export function installSaveBundleSaveExact (d, p, r, f) {
288
288
 
289
289
  return (
290
290
  new Promise((resolve, reject) => {
291
- const log = use('install-save-bundle-save-exact')
292
- const commands = getCommands(d, getInstallSaveBundleSaveExactCommands(p, r, f))
293
-
294
- /**
295
- * log(commands)
296
- */
291
+ const D = normalize(d)
292
+ const commands = getCommands(D, getInstallSaveBundleSaveExactCommands(p, r, f))
297
293
 
298
294
  const {
299
295
  stdout,
300
296
  stderr
301
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
297
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => {
298
+ (!e)
299
+ ? resolve(v)
300
+ : reject(e)
301
+ })
302
+
303
+ const log = use('install-save-bundle-save-exact')
302
304
 
303
305
  stdout.on('data', log)
304
306
  stderr.on('data', log)
@@ -323,17 +325,19 @@ export function installSaveBundle (d, p, r, f) {
323
325
 
324
326
  return (
325
327
  new Promise((resolve, reject) => {
326
- const log = use('install-save-bundle')
327
- const commands = getCommands(d, getInstallSaveBundleCommands(p, r, f))
328
-
329
- /**
330
- * log(commands)
331
- */
328
+ const D = normalize(d)
329
+ const commands = getCommands(D, getInstallSaveBundleCommands(p, r, f))
332
330
 
333
331
  const {
334
332
  stdout,
335
333
  stderr
336
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
334
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => {
335
+ (!e)
336
+ ? resolve(v)
337
+ : reject(e)
338
+ })
339
+
340
+ const log = use('install-save-bundle')
337
341
 
338
342
  stdout.on('data', log)
339
343
  stderr.on('data', log)
@@ -358,17 +362,19 @@ export function installSaveOptionalSaveExact (d, p, r, f) {
358
362
 
359
363
  return (
360
364
  new Promise((resolve, reject) => {
361
- const log = use('install-save-otional-save-exact')
362
- const commands = getCommands(d, getInstallSaveOptionalSaveExactCommands(p, r, f))
363
-
364
- /**
365
- * log(commands)
366
- */
365
+ const D = normalize(d)
366
+ const commands = getCommands(D, getInstallSaveOptionalSaveExactCommands(p, r, f))
367
367
 
368
368
  const {
369
369
  stdout,
370
370
  stderr
371
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
371
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => {
372
+ (!e)
373
+ ? resolve(v)
374
+ : reject(e)
375
+ })
376
+
377
+ const log = use('install-save-otional-save-exact')
372
378
 
373
379
  stdout.on('data', log)
374
380
  stderr.on('data', log)
@@ -393,17 +399,19 @@ export function installSaveOptional (d, p, r, f) {
393
399
 
394
400
  return (
395
401
  new Promise((resolve, reject) => {
396
- const log = use('install-save-otional')
397
- const commands = getCommands(d, getInstallSaveOptionalCommands(p, r, f))
398
-
399
- /**
400
- * log(commands)
401
- */
402
+ const D = normalize(d)
403
+ const commands = getCommands(D, getInstallSaveOptionalCommands(p, r, f))
402
404
 
403
405
  const {
404
406
  stdout,
405
407
  stderr
406
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
408
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => {
409
+ (!e)
410
+ ? resolve(v)
411
+ : reject(e)
412
+ })
413
+
414
+ const log = use('install-save-otional')
407
415
 
408
416
  stdout.on('data', log)
409
417
  stderr.on('data', log)
@@ -428,17 +436,19 @@ export function installSaveDevSaveExact (d, p, r, f) {
428
436
 
429
437
  return (
430
438
  new Promise((resolve, reject) => {
431
- const log = use('install-save-dev-save-exact')
432
- const commands = getCommands(d, getInstallSaveDevSaveExactCommands(p, r, f))
433
-
434
- /**
435
- * log(commands)
436
- */
439
+ const D = normalize(d)
440
+ const commands = getCommands(D, getInstallSaveDevSaveExactCommands(p, r, f))
437
441
 
438
442
  const {
439
443
  stdout,
440
444
  stderr
441
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
445
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => {
446
+ (!e)
447
+ ? resolve(v)
448
+ : reject(e)
449
+ })
450
+
451
+ const log = use('install-save-dev-save-exact')
442
452
 
443
453
  stdout.on('data', log)
444
454
  stderr.on('data', log)
@@ -463,17 +473,19 @@ export function installSaveDev (d, p, r, f) {
463
473
 
464
474
  return (
465
475
  new Promise((resolve, reject) => {
466
- const log = use('install-save-dev')
467
- const commands = getCommands(d, getInstallSaveDevCommands(p, r, f))
468
-
469
- /**
470
- * log(commands)
471
- */
476
+ const D = normalize(d)
477
+ const commands = getCommands(D, getInstallSaveDevCommands(p, r, f))
472
478
 
473
479
  const {
474
480
  stdout,
475
481
  stderr
476
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
482
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => {
483
+ (!e)
484
+ ? resolve(v)
485
+ : reject(e)
486
+ })
487
+
488
+ const log = use('install-save-dev')
477
489
 
478
490
  stdout.on('data', log)
479
491
  stderr.on('data', log)
@@ -498,17 +510,19 @@ export function installSaveProdSaveExact (d, p, r, f) {
498
510
 
499
511
  return (
500
512
  new Promise((resolve, reject) => {
501
- const log = use('install-save-prod-save-exact')
502
- const commands = getCommands(d, getInstallSaveProdSaveExactCommands(p, r, f))
503
-
504
- /**
505
- * log(commands)
506
- */
513
+ const D = normalize(d)
514
+ const commands = getCommands(D, getInstallSaveProdSaveExactCommands(p, r, f))
507
515
 
508
516
  const {
509
517
  stdout,
510
518
  stderr
511
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
519
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => {
520
+ (!e)
521
+ ? resolve(v)
522
+ : reject(e)
523
+ })
524
+
525
+ const log = use('install-save-prod-save-exact')
512
526
 
513
527
  stdout.on('data', log)
514
528
  stderr.on('data', log)
@@ -533,17 +547,19 @@ export function installSaveProd (d, p, r, f) {
533
547
 
534
548
  return (
535
549
  new Promise((resolve, reject) => {
536
- const log = use('install-save-prod')
537
- const commands = getCommands(d, getInstallSaveProdCommands(p, r, f))
538
-
539
- /**
540
- * log(commands)
541
- */
550
+ const D = normalize(d)
551
+ const commands = getCommands(D, getInstallSaveProdCommands(p, r, f))
542
552
 
543
553
  const {
544
554
  stdout,
545
555
  stderr
546
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
556
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => {
557
+ (!e)
558
+ ? resolve(v)
559
+ : reject(e)
560
+ })
561
+
562
+ const log = use('install-save-prod')
547
563
 
548
564
  stdout.on('data', log)
549
565
  stderr.on('data', log)
@@ -110,12 +110,13 @@ export function installSaveExact (d, p, s, r, f) {
110
110
 
111
111
  return (
112
112
  new Promise((resolve, reject) => {
113
- const commands = getCommands(d, getInstallSaveExactCommands(p, s, r, f))
113
+ const D = normalize(d)
114
+ const commands = getCommands(D, getInstallSaveExactCommands(p, s, r, f))
114
115
 
115
116
  const {
116
117
  stdout,
117
118
  stderr
118
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
119
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => (!e) ? resolve(v) : reject(e))
119
120
 
120
121
  stdout.on('data', log)
121
122
  stderr.on('data', log)
@@ -141,12 +142,13 @@ export function install (d, p, s, r, f) {
141
142
 
142
143
  return (
143
144
  new Promise((resolve, reject) => {
144
- const commands = getCommands(d, getInstallCommands(p, s, r, f))
145
+ const D = normalize(d)
146
+ const commands = getCommands(D, getInstallCommands(p, s, r, f))
145
147
 
146
148
  const {
147
149
  stdout,
148
150
  stderr
149
- } = exec(commands, { ...OPTIONS, cwd: normalize(d) }, (e, v) => (!e) ? resolve(v) : reject(e))
151
+ } = exec(commands, { ...OPTIONS, cwd: D }, (e, v) => (!e) ? resolve(v) : reject(e))
150
152
 
151
153
  stdout.on('data', log)
152
154
  stderr.on('data', log)
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- lts/*