[Blueprints] Support bundled Blueprint v2 resources - #3912
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.
Enables Blueprint v2 bundles to execute when lowered v2 steps reference execution-context files (bundled resources like ./plugin.php) by plumbing a bundle file reader through the v2 compiler into the existing v1 runner.
Changes:
- Allow
compileBlueprintForExecution()to accept Blueprint v2 bundles and provide astreamBundledFilereader to the v2 compilation pipeline. - Forward
streamBundledFilefrom the v2 runner into the v1 compiler when building the v1 runner. - Add a regression test that installs a bundled plugin file via a v2 bundle.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/playground/blueprints/src/tests/compile.spec.ts | Adds a test ensuring v2 bundle execution can resolve bundled execution-context resources. |
| packages/playground/blueprints/src/lib/v2/compile.ts | Introduces v2 compile options (streamBundledFile) and forwards them to v1 compilation at runtime. |
| packages/playground/blueprints/src/lib/v1/compile.ts | Widens v1 compile options parameter to accept streamBundledFile directly. |
| packages/playground/blueprints/src/lib/compile.ts | Removes v2 bundle rejection and wires bundle reading into v2 compilation via streamBundledFile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
force-pushed
the
support-blueprint-v2-bundle-resources
branch
from
July 4, 2026 01:52
30ed706 to
8982d25
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 it does
Allows
compileBlueprintForExecution()to run Blueprint v2 bundles whose lowered steps reference files from the Blueprint execution context, such as./plugin.php.Rationale
The v2 compiler already lowers execution-context paths to v1
bundledresources. After #3911, those lowered steps can run, but bundle inputs still lost their file reader before reaching the v1 resource layer. That meant a runnable v2 bundle could fail as if it were a standalone JSON file.Implementation
compileBlueprintForExecution().compileBlueprintV2()asstreamBundledFile.compileBlueprintV1()when it lazily builds the v1 runner.compileBlueprintV1()options to accept the existingstreamBundledFileoption directly, which the internal options type already supported.The test uses a bundled single-file plugin with
active: false. That keeps the assertion focused on bundle-resource resolution and avoids pulling in plugin activation or WordPress runtime behavior.Testing instructions
Part of #2592.