From 8084f5409aabb70fdbb855a6439de361caf176a9 Mon Sep 17 00:00:00 2001 From: Reza Date: Fri, 11 Sep 2026 19:23:58 +0200 Subject: [PATCH] Use Gallery-compatible prerelease version --- MIGRATION.md | 2 +- README.md | 10 +++++----- docs/releases/{2.0.0-rc.1.md => 2.0.0-rc1.md} | 6 +++--- src/Module/PSDataverse.psd1 | 4 ++-- tests/PSDataverse.Module.Tests.ps1 | 16 +++++++++------- tools/New-PSDataversePackage.ps1 | 3 +++ 6 files changed, 23 insertions(+), 18 deletions(-) rename docs/releases/{2.0.0-rc.1.md => 2.0.0-rc1.md} (96%) diff --git a/MIGRATION.md b/MIGRATION.md index 32ee957..5070909 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -19,7 +19,7 @@ Test important automation in a disposable environment, especially scripts that submit writes concurrently. PowerShell can keep the 0.x and 2.x module versions installed side by side while you validate the migration. -The PSDataverse 2 release-candidate package is version `2.0.0-rc.1`. Because it is a +The PSDataverse 2 release-candidate package is version `2.0.0-rc1`. Because it is a prerelease, include `-Prerelease` when discovering or acquiring it from a PowerShell repository. Use `Import-Module PSDataverse -RequiredVersion 2.0.0` to make test scripts select the 2.x base version explicitly. diff --git a/README.md b/README.md index c3bede2..66d547a 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ High-performance, pipeline-friendly PowerShell access to Microsoft Dataverse. > [!IMPORTANT] -> PSDataverse `2.0.0-rc.1` is a public release candidate requiring PowerShell +> PSDataverse `2.0.0-rc1` is a public release candidate requiring PowerShell > 7.6 or later. It contains intentional breaking changes from 0.x; review the > [migration guide](MIGRATION.md) before upgrading production automation. -See [what is new in PSDataverse 2.0.0-rc.1](docs/releases/2.0.0-rc.1.md), the +See [what is new in PSDataverse 2.0.0-rc1](docs/releases/2.0.0-rc1.md), the [complete command reference](docs/reference/README.md), and the [measured write-transport guide](docs/guides/choosing-a-write-transport.md). @@ -55,13 +55,13 @@ Install the PSDataverse 2 release candidate from PSResourceGet: ```powershell -Install-PSResource -Name PSDataverse -Version 2.0.0-rc.1 -Prerelease +Install-PSResource -Name PSDataverse -Version 2.0.0-rc1 -Prerelease ``` Or use PowerShellGet: ```powershell -Install-Module -Name PSDataverse -RequiredVersion 2.0.0-rc.1 -AllowPrerelease +Install-Module -Name PSDataverse -RequiredVersion 2.0.0-rc1 -AllowPrerelease ``` The following command continues to install the latest stable 0.x release until @@ -131,7 +131,7 @@ To repeat only the repository acquisition and package smoke test: ```powershell ./tools/Test-PSDataversePackage.ps1 ` - -PackagePath ./output/packages/PSDataverse.2.0.0-rc.1.nupkg + -PackagePath ./output/packages/PSDataverse.2.0.0-rc1.nupkg ``` The scripts use pinned build dependencies and do not install PSDataverse into the diff --git a/docs/releases/2.0.0-rc.1.md b/docs/releases/2.0.0-rc1.md similarity index 96% rename from docs/releases/2.0.0-rc.1.md rename to docs/releases/2.0.0-rc1.md index 46f6bd7..101ba4d 100644 --- a/docs/releases/2.0.0-rc.1.md +++ b/docs/releases/2.0.0-rc1.md @@ -1,4 +1,4 @@ -# PSDataverse 2.0.0-rc.1 +# PSDataverse 2.0.0-rc1 PSDataverse 2 is a substantial modernization of the high-performance PowerShell module for Microsoft Dataverse. This release candidate keeps the recognizable @@ -15,13 +15,13 @@ environment and report feedback through PSDataverse 2 requires PowerShell 7.6 or later. ```powershell -Install-PSResource -Name PSDataverse -Version 2.0.0-rc.1 -Prerelease +Install-PSResource -Name PSDataverse -Version 2.0.0-rc1 -Prerelease ``` PowerShellGet users can install it with: ```powershell -Install-Module -Name PSDataverse -RequiredVersion 2.0.0-rc.1 -AllowPrerelease +Install-Module -Name PSDataverse -RequiredVersion 2.0.0-rc1 -AllowPrerelease ``` Review the [0.x migration guide](https://github.com/rezanid/PSDataverse/blob/main/MIGRATION.md) diff --git a/src/Module/PSDataverse.psd1 b/src/Module/PSDataverse.psd1 index 791e196..cc96bb7 100644 --- a/src/Module/PSDataverse.psd1 +++ b/src/Module/PSDataverse.psd1 @@ -124,10 +124,10 @@ PrivateData = @{ IconUri = 'https://raw.githubusercontent.com/rezanid/PSDataverse/main/media/PSDataverse-GalleryIcon.png' # ReleaseNotes of this module - ReleaseNotes = 'PSDataverse 2.0.0-rc.1 modernizes the module with PowerShell 7.6 and .NET 10, secure WAM/browser/device/IWA/application authentication, named connections, a bounded high-performance request engine, concurrent batch and multiple-operation APIs, convenient CRUD/metadata/import/export commands, structured errors, complete help, and cross-platform package verification. Migration guide: https://github.com/rezanid/PSDataverse/blob/main/MIGRATION.md. Full notes: https://github.com/rezanid/PSDataverse/releases/tag/v2.0.0-rc.1' + ReleaseNotes = 'PSDataverse 2.0.0-rc1 modernizes the module with PowerShell 7.6 and .NET 10, secure WAM/browser/device/IWA/application authentication, named connections, a bounded high-performance request engine, concurrent batch and multiple-operation APIs, convenient CRUD/metadata/import/export commands, structured errors, complete help, and cross-platform package verification. Migration guide: https://github.com/rezanid/PSDataverse/blob/main/MIGRATION.md. Full notes: https://github.com/rezanid/PSDataverse/releases/tag/v2.0.0-rc1' # Prerelease string of this module - Prerelease = 'rc.1' + Prerelease = 'rc1' # Flag to indicate whether the module requires explicit user acceptance for install/update/save RequireLicenseAcceptance = $false diff --git a/tests/PSDataverse.Module.Tests.ps1 b/tests/PSDataverse.Module.Tests.ps1 index 71926d2..c0ae800 100644 --- a/tests/PSDataverse.Module.Tests.ps1 +++ b/tests/PSDataverse.Module.Tests.ps1 @@ -46,7 +46,9 @@ Describe 'PSDataverse packaged module contract' { $manifest = Test-ModuleManifest -Path $ModulePath $manifest.PowerShellVersion | Should -Be ([version]'7.6') $manifest.Version | Should -Be ([version]'2.0.0') - $manifest.PrivateData.PSData.Prerelease | Should -Be 'rc.1' + $manifest.PrivateData.PSData.Prerelease | Should -Be 'rc1' + $manifest.PrivateData.PSData.Prerelease | + Should -Match '^[A-Za-z][0-9A-Za-z]*$' $manifest.PrivateData.PSData.Keys | Should -Not -Contain 'IsPrerelease' Split-Path (Get-Module PSDataverse).Path -Parent | Should -Be (Split-Path (Resolve-Path $ModulePath).Path -Parent) @@ -65,9 +67,9 @@ Describe 'PSDataverse packaged module contract' { $metadata.LicenseUri | Should -Match '^https://' $metadata.IconUri | Should -Be ` 'https://raw.githubusercontent.com/rezanid/PSDataverse/main/media/PSDataverse-GalleryIcon.png' - $metadata.ReleaseNotes | Should -Match '2\.0\.0-rc\.1' + $metadata.ReleaseNotes | Should -Match '2\.0\.0-rc1' $metadata.ReleaseNotes | Should -Match '/MIGRATION\.md' - $metadata.ReleaseNotes | Should -Match '/releases/tag/v2\.0\.0-rc\.1' + $metadata.ReleaseNotes | Should -Match '/releases/tag/v2\.0\.0-rc1' foreach ($tag in @( 'PSEdition_Core', 'Windows', 'Linux', 'macOS', 'Dataverse', 'PowerPlatform', 'Dynamics365', 'WebAPI', 'OAuth')) { @@ -78,7 +80,7 @@ Describe 'PSDataverse packaged module contract' { It 'keeps public release assets synchronized with the package version' { $repositoryRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..')) $iconPath = Join-Path $repositoryRoot 'media/PSDataverse-GalleryIcon.png' - $notesPath = Join-Path $repositoryRoot 'docs/releases/2.0.0-rc.1.md' + $notesPath = Join-Path $repositoryRoot 'docs/releases/2.0.0-rc1.md' $readmePath = Join-Path $repositoryRoot 'README.md' $iconPath | Should -Exist @@ -94,12 +96,12 @@ Describe 'PSDataverse packaged module contract' { $notesPath | Should -Exist (Get-Content -LiteralPath $notesPath -Raw) | - Should -Match 'PSDataverse 2\.0\.0-rc\.1' + Should -Match 'PSDataverse 2\.0\.0-rc1' $readme = Get-Content -LiteralPath $readmePath -Raw $readme | Should -Match ` - 'Install-PSResource -Name PSDataverse -Version 2\.0\.0-rc\.1 -Prerelease' + 'Install-PSResource -Name PSDataverse -Version 2\.0\.0-rc1 -Prerelease' $readme | Should -Match ` - 'Install-Module -Name PSDataverse -RequiredVersion 2\.0\.0-rc\.1 -AllowPrerelease' + 'Install-Module -Name PSDataverse -RequiredVersion 2\.0\.0-rc1 -AllowPrerelease' } It 'exports exactly the documented command surface' { diff --git a/tools/New-PSDataversePackage.ps1 b/tools/New-PSDataversePackage.ps1 index a376cf3..0c7b98f 100644 --- a/tools/New-PSDataversePackage.ps1 +++ b/tools/New-PSDataversePackage.ps1 @@ -46,6 +46,9 @@ $prerelease = [string]$manifest.PrivateData.PSData.Prerelease if ([string]::IsNullOrWhiteSpace($prerelease)) { throw 'The PSDataverse 2 package must have explicit prerelease metadata.' } +if ($prerelease -notmatch '^[A-Za-z][0-9A-Za-z]*$') { + throw "Prerelease '$prerelease' is not supported by PowerShell Gallery. Use an ASCII letter followed only by ASCII letters or digits (for example, 'rc1'); periods and plus signs are not supported." +} $packageVersion = "$($manifest.Version)-$prerelease" $packageFileName = "PSDataverse.$packageVersion.nupkg"