From 7101f128d4a96b6e6f377f66edad33cf38790f65 Mon Sep 17 00:00:00 2001 From: "K. Adam White" Date: Thu, 10 Sep 2026 14:28:02 -0700 Subject: [PATCH 1/2] Suppress PHP warning on fwrite call in test code If a project lints this repository using a minimum PHPCS standard, this fwrite call can get called out. Proactively ignoring the directive within this repository reduces downstream noise. --- tests/php/bootstrap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/php/bootstrap.php b/tests/php/bootstrap.php index 85f7d50..9f6a43c 100644 --- a/tests/php/bootstrap.php +++ b/tests/php/bootstrap.php @@ -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" . From f491831861e62e9b15853a95d86484959d1c85d9 Mon Sep 17 00:00:00 2001 From: "K. Adam White" Date: Thu, 10 Sep 2026 14:29:38 -0700 Subject: [PATCH 2/2] Bump version to 0.4.2 in all locations --- README.md | 2 +- docs/05-github-action.md | 6 +++--- examples/refresh-pattern-library.yml | 2 +- package.json | 2 +- plugin.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d51baee..11a6b80 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/05-github-action.md b/docs/05-github-action.md index 516a759..4467c1b 100644 --- a/docs/05-github-action.md +++ b/docs/05-github-action.md @@ -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 }} @@ -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`. @@ -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 }} diff --git a/examples/refresh-pattern-library.yml b/examples/refresh-pattern-library.yml index 43f84ed..9ab5f94 100644 --- a/examples/refresh-pattern-library.yml +++ b/examples/refresh-pattern-library.yml @@ -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 }} diff --git a/package.json b/package.json index 139312f..62a4cfd 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/plugin.php b/plugin.php index d342db1..3c6c41c 100644 --- a/plugin.php +++ b/plugin.php @@ -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 *