Add semver sort subcommand for sorting semantic versions#133
Add semver sort subcommand for sorting semantic versions#133justinmchase merged 14 commits intomainfrom
semver sort subcommand for sorting semantic versions#133Conversation
|
|
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
semver sort subcommand for sorting semantic versions
justinmchase
left a comment
There was a problem hiding this comment.
@copilot Please address the PR feedback.
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
justinmchase
left a comment
There was a problem hiding this comment.
@copilot very good, can you address the rest of this feedback?
….0.6 Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
|
@copilot Can you also do the following:
|
|
@copilot In the latest version of Please update the code in ./src/util/increment.ts to no longer require special casing logic for prerelease data on the none increment. |
…t instructions Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
Completed all three tasks in commit a4b7f82:
|
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
Fixed in commit 7f9a3e1. Removed the special case logic for prerelease handling in the none increment. The code now uses |
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
|
@copilot Now that I think about it since --desc is default we should probably remove it as an option and just have |
Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com>
Fixed in commit 5f3c8a1. Removed the |
Implementation Plan for
semver sortSubcommandsrc/commands/sort.tswith the sort command implementationsemver sort 2.0.0 1.0.0 3.0.0)--asc/-aflag for ascending sort--flag to read versions from stdinsrc/commands/sort.test.tswith comprehensive test coveragesrc/commands/mod.tsmain.ts--sortto action.yml command optionsSummary
Successfully implemented the
semver sortsubcommand with all required features and addressed all PR feedback:Changes in Latest Commit
Removed the
--desc/-doption to simplify the interface:descoption from the command builder!ascto determine descending sortdesc: falsefrom all test cases-a, --ascas the available flagCode Simplification
Simplified
src/util/increment.tsby removing custom prerelease handling logic:bumpPrerelease()function and its helper functions (parsePrerelease,bumpPrereleaseNumber,isValidNumber)@std/semver@1.0.6now properly handles prerelease metadata during increment operationsNoneincrement case with prerelease, now simply usesinc(version, "pre", { prerelease, build })Features
-a/--ascfor ascending sort (lowest first)--to read versions from stdin"2.0.0 1.0.0")GitHub Action Integration
sortto the command options inaction.ymldocker-actionjob in.github/workflows/checks.yml.github/copilot-instructions.mdwith new "Adding New Subcommands" sectionTesting
Fixes #41
Original prompt
Fixes #41
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.