Skip to content
Merged
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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Three separate packages ship from this repository, all from the same tag:
| ---------------- | ------------------------------- | ----------------------------------------------- |
| WordPress plugin | `humanmade/wp-pattern-library` | `composer require humanmade/wp-pattern-library` |
| CLI | `@humanmade/wp-pattern-library` | `npm install -D @humanmade/wp-pattern-library` |
| GitHub Action | `humanmade/wp-pattern-library` | `uses: humanmade/wp-pattern-library@v0.4.1` |
| GitHub Action | `humanmade/wp-pattern-library` | `uses: humanmade/wp-pattern-library@v0.4.2` |

The plugin belongs on the site you capture from. The CLI runs wherever you generate the library — your machine, or CI — so the site itself never needs Node. The action is a thin wrapper around the CLI for running the whole thing in a workflow; pin it to a released tag, as there is deliberately no moving `@v1` tag while the package is pre-1.0.

Expand Down
6 changes: 3 additions & 3 deletions docs/05-github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
node-version: 24

- name: Build the pattern library
uses: humanmade/wp-pattern-library@v0.4.1
uses: humanmade/wp-pattern-library@v0.4.2
with:
site-url: ${{ vars.PATTERN_LIBRARY_SITE }}
username: ${{ secrets.PATTERN_LIBRARY_WP_USER }}
Expand Down Expand Up @@ -124,7 +124,7 @@ To commit directly to a branch instead of opening a pull request, drop the last
| `version` | no | Version of the NPM package to run. See below. |

Leave `version` alone. By default the action runs the package version matching
the ref it was used at, so `@v0.4.1` runs CLI 0.4.1 and the two cannot drift.
the ref it was used at, so `@v0.4.2` runs CLI 0.4.2 and the two cannot drift.
Set it only to test an unreleased package against a released action. A branch or
commit ref has no version to read and falls back to `latest`.

Expand Down Expand Up @@ -248,7 +248,7 @@ Send the proxy's credentials alongside the application password:

```yaml
- name: Build the pattern library
uses: humanmade/wp-pattern-library@v0.4.1
uses: humanmade/wp-pattern-library@v0.4.2
with:
site-url: ${{ vars.PATTERN_LIBRARY_SITE }}
username: ${{ secrets.PATTERN_LIBRARY_WP_USER }}
Expand Down
2 changes: 1 addition & 1 deletion examples/refresh-pattern-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
node-version: 24

- name: Build the pattern library
uses: humanmade/wp-pattern-library@v0.4.1
uses: humanmade/wp-pattern-library@v0.4.2
with:
site-url: ${{ inputs.site_url || vars.PATTERN_LIBRARY_SITE }}
username: ${{ secrets.PATTERN_LIBRARY_WP_USER }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@humanmade/wp-pattern-library",
"version": "0.4.1",
"version": "0.4.2",
"description": "Generate a Markdown pattern library, with screenshots, from a WordPress site's registered block patterns.",
"license": "GPL-2.0-or-later",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: WP Pattern Library
* Description: Serves a manifest and isolated previews of the site's registered block patterns.
* Version: 0.4.1
* Version: 0.4.2
* License: GPL-2.0-or-later
* Requires PHP: 8.1
*
Expand Down
1 change: 1 addition & 0 deletions tests/php/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
$_tests_dir = getenv( 'WP_TESTS_DIR' ) ?: '/wordpress-phpunit';

if ( ! file_exists( $_tests_dir . '/includes/functions.php' ) ) {
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fwrite
fwrite(
STDERR,
"Could not find the WordPress test library at {$_tests_dir}.\n" .
Expand Down