@modernpoacher/deps 2.0.7 → 2.0.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.
@@ -32,7 +32,9 @@ import {
32
32
  AUTHOR,
33
33
  NVM,
34
34
  getRegistryParameter,
35
- getForceParameter
35
+ getForceParameter,
36
+ getExportPath,
37
+ getNvm
36
38
  } from '#deps/src/common'
37
39
 
38
40
  const log = debug('@modernpoacher/deps')
@@ -67,23 +69,20 @@ rmdir /s /q node_modules 2> nul & \
67
69
  del package-lock.json 2> nul
68
70
  `)
69
71
  : () => tidy(`
70
- rm -rf node_modules package-lock.json
72
+ rm -rf node_modules \
73
+ package-lock.json
71
74
  `)
72
75
 
73
76
  const getNpmiCommands = PLATFORM === 'win32'
74
77
  ? (registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'npm i')))
75
78
  : (registry = REGISTRY, force = false) => tidy(`
76
- export PATH=/usr/local/bin:$PATH &> /dev/null
77
- . "${NVM}" 2> /dev/null
78
- ${getRegistryParameter(registry, getForceParameter(force, 'npm i'))}
79
+ ${getExportPath(getNvm(getRegistryParameter(registry, getForceParameter(force, 'npm i'))))}
79
80
  `)
80
81
 
81
82
  const getDepsCommands = PLATFORM === 'win32'
82
83
  ? (registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'deps')))
83
84
  : (registry = REGISTRY, force = false) => tidy(`
84
- export PATH=/usr/local/bin:$PATH &> /dev/null
85
- . "${NVM}" 2> /dev/null
86
- ${getRegistryParameter(registry, getForceParameter(force, 'deps'))}
85
+ ${getExportPath(getNvm(getRegistryParameter(registry, getForceParameter(force, 'deps'))))}
87
86
  `)
88
87
 
89
88
  function use (key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -158,11 +158,11 @@ ${commands}
158
158
 
159
159
  export const getCommands = PLATFORM === 'win32'
160
160
  ? (directory = DIRECTORY, commands = 'npm i') => tidy(`
161
- echo Directory is \\"${directory}\\"
161
+ echo Directory is \\"${directory}\\ (\\"%cd%\\")"
162
162
  ${commands}
163
163
  `)
164
164
  : (directory = DIRECTORY, commands = 'npm i') => tidy(`
165
- echo Directory is \\"${directory}\\"
165
+ echo Directory is \\"${directory}\\ (\\"$PWD\\")"
166
166
  ${getExportPath(getNvm(commands))}
167
167
  `)
168
168