-
Notifications
You must be signed in to change notification settings - Fork 39
feat: support "draft" as a first-class spec version target #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,12 +23,34 @@ export interface ConformanceCheck { | |
| logs?: string[]; | ||
| } | ||
|
|
||
| export type SpecVersion = | ||
| | '2025-03-26' | ||
| | '2025-06-18' | ||
| | '2025-11-25' | ||
| | 'draft' | ||
| | 'extension'; | ||
| export const DATED_SPEC_VERSIONS = [ | ||
| '2025-03-26', | ||
| '2025-06-18', | ||
| '2025-11-25' | ||
| ] as const; | ||
|
|
||
| export type DatedSpecVersion = (typeof DATED_SPEC_VERSIONS)[number]; | ||
|
|
||
| export const LATEST_SPEC_VERSION: DatedSpecVersion = '2025-11-25'; | ||
|
|
||
| // Mirrors LATEST_PROTOCOL_VERSION in the spec repo's schema/draft/schema.ts. | ||
| // Bump when that constant changes. | ||
| export const DRAFT_PROTOCOL_VERSION = 'DRAFT-2026-v1'; | ||
|
|
||
| export type SpecVersion = DatedSpecVersion | 'draft' | 'extension'; | ||
|
|
||
| export function specVersionToProtocolVersion( | ||
| version: SpecVersion | ||
| ): string | undefined { | ||
| if (version === 'draft') return DRAFT_PROTOCOL_VERSION; | ||
| // TODO(#253 follow-up): 'extension' isn't a spec version — it's a scenario | ||
| // category that got lumped into SpecVersion so `--spec-version extension` | ||
| // could reuse the filter plumbing. It has no corresponding wire | ||
| // protocolVersion. Split it out of this type when moving to | ||
| // introducedIn/removedIn tagging. | ||
| if (version === 'extension') return undefined; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. feels like something worth cleaning up, spec vs protocolVersion might get more confusing over time the longer we have both of these 🤔
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 we need a different way to refer to extensions, it doesn't super make sense to run "all extensions" as a selector. ties a bit into my comment on #114 about making it easier to selectively run scenarios via a config file |
||
| return version; | ||
| } | ||
|
|
||
| export interface ScenarioUrls { | ||
| serverUrl: string; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could consider consolildating a
VALID_VERSIONSconstant intypes.tsinstead of having 2 copies here and inclient.ts