Ban 'latest' as a reserved version string (#413)
## Summary - Adds validation to prevent servers from being published with version string "latest" - "latest" is now a reserved keyword that cannot be used as a version string ## Implementation - Added `ErrReservedVersionString` error constant - Created `validateVersion` function to check for reserved version strings - Integrated validation into the package field validation flow - Added comprehensive test coverage --- This is so we can potentially support things like https://github.com/modelcontextprotocol/registry/discussions/333 in future more easily, as I imagine we might want to.
This commit is contained in:
parent
64b7fc6408
commit
41aacc1846
1 changed files with 45 additions and 5 deletions
|
|
@ -10,6 +10,7 @@ var (
|
|||
|
||||
// Package validation errors
|
||||
ErrPackageNameHasSpaces = errors.New("package name cannot contain spaces")
|
||||
ErrReservedVersionString = errors.New("version string 'latest' is reserved and cannot be used")
|
||||
|
||||
// Remote validation errors
|
||||
ErrInvalidRemoteURL = errors.New("invalid remote URL")
|
||||
|
|
|
|||
Loading…
Reference in a new issue