@modernpoacher/deps 2.0.6 → 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/nvm.sh CHANGED
@@ -18,9 +18,9 @@ VERSION=$(nvm --version)
18
18
 
19
19
  if [[ -z "$VERSION" ]];
20
20
  then
21
- echo NVM not installed
21
+ echo Environment does not have NVM installed
22
22
  else
23
- echo NVM version $VERSION installed
23
+ echo Environment has NVM version $VERSION installed
24
24
 
25
25
  set +e
26
26
 
@@ -28,8 +28,8 @@ else
28
28
 
29
29
  if [[ $? != 0 ]];
30
30
  then
31
- echo NVM not configured
31
+ echo Environment does not have NVM configured
32
32
  else
33
- echo NVM version $VERSION configured
33
+ echo Environment has NVM version $VERSION configured
34
34
  fi
35
35
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.0.6",
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