From 955a701c08d43d61555ad75a514cbb151d9e4c85 Mon Sep 17 00:00:00 2001 From: leoli Date: Thu, 9 May 2024 13:33:40 +0800 Subject: [PATCH 1/3] fix: fix function is not defined error --- src/index.mjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index.mjs b/src/index.mjs index ea3762c..666e4e4 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -44,7 +44,7 @@ class SetupManager { selectedPackages.forEach((p) => p && this.shell.addCommand(p.installCommand)); - refreshEnvironment(); + this.refreshEnvironment(); if (selectedPackages.some((p) => p && p.packageName.startsWith('Python'))) { if (os.platform() === 'win32') { @@ -57,7 +57,7 @@ class SetupManager { /* Install Poetry */ const poetryInstallCommand = os.platform() === 'win32' ? '(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -' : 'asdf plugin add poetry && asdf install poetry latest && asdf global poetry latest'; this.shell.addCommand(poetryInstallCommand); - refreshEnvironment(); + this.refreshEnvironment(); this.shell.addCommand('poetry --version'); this.shell.addCommand('poetry config virtualenvs.in-project true'); this.shell.addCommand(fs.readFileSync(path.join(__dirname, 'scripts/pip.setup'), 'utf8').trim()); @@ -80,11 +80,11 @@ class SetupManager { console.log('Ubuntu 20.04 not detected'); } } - refreshEnvironment(); + this.refreshEnvironment(); this.shell.addCommand('node --version'); this.shell.addCommand('npm --version'); this.shell.addCommand(fs.readFileSync(path.join(__dirname, 'scripts/npm.setup'), 'utf8').trim()); - refreshEnvironment(); + this.refreshEnvironment(); } if (os.platform() === 'win32' && selectedPackages.some((p) => p && p.packageName.startsWith('Sublime Text'))) { @@ -97,7 +97,7 @@ class SetupManager { this.shell.addCommand(fs.readFileSync(path.join(__dirname, 'scripts/macos/macsetup.sh'), 'utf8').trim()); } - if (!isLinuxRunAsRoot()) this.shell.addCommand('npx @leoli0605/git-setup'); + if (!this.isLinuxRunAsRoot()) this.shell.addCommand('npx @leoli0605/git-setup'); } setupNonWindowsEnvironment() { From fec62baeae637d581a0d7cfaf24b4a1ac369dc1b Mon Sep 17 00:00:00 2001 From: Conventional Changelog Action Date: Thu, 9 May 2024 05:35:13 +0000 Subject: [PATCH 2/3] chore(release): v1.2.1 [skip ci] --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e973348..55f6543 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [1.2.1](https://github.com/leoli0605/npm-env-setup/compare/v1.2.0...v1.2.1) (2024-05-09) + + +### Bug Fixes + +* fix function is not defined error ([955a701](https://github.com/leoli0605/npm-env-setup/commit/955a701c08d43d61555ad75a514cbb151d9e4c85)) + + + # [1.2.0](https://github.com/leoli0605/npm-env-setup/compare/v1.1.0...v1.2.0) (2024-05-09) diff --git a/package.json b/package.json index 78444cc..ec1948d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@leoli0605/env-setup", - "version": "1.2.0", + "version": "1.2.1", "description": "\"\"", "main": "./src/index.mjs", "files": [ From c0bf2bba8f0cc9705d444f6f868b2cac9b5d4a8e Mon Sep 17 00:00:00 2001 From: Conventional Changelog Action Date: Thu, 9 May 2024 05:36:44 +0000 Subject: [PATCH 3/3] docs: update download links --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a31a23c..e2f8e54 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Open `powershell` and run the following command. This will start setting up your ```shell -powershell.exe -Command "Invoke-WebRequest -Uri https://github.com/leoli0605/npm-env-setup/releases/download/v1.2.0/env-setup-win-x64.exe -OutFile env-setup-win-x64.exe; Start-Process env-setup-win-x64.exe -Wait; Remove-Item env-setup-win-x64.exe -Force" +powershell.exe -Command "Invoke-WebRequest -Uri https://github.com/leoli0605/npm-env-setup/releases/download/v1.2.1/env-setup-win-x64.exe -OutFile env-setup-win-x64.exe; Start-Process env-setup-win-x64.exe -Wait; Remove-Item env-setup-win-x64.exe -Force" ``` @@ -47,7 +47,7 @@ For Mac users, the process is just as simple. Depending on the type of chip your ```shell -curl -L https://github.com/leoli0605/npm-env-setup/releases/download/v1.2.0/env-setup-macos-x64 -o env-setup-macos-x64 && chmod +x env-setup-macos-x64 && ./env-setup-macos-x64 && rm -f env-setup-macos-x64 +curl -L https://github.com/leoli0605/npm-env-setup/releases/download/v1.2.1/env-setup-macos-x64 -o env-setup-macos-x64 && chmod +x env-setup-macos-x64 && ./env-setup-macos-x64 && rm -f env-setup-macos-x64 ``` @@ -55,7 +55,7 @@ curl -L https://github.com/leoli0605/npm-env-setup/releases/download/v1.2.0/env- ```shell -curl -L https://github.com/leoli0605/npm-env-setup/releases/download/v1.2.0/env-setup-macos-arm64 -o env-setup-macos-arm64 && chmod +x env-setup-macos-arm64 && ./env-setup-macos-arm64 && rm -f env-setup-macos-arm64 +curl -L https://github.com/leoli0605/npm-env-setup/releases/download/v1.2.1/env-setup-macos-arm64 -o env-setup-macos-arm64 && chmod +x env-setup-macos-arm64 && ./env-setup-macos-arm64 && rm -f env-setup-macos-arm64 ``` @@ -65,7 +65,7 @@ For Linux users running Ubuntu 18.04 LTS or newer versions, execute the followin ```shell -curl -L https://github.com/leoli0605/npm-env-setup/releases/download/v1.2.0/env-setup-linux-x64 -o env-setup-linux-x64 && chmod +x env-setup-linux-x64 && ./env-setup-linux-x64 && rm -f env-setup-linux-x64 +curl -L https://github.com/leoli0605/npm-env-setup/releases/download/v1.2.1/env-setup-linux-x64 -o env-setup-linux-x64 && chmod +x env-setup-linux-x64 && ./env-setup-linux-x64 && rm -f env-setup-linux-x64 ```