Skip to content

Commit

Permalink
fix(module): update version to 3.2.4 (Closes #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
abgox committed Feb 22, 2024
1 parent 60656cc commit 3cdb6eb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion module/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.3
3.2.4
2 changes: 1 addition & 1 deletion module/PSCompletions.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

RootModule = 'PSCompletions.psm1'

ModuleVersion = '3.2.3'
ModuleVersion = '3.2.4'

GUID = '00929632-527d-4dab-a5b3-21197faccd05'

Expand Down
6 changes: 3 additions & 3 deletions module/core/init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ New-Variable -Name PSCompletions -Value @{} -Option Constant
@('config', 'confirm', 'download', 'less', 'order', 'text', 'path') | ForEach-Object {
. $PSScriptRoot\utils\$_.ps1
}
$PSCompletions.version = '3.2.3'
$PSCompletions.version = '3.2.4'
$PSCompletions.path = @{}
$PSCompletions.path.root = Split-Path $PSScriptRoot -Parent
$PSCompletions.path.completions = Join-Path $PSCompletions.path.root 'completions'
Expand Down Expand Up @@ -319,13 +319,13 @@ $null = Start-Job -ScriptBlock {
function get_content([string]$path) {
$res = Get-Content $path -Encoding utf8 -ErrorAction SilentlyContinue | Where-Object { $_ -ne '' }
if ($res) { return $res }
return ''
return $null
}
function get_raw_content([string]$path, [bool]$trim = $true) {
$res = Get-Content $path -Raw -Encoding utf8 -ErrorAction SilentlyContinue
if ($trim -and $res) { $res = $res.Trim() }
if ($res) { return $res }
return ''
return $null
}
function _replace([array]$data) {
$data = $data -join ''
Expand Down
4 changes: 2 additions & 2 deletions module/core/utils/text.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ $PSCompletions | Add-Member -MemberType ScriptMethod fn_get_content {
param ([string]$path)
$res = Get-Content $path -Encoding utf8 -ErrorAction SilentlyContinue | Where-Object { $_ -ne '' }
if ($res) { return $res }
return ''
return $null
}
$PSCompletions | Add-Member -MemberType ScriptMethod fn_get_raw_content {
param ([string]$path, [bool]$trim = $true)
$res = Get-Content $path -Raw -Encoding utf8 -ErrorAction SilentlyContinue
if ($trim -and $res) { $res = $res.Trim() }
if ($res) { return $res }
return ''
return $null
}

$PSCompletions | Add-Member -MemberType ScriptMethod fn_replace {
Expand Down
10 changes: 10 additions & 0 deletions module/log.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"3.2.4": {
"zh-CN": [
"修复(2024/2/22)\n",
" - 修复了空字符串循环导致的补全更新错误\n"
],
"en-US": [
"Fixed(2024/2/22)\n",
" - Fixed completions update error caused by empty string loop.\n"
]
},
"3.2.3": {
"zh-CN": [
"修复(2024/2/22)\n",
Expand Down

0 comments on commit 3cdb6eb

Please sign in to comment.