Skip to content

Add .postN support to utils::version - #5233

Draft
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-version-parsing-errors
Draft

Add .postN support to utils::version#5233
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-version-parsing-errors

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

jq/utils.jq only handled strict MAJOR.MINOR.PATCH[-dev] versions, so 0.4.13.post0[-dev] failed parsing and broke actions/version consumers on the workspace branch. This change extends version parsing and next-version calculation to support PEP 440-style post releases without changing plain-version behavior.

  • Version parsing

    • Extend utils::version to accept MAJOR.MINOR.PATCH[.postN][-dev]
    • Preserve existing fields for plain versions
    • Add post to the output shape (number or null)
  • Next-version semantics

    • Keep existing behavior for plain versions:
      • X.Y.Z-dev -> X.Y.Z
      • X.Y.Z -> X.Y.(Z+1)-dev
    • Add post-release behavior:
      • X.Y.Z.postN-dev -> X.Y.Z.postN
      • X.Y.Z.postN -> X.Y.Z.post(N+1)-dev
  • Error handling

    • Replace the old implicit tonumber failure with an explicit error for unsupported version strings
  • Fixtures

    • Update existing jq fixtures to include post: null
    • Add jq fixtures covering post-dev parsing, post-release parsing, and post-release bumping
    • Add an actions/version fixture covering 0.4.13.post0

Example:

"0.4.13.post0" | utils::version
{
  "version": "0.4.13.post0",
  "is_dev": false,
  "major": 0,
  "minor": 4,
  "patch": 13,
  "post": 0,
  "next": "0.4.13.post1-dev"
}

Note: workspace branch workflows will need to bump their envoyproxy/toolshed/actions/* pins to an actions-v* release containing this change before .postN releases work there.

@netlify

netlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit 5aac3a8
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/6aa42eb8502cb30008d1d9e9
😎 Deploy Preview https://deploy-preview-5233--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix version parsing for post-release versions in jq Add .postN support to utils::version Sep 11, 2026
Copilot AI requested a review from phlax September 11, 2026 16:40
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.

2 participants