diff --git a/CHANGELOG.md b/CHANGELOG.md index 26f6828..61f515f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.1.0] - 2023-02-12 +#### Added +* Future support for Chocolatey v2 + +#### Changed +* Install Chocolatey v1.2.1 by default if Chocolatey is not already installed + ## [4.0.0] - 2021-09-24 #### Added * Support for [package parameters/arguments that start with dashes via separate cmdlet dynamic parameters](https://github.com/jianyunt/ChocolateyGet/issues/29) diff --git a/README.md b/README.md index 0a89862..0a8c941 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,8 @@ ChocolateyGet works with PowerShell for both FullCLR/'Desktop' (ex 5.1) and Core When used with CoreCLR, PowerShell 7.0.1 is a minimum requirement due to [a compatibility issue in PowerShell 7.0](https://github.com/PowerShell/PowerShell/pull/12203). +Users must upgrade to v4.1.0 or higher of this provider module prior to the release of Chocolatey v2 to ensure continued compatibility. + ### Save a package Save-Package is not supported with the ChocolateyGet provider, due to Chocolatey not supporting package downloads without special licensing. diff --git a/src/ChocolateyGet.psd1 b/src/ChocolateyGet.psd1 index 786c359..b3cbbaf 100644 --- a/src/ChocolateyGet.psd1 +++ b/src/ChocolateyGet.psd1 @@ -1,6 +1,6 @@ @{ RootModule = 'ChocolateyGet.psm1' - ModuleVersion = '4.0.0' + ModuleVersion = '4.1.0' GUID = 'c1735ed7-8b2f-426a-8cbc-b7feb6b8288d' Author = 'Jianyun' Copyright = '' @@ -19,7 +19,7 @@ }, @{ ModuleName='Foil' - ModuleVersion='0.1.0' + ModuleVersion='0.3.0' } ) PrivateData = @{ diff --git a/src/private/Find-ChocoPackage.ps1 b/src/private/Find-ChocoPackage.ps1 index a90b5cc..a2ebd51 100644 --- a/src/private/Find-ChocoPackage.ps1 +++ b/src/private/Find-ChocoPackage.ps1 @@ -76,6 +76,6 @@ function Find-ChocoPackage { } # Convert the PSCustomObject output from Foil into PackageManagement SWIDs, then filter results by any version requirements - Foil\Get-ChocoPackage @chocoParams | ConvertTo-SoftwareIdentity -Source $selectedSource | + Foil\Find-ChocoPackage @chocoParams | ConvertTo-SoftwareIdentity -Source $selectedSource | Where-Object {Test-PackageVersion -Package $_ -RequiredVersion $RequiredVersion -MinimumVersion $MinimumVersion -MaximumVersion $MaximumVersion} } diff --git a/src/private/Install-Chocolatey.ps1 b/src/private/Install-Chocolatey.ps1 index 2a9902f..965df04 100644 --- a/src/private/Install-Chocolatey.ps1 +++ b/src/private/Install-Chocolatey.ps1 @@ -29,7 +29,7 @@ function Install-Chocolatey { [Net.ServicePointManager]::SecurityProtocol = ([Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12) } # Keep the default version of choco to install pinned to known safe versions - $env:chocolateyVersion = '0.12.1' + $env:chocolateyVersion = '1.2.1' Invoke-WebRequest 'https://chocolatey.org/install.ps1' -UseBasicParsing | Invoke-Expression > $null } catch { ThrowError -ExceptionName 'System.OperationCanceledException' ` diff --git a/src/public/Get-InstalledPackage.ps1 b/src/public/Get-InstalledPackage.ps1 index acceef5..94595cc 100644 --- a/src/public/Get-InstalledPackage.ps1 +++ b/src/public/Get-InstalledPackage.ps1 @@ -28,6 +28,7 @@ function Get-InstalledPackage { } $chocoParams = @{ + # Remove this flag after the release of Chocolatey v2 LocalOnly = $true AllVersions = $true }