Skip to content

Support NuGet version ranges for Chocolatey dependencies - #202

Merged
HeyItsGilbert merged 5 commits into
mainfrom
copilot/update-chocolatey-depend-script
Sep 30, 2026
Merged

HeyItsGilbert merged 5 commits into
mainfrom
copilot/update-chocolatey-depend-script

Conversation

Copilot AI commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Chocolatey dependencies now support NuGet version ranges defined by ADR 0001 while preserving existing latest and bare exact-version semantics.

  • Range resolution

    • Query all available package versions.
    • Select the highest version satisfying inclusive, exclusive, or open-ended bounds.
    • Pass the resolved concrete version to Chocolatey.
  • Dependency evaluation

    • Accept installed versions that satisfy the requested range.
    • Resolve ranges before forced installations.
    • Return a failed test result for malformed or unsatisfied ranges.
    • Normalize bracketed exact ranges such as [2.0.0] to 2.0.0.
  • Coverage

    • Add cases for range resolution, forced installs, installed matches, bracketed exact versions, malformed ranges, and ranges without a match.
@{
    git = @{
        DependencyType = 'Chocolatey'
        Version        = '[2.0.0,3.0.0)'
    }
}

Copilot AI and others added 3 commits September 30, 2026 18:52
Co-authored-by: HeyItsGilbert <615265+HeyItsGilbert@users.noreply.github.com>
Co-authored-by: HeyItsGilbert <615265+HeyItsGilbert@users.noreply.github.com>
Co-authored-by: HeyItsGilbert <615265+HeyItsGilbert@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation follows the shared range helpers and covers the principal success and failure paths.

Review effort: Balanced
Findings: None

What changed in this PR

Adds NuGet version-range support to Chocolatey dependencies while preserving existing exact-version and latest behavior.

Changes:

  • Resolves ranges to the highest matching Chocolatey package version.
  • Evaluates installed versions against ranges and handles invalid or unsatisfied ranges.
  • Adds focused coverage for installation, testing, forcing, and failure cases.
File Description
PSDepend/​PSDependScripts/​Chocolatey.ps1 Implements Chocolatey range resolution and validation.
Tests/​Chocolatey.Type.Tests.ps1 Tests Chocolatey version-range behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Test Results

    3 files     78 suites   1m 39s ⏱️
1 091 tests 1 031 ✅ 60 💤 0 ❌
1 479 runs  1 409 ✅ 70 💤 0 ❌

Results for commit 97208db.

♻️ This comment has been updated with latest results.

Copilot AI and others added 2 commits September 30, 2026 19:14
Co-authored-by: HeyItsGilbert <615265+HeyItsGilbert@users.noreply.github.com>
Co-authored-by: HeyItsGilbert <615265+HeyItsGilbert@users.noreply.github.com>
Copilot AI requested a review from HeyItsGilbert September 30, 2026 19:19
@HeyItsGilbert
HeyItsGilbert merged commit 50dec99 into main Sep 30, 2026
7 checks passed
@HeyItsGilbert
HeyItsGilbert deleted the copilot/update-chocolatey-depend-script branch September 30, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants