[Blueprints] Type Blueprint v2 version constraints - #3870
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Tightens Blueprint v2 TypeScript declaration types so that wordpressVersion/phpVersion constraint objects (e.g. { min, max }) require comparable version strings, while still allowing runtime labels at the top-level version fields.
Changes:
- Introduces specialized “comparable version” types for WordPress/PHP constraint object fields.
- Updates the Blueprint v2 schema types to use the new constraint-specific version types.
- Adds type-level tests covering valid constraints and expected type errors for non-comparable constraint values.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/playground/blueprints/src/tests/v2/blueprint-v2-declaration.spec.ts | Adds compile-time coverage for constraint object acceptance/rejection via satisfies and @ts-expect-error. |
| packages/playground/blueprints/src/lib/v2/wep-1-blueprint-v2-schema/appendix-B-data-sources.ts | Adds new constraint-focused version expression types to distinguish comparable versions from runtime labels. |
| packages/playground/blueprints/src/lib/v2/wep-1-blueprint-v2-schema/appendix-A-blueprint-v2-schema.ts | Switches constraint object fields to use the new comparable-version types and expands WordPress constraint shape. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
force-pushed
the
type/blueprint-v2-version-constraints
branch
from
July 2, 2026 19:59
a45e658 to
6b9bcfb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Tightens the Blueprint v2 declaration types for
wordpressVersionandphpVersionobject constraints.Why?
Top-level runtime labels like
beta,trunk,nightly, andnextare valid as direct version values, but constraint objects need comparable versions forminandmax. This makes that distinction visible to TypeScript consumers.Scope
Type-only. No runner behavior changes.
Testing
npm run format:uncommittedgit diff --checknpm exec nx run playground-blueprints:typechecknpm exec nx run playground-blueprints:lintnpm exec nx run playground-blueprints:test:vite -- --testFiles=packages/playground/blueprints/src/tests/v2/blueprint-v2-declaration.spec.tsPart of #2592.