Skip to content

Commit

Permalink
Merge branch 'refs/heads/releases/v1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Conventional Changelog Action committed May 9, 2024
2 parents 2ee8a8e + c0bf2bb commit 99da492
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Open `powershell` and run the following command. This will start setting up your

<!-- WINDOWS_LINK_X64_START -->
```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"
```
<!-- WINDOWS_LINK_X64_END -->

Expand All @@ -47,15 +47,15 @@ For Mac users, the process is just as simple. Depending on the type of chip your

<!-- MACOS_LINK_X64_START -->
```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
```
<!-- MACOS_LINK_X64_END -->

- If you have a newer Mac model with Apple's own chip (like the M1 or M2, found in Macs from late 2020 onwards):

<!-- MACOS_LINK_ARM64_START -->
```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
```
<!-- MACOS_LINK_ARM64_END -->

Expand All @@ -65,7 +65,7 @@ For Linux users running Ubuntu 18.04 LTS or newer versions, execute the followin

<!-- LINUX_LINK_X64_START -->
```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
```
<!-- LINUX_LINK_X64_END -->

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leoli0605/env-setup",
"version": "1.2.0",
"version": "1.2.1",
"description": "\"\"",
"main": "./src/index.mjs",
"files": [
Expand Down
10 changes: 5 additions & 5 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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());
Expand All @@ -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'))) {
Expand All @@ -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() {
Expand Down

0 comments on commit 99da492

Please sign in to comment.