Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ packages/playground/wordpress-builds/src/wordpress
packages/playground/wordpress-builds/public
packages/playground/sync/src/test/wp-*
packages/php-wasm/node/src/test/__test*
isomorphic-git
.docusaurus
*.timestamp-1678999213403.mjs
.local
.vscode
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/dist
/coverage
/node_modules
/isomorphic-git
/packages/php-wasm/node/public
/packages/php-wasm/web/public
/packages/php-wasm/compile/build-assets
Expand All @@ -12,6 +13,7 @@
__pycache__
*.timestamp-1678999213403.mjs
.local
.docusaurus
.nx
.vscode
rollup.d.ts
122 changes: 57 additions & 65 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,197 +4,189 @@ All notable changes to this project are documented in this file by a CI job
that runs on every NPM release. The file follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
format.

## [v2.0.19] (2025-09-11)
## [v2.0.19] (2025-09-11)

### PHP WebAssembly

- [Intl] Correct intl errors during compilation and build. ([#2613](https://github.com/WordPress/wordpress-playground/pull/2613))
- [Intl] Correct intl errors during compilation and build. ([#2613](https://github.com/WordPress/wordpress-playground/pull/2613))

### Bug Fixes

- Playground CLI: Skip WP install when using existing WP files. ([#2616](https://github.com/WordPress/wordpress-playground/pull/2616))
- Playground CLI: Skip WP install when using existing WP files. ([#2616](https://github.com/WordPress/wordpress-playground/pull/2616))

### Contributors

The following contributors merged PRs in this release:

@brandonpayton @mho22


## [v2.0.18] (2025-09-08)
## [v2.0.18] (2025-09-08)

### Documentation

- Added Gujarati Translation for Code.md File. ([#2606](https://github.com/WordPress/wordpress-playground/pull/2606))
- Tagalog translations of Blueprints -> Blueprint Data Format. ([#2609](https://github.com/WordPress/wordpress-playground/pull/2609))
- [Translations] Adding local environment section to pt-BR. ([#2572](https://github.com/WordPress/wordpress-playground/pull/2572))
- Added Gujarati Translation for Code.md File. ([#2606](https://github.com/WordPress/wordpress-playground/pull/2606))
- Tagalog translations of Blueprints -> Blueprint Data Format. ([#2609](https://github.com/WordPress/wordpress-playground/pull/2609))
- [Translations] Adding local environment section to pt-BR. ([#2572](https://github.com/WordPress/wordpress-playground/pull/2572))

### Bug Fixes

- Fixing header from Gujarati translation. ([#2614](https://github.com/WordPress/wordpress-playground/pull/2614))
- [Xdebug Bridge] Fix create hash error in xdebug bridge. ([#2612](https://github.com/WordPress/wordpress-playground/pull/2612))
- Fixing header from Gujarati translation. ([#2614](https://github.com/WordPress/wordpress-playground/pull/2614))
- [Xdebug Bridge] Fix create hash error in xdebug bridge. ([#2612](https://github.com/WordPress/wordpress-playground/pull/2612))

### Contributors

The following contributors merged PRs in this release:

@fellyph @mho22 @rollybueno @shail-mehta


## [v2.0.17] (2025-09-08)
## [v2.0.17] (2025-09-08)

### Documentation

- Add Japanese translations to Local Development. ([#2604](https://github.com/WordPress/wordpress-playground/pull/2604))
- Add Japanese translations to Local Development. ([#2604](https://github.com/WordPress/wordpress-playground/pull/2604))

### Various

- Added Gujarati Translation for Blueprints Tutorials Index.md file. ([#2607](https://github.com/WordPress/wordpress-playground/pull/2607))
- Added Gujarati Translation for How to Run Blueprints. ([#2611](https://github.com/WordPress/wordpress-playground/pull/2611))
- Added Gujarati Translation for Blueprints Tutorials Index.md file. ([#2607](https://github.com/WordPress/wordpress-playground/pull/2607))
- Added Gujarati Translation for How to Run Blueprints. ([#2611](https://github.com/WordPress/wordpress-playground/pull/2611))

### Contributors

The following contributors merged PRs in this release:

@shail-mehta @shimotmk


## [v2.0.16] (2025-09-04)
## [v2.0.16] (2025-09-04)

### Enhancements

- Add structured issue templates for bugs, enhancements, and documentation. ([#2571](https://github.com/WordPress/wordpress-playground/pull/2571))
- Allow installing multiple themes via URL, as required by parent/child themes. ([#2581](https://github.com/WordPress/wordpress-playground/pull/2581))
- Add structured issue templates for bugs, enhancements, and documentation. ([#2571](https://github.com/WordPress/wordpress-playground/pull/2571))
- Allow installing multiple themes via URL, as required by parent/child themes. ([#2581](https://github.com/WordPress/wordpress-playground/pull/2581))

### Blueprints

- Move blueprints.phar to the Blueprints package. ([#2471](https://github.com/WordPress/wordpress-playground/pull/2471))
- Move runBlueprintV2 to the blueprints package. ([#2594](https://github.com/WordPress/wordpress-playground/pull/2594))
- Move blueprints.phar to the Blueprints package. ([#2471](https://github.com/WordPress/wordpress-playground/pull/2471))
- Move runBlueprintV2 to the blueprints package. ([#2594](https://github.com/WordPress/wordpress-playground/pull/2594))

### Tools

- [XDebug Bridge] Highlight syntax of php scripts from mime type in Devtools. ([#2566](https://github.com/WordPress/wordpress-playground/pull/2566))
- [XDebug Bridge] Load files in Devtools before running PHP with Xdebug enabled. ([#2527](https://github.com/WordPress/wordpress-playground/pull/2527))
- [XDebug Bridge] Highlight syntax of php scripts from mime type in Devtools. ([#2566](https://github.com/WordPress/wordpress-playground/pull/2566))
- [XDebug Bridge] Load files in Devtools before running PHP with Xdebug enabled. ([#2527](https://github.com/WordPress/wordpress-playground/pull/2527))

### Documentation

- Added Gujarati Translation for Index.md File. ([#2576](https://github.com/WordPress/wordpress-playground/pull/2576))
- Added Gujarati Translation for JSON API and Function API File. ([#2577](https://github.com/WordPress/wordpress-playground/pull/2577))
- Adding french translation guide. ([#2541](https://github.com/WordPress/wordpress-playground/pull/2541))
- Adding more internal links between pages. ([#2499](https://github.com/WordPress/wordpress-playground/pull/2499))
- Adding reference to multiple theme URL parameter. ([#2593](https://github.com/WordPress/wordpress-playground/pull/2593))
- Adding runCLI section to the Playground CLI page. ([#2583](https://github.com/WordPress/wordpress-playground/pull/2583))
- Updating runCLI demo at wp-playground/cli README file. ([#2553](https://github.com/WordPress/wordpress-playground/pull/2553))
- Updating wp versions blueprints. ([#2573](https://github.com/WordPress/wordpress-playground/pull/2573))
- [Docs] Adding how to contribute to the WordPress Playground. ([#2597](https://github.com/WordPress/wordpress-playground/pull/2597))
- Added Gujarati Translation for Index.md File. ([#2576](https://github.com/WordPress/wordpress-playground/pull/2576))
- Added Gujarati Translation for JSON API and Function API File. ([#2577](https://github.com/WordPress/wordpress-playground/pull/2577))
- Adding french translation guide. ([#2541](https://github.com/WordPress/wordpress-playground/pull/2541))
- Adding more internal links between pages. ([#2499](https://github.com/WordPress/wordpress-playground/pull/2499))
- Adding reference to multiple theme URL parameter. ([#2593](https://github.com/WordPress/wordpress-playground/pull/2593))
- Adding runCLI section to the Playground CLI page. ([#2583](https://github.com/WordPress/wordpress-playground/pull/2583))
- Updating runCLI demo at wp-playground/cli README file. ([#2553](https://github.com/WordPress/wordpress-playground/pull/2553))
- Updating wp versions blueprints. ([#2573](https://github.com/WordPress/wordpress-playground/pull/2573))
- [Docs] Adding how to contribute to the WordPress Playground. ([#2597](https://github.com/WordPress/wordpress-playground/pull/2597))

### PHP WebAssembly

- Increase file locking safety. ([#2506](https://github.com/WordPress/wordpress-playground/pull/2506))
- [ php-wasm ] Add `intl` dynamic extension to @php-wasm/node ASYNCIFY #2501. ([#2557](https://github.com/WordPress/wordpress-playground/pull/2557))
- [PHP] Expose php.cli() on the web. ([#2590](https://github.com/WordPress/wordpress-playground/pull/2590))
- [PHP] Include CLI SAPI in the web PHP.wasm build. ([#2589](https://github.com/WordPress/wordpress-playground/pull/2589))
- [PHP] Inline rotatePHPRuntime() into the PHP class. ([#2559](https://github.com/WordPress/wordpress-playground/pull/2559))
- [PHP] Rotate the spawn handler in hotSwapPHPRuntime(). ([#2588](https://github.com/WordPress/wordpress-playground/pull/2588))
- Increase file locking safety. ([#2506](https://github.com/WordPress/wordpress-playground/pull/2506))
- [ php-wasm ] Add `intl` dynamic extension to @php-wasm/node ASYNCIFY #2501. ([#2557](https://github.com/WordPress/wordpress-playground/pull/2557))
- [PHP] Expose php.cli() on the web. ([#2590](https://github.com/WordPress/wordpress-playground/pull/2590))
- [PHP] Include CLI SAPI in the web PHP.wasm build. ([#2589](https://github.com/WordPress/wordpress-playground/pull/2589))
- [PHP] Inline rotatePHPRuntime() into the PHP class. ([#2559](https://github.com/WordPress/wordpress-playground/pull/2559))
- [PHP] Rotate the spawn handler in hotSwapPHPRuntime(). ([#2588](https://github.com/WordPress/wordpress-playground/pull/2588))

### Website

- A specific error when a GitHub artifact is not found. ([#2596](https://github.com/WordPress/wordpress-playground/pull/2596))
- Apply base URLs to relative redirection URLs. ([#2595](https://github.com/WordPress/wordpress-playground/pull/2595))
- A specific error when a GitHub artifact is not found. ([#2596](https://github.com/WordPress/wordpress-playground/pull/2596))
- Apply base URLs to relative redirection URLs. ([#2595](https://github.com/WordPress/wordpress-playground/pull/2595))

### Various

- Add Japanese translations to Quick Start Guide for Developers. ([#2587](https://github.com/WordPress/wordpress-playground/pull/2587))
- Add Japanese translations to Quick Start Guide for Developers. ([#2587](https://github.com/WordPress/wordpress-playground/pull/2587))

### Contributors

The following contributors merged PRs in this release:

@adamziel @brandonpayton @dd32 @fellyph @mho22 @shail-mehta @shimotmk


## [v2.0.15] (2025-09-01)
## [v2.0.15] (2025-09-01)

### Documentation

- Added Gujarati Translation for intro-devs.md file. ([#2574](https://github.com/WordPress/wordpress-playground/pull/2574))
- Added Gujarati Translation for intro-devs.md file. ([#2574](https://github.com/WordPress/wordpress-playground/pull/2574))

### Experiments


#### File Synchronization

- [Website] Renaming stored Playgrounds. ([#2486](https://github.com/WordPress/wordpress-playground/pull/2486))
- [Website] Renaming stored Playgrounds. ([#2486](https://github.com/WordPress/wordpress-playground/pull/2486))

### Bug Fixes

- Fix error from adding blank target to external links. ([#2575](https://github.com/WordPress/wordpress-playground/pull/2575))
- Fix error from adding blank target to external links. ([#2575](https://github.com/WordPress/wordpress-playground/pull/2575))

### Contributors

The following contributors merged PRs in this release:

@adamziel @draganescu @shail-mehta


## [v2.0.14] (2025-08-29)
## [v2.0.14] (2025-08-29)

### PHP WebAssembly

- Add test to verify mount() correctly handles files (closes #503). ([#2564](https://github.com/WordPress/wordpress-playground/pull/2564))
- Use unique tmp.zip filename in unzipFile() to avoid conflicts in async calls. ([#2567](https://github.com/WordPress/wordpress-playground/pull/2567))
- [ php-wasm ] Add `intl` dynamic extension to @php-wasm/node JSPI. ([#2501](https://github.com/WordPress/wordpress-playground/pull/2501))
- [WordPress][CLI] Allow requesting internal URLs via http_request_host_is_external. ([#2569](https://github.com/WordPress/wordpress-playground/pull/2569))
- Add test to verify mount() correctly handles files (closes #503). ([#2564](https://github.com/WordPress/wordpress-playground/pull/2564))
- Use unique tmp.zip filename in unzipFile() to avoid conflicts in async calls. ([#2567](https://github.com/WordPress/wordpress-playground/pull/2567))
- [ php-wasm ] Add `intl` dynamic extension to @php-wasm/node JSPI. ([#2501](https://github.com/WordPress/wordpress-playground/pull/2501))
- [WordPress][CLI] Allow requesting internal URLs via http_request_host_is_external. ([#2569](https://github.com/WordPress/wordpress-playground/pull/2569))

### Various

- Tagalog translations of Blueprints -> Tutorial -> Build Your 1st Blueprint. ([#2546](https://github.com/WordPress/wordpress-playground/pull/2546))
- Tagalog translations of Blueprints -> Tutorial -> Build Your 1st Blueprint. ([#2546](https://github.com/WordPress/wordpress-playground/pull/2546))

### Contributors

The following contributors merged PRs in this release:

@adamziel @jnealey88 @mho22 @rollybueno


## [v2.0.13] (2025-08-26)
## [v2.0.13] (2025-08-26)

### Enhancements

- [CLI] --site-url option for Playground CLI. ([#2558](https://github.com/WordPress/wordpress-playground/pull/2558))
- [CLI] --site-url option for Playground CLI. ([#2558](https://github.com/WordPress/wordpress-playground/pull/2558))

### Tools

- [XDebug Bridge] Fetch all array keys when inspecting an array. ([#2409](https://github.com/WordPress/wordpress-playground/pull/2409))
- [XDebug Bridge] Fetch all array keys when inspecting an array. ([#2409](https://github.com/WordPress/wordpress-playground/pull/2409))

### PHP WebAssembly

- [PHP web] Export setErrNo() to make `less` work as pager. ([#2554](https://github.com/WordPress/wordpress-playground/pull/2554))
- [PHP web] Export setErrNo() to make `less` work as pager. ([#2554](https://github.com/WordPress/wordpress-playground/pull/2554))

### Website

- [Web] tolerate empty e.target in addTargetBlankToExternalLinks. ([#2555](https://github.com/WordPress/wordpress-playground/pull/2555))
- [Web] tolerate empty e.target in addTargetBlankToExternalLinks. ([#2555](https://github.com/WordPress/wordpress-playground/pull/2555))

### Bug Fixes

- Playground CLI: Wire up execution modes for Blueprints v2. ([#2519](https://github.com/WordPress/wordpress-playground/pull/2519))
- Playground CLI: Wire up execution modes for Blueprints v2. ([#2519](https://github.com/WordPress/wordpress-playground/pull/2519))

### Reliability

- [php-wasm-logger] Filter logs by severity in Logger and assign severity based on verbosity argument in CLIs. ([#2436](https://github.com/WordPress/wordpress-playground/pull/2436))
- [php-wasm-logger] Filter logs by severity in Logger and assign severity based on verbosity argument in CLIs. ([#2436](https://github.com/WordPress/wordpress-playground/pull/2436))

### Various

- Added Gujarati Translation for Index.md file. ([#2550](https://github.com/WordPress/wordpress-playground/pull/2550))
- Use SQLite AST driver also with Blueprints v2. ([#2538](https://github.com/WordPress/wordpress-playground/pull/2538))
- Added Gujarati Translation for Index.md file. ([#2550](https://github.com/WordPress/wordpress-playground/pull/2550))
- Use SQLite AST driver also with Blueprints v2. ([#2538](https://github.com/WordPress/wordpress-playground/pull/2538))

### Contributors

The following contributors merged PRs in this release:

@adamziel @brandonpayton @JanJakes @mho22 @shail-mehta


## [v2.0.12] (2025-08-25)

### Enhancements
Expand Down
8 changes: 2 additions & 6 deletions packages/playground/blueprints/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ export type {
BlueprintDeclaration,
PHPConstants,
} from './lib/blueprint';
export {
compileBlueprint,
getBlueprintDeclaration,
isBlueprintBundle,
runBlueprintSteps,
} from './lib/compile';
export { compileBlueprint, runBlueprintSteps } from './lib/compile';
export type {
CompileBlueprintOptions,
CompiledBlueprint,
Expand Down Expand Up @@ -48,6 +43,7 @@ export { getV2Runner } from './lib/v2/get-v2-runner';
export { runBlueprintV2 } from './lib/v2/run-blueprint-v2';
export type { BlueprintMessage } from './lib/v2/run-blueprint-v2';

export { BlueprintReflection, isBlueprintBundle } from './lib/reflection';
export { resolveRemoteBlueprint } from './lib/resolve-remote-blueprint';
export { wpContentFilesExcludedFromExport } from './lib/utils/wp-content-files-excluded-from-exports';

Expand Down
30 changes: 7 additions & 23 deletions packages/playground/blueprints/src/lib/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import type {
BlueprintBundle,
ExtraLibrary,
StreamBundledFile,
Blueprint,
} from './blueprint';
import { logger } from '@php-wasm/logger';

Expand All @@ -41,6 +40,7 @@ const keyedStepHandlers = {
*/
import blueprintValidator from '../../public/blueprint-schema-validator';
import { defaultWpCliPath, defaultWpCliResource } from './steps/wp-cli';
import { BlueprintReflection } from './reflection';

export type CompiledStep = (php: UniversalPHP) => Promise<void> | void;

Expand Down Expand Up @@ -95,32 +95,16 @@ export async function compileBlueprint(
...options,
};

let blueprint: BlueprintDeclaration;
if (isBlueprintBundle(input)) {
blueprint = await getBlueprintDeclaration(input);
const reflection = await BlueprintReflection.create(input);

const blueprintDeclaration = reflection.getDeclaration();
if (reflection.isBundle()) {
finalOptions.streamBundledFile = function (...args: [any]) {
return input.read(...args);
return (input as BlueprintBundle).read(...args);
};
} else {
blueprint = input as BlueprintDeclaration;
}

return compileBlueprintJson(blueprint, finalOptions);
}

export function isBlueprintBundle(input: any): input is BlueprintBundle {
return input && 'read' in input && typeof input.read === 'function';
}

export async function getBlueprintDeclaration(
blueprint: Blueprint
): Promise<BlueprintDeclaration> {
if (!isBlueprintBundle(blueprint)) {
return blueprint;
}
const blueprintFile = await blueprint.read('blueprint.json');
const blueprintText = await blueprintFile.text();
return JSON.parse(blueprintText);
return compileBlueprintJson(blueprintDeclaration, finalOptions);
}

/**
Expand Down
Loading
Loading