nodeswitch 1.6.2 → 1.8.0

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 alexsch01
3
+ Copyright (c) 2024 alexsch01
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -31,6 +31,8 @@ nodeswitch use 18.13.0
31
31
  nodeswitch use default
32
32
 
33
33
  nodeswitch list
34
+
35
+ nodeswitch path
34
36
  ```
35
37
 
36
38
  #### How To Uninstall
@@ -49,6 +49,8 @@ if not "%1" == "" (
49
49
  ) else (
50
50
  if "%1" == "list" (
51
51
  dir /b %AppData%\nodeswitch
52
+ ) else if "%1" == "path" (
53
+ echo %AppData%\nodeswitch
52
54
  ) else (
53
55
  echo Incorrect command
54
56
  )
@@ -50,6 +50,8 @@ if ( $nodeswitch1stParameter -ne $null ) {
50
50
  } else {
51
51
  if ( $nodeswitch1stParameter -eq "list" ) {
52
52
  dir -n $env:AppData\nodeswitch
53
+ } elseif ( $nodeswitch1stParameter -eq "path" ) {
54
+ echo "$env:AppData\nodeswitch"
53
55
  } else {
54
56
  echo "Incorrect command"
55
57
  }
package/bin/nodeswitch.sh CHANGED
@@ -61,6 +61,9 @@ then
61
61
  if [ "$1" = "list" ]
62
62
  then
63
63
  dir -1 $APPDATA/nodeswitch
64
+ elif [ "$1" = "path" ]
65
+ then
66
+ echo "$APPDATA\nodeswitch"
64
67
  else
65
68
  echo "Incorrect command"
66
69
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodeswitch",
3
- "version": "1.6.2",
3
+ "version": "1.8.0",
4
4
  "description": "Node version switcher for Microsoft Windows x64",
5
5
  "scripts": {
6
6
  "preinstall": "node scripts/preinstall.js",
@@ -1,4 +1,9 @@
1
+ if(!process.env.npm_config_global) {
2
+ console.log('This npm module can only be installed globally')
3
+ process.exit(1)
4
+ }
5
+
1
6
  if(process.platform != 'win32' || process.arch != 'x64') {
2
7
  console.log('This npm module is only for Microsoft Windows x64')
3
8
  process.exit(1)
4
- }
9
+ }