From ac5e197157e1e0ca170eb353af86a24733afe0b6 Mon Sep 17 00:00:00 2001 From: Aryan Jasala Date: Thu, 1 Oct 2026 23:06:43 +0530 Subject: [PATCH 1/3] chore(release): cut wp-phpcs and wp-phpstan 1.0.1 and the npm package versions - rtcamp/wp-phpcs and rtcamp/wp-phpstan 1.0.1: LICENSE, README and Packagist metadata only, so a patch. Released by the v1.0.1 tag. - @rtcamp/eslint-config, @rtcamp/stylelint-config and @rtcamp/tailwind-config 1.1.0: engines.node raised to >=22.19. - @rtcamp/wp-tooling 2.0.0: scaffolds target rtcamp/wp-primitives ^2.0 (breaking), plus everything else under Unreleased. None of the npm packages is published yet, and each CHANGELOG already records 1.0.0 as the 2026-07-30 state, so the first publish uses these versions. npm version also normalised the files array indentation in wp-tooling's package.json. --- composer-packages/phpcs/CHANGELOG.md | 2 ++ composer-packages/phpstan/CHANGELOG.md | 2 ++ node-packages/eslint-config/CHANGELOG.md | 2 ++ node-packages/eslint-config/package.json | 2 +- node-packages/stylelint-config/CHANGELOG.md | 2 ++ node-packages/stylelint-config/package.json | 2 +- node-packages/tailwind-config/CHANGELOG.md | 2 ++ node-packages/tailwind-config/package.json | 2 +- node-packages/wp-tooling/CHANGELOG.md | 2 ++ node-packages/wp-tooling/package.json | 16 ++++++++-------- package-lock.json | 8 ++++---- 11 files changed, 27 insertions(+), 15 deletions(-) diff --git a/composer-packages/phpcs/CHANGELOG.md b/composer-packages/phpcs/CHANGELOG.md index 178b5c6..f013937 100644 --- a/composer-packages/phpcs/CHANGELOG.md +++ b/composer-packages/phpcs/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## [1.0.1] - 2026-10-01 + ### Added - `homepage`, `authors` and `support` metadata in `composer.json`, so the Packagist diff --git a/composer-packages/phpstan/CHANGELOG.md b/composer-packages/phpstan/CHANGELOG.md index 9365eff..63a6019 100644 --- a/composer-packages/phpstan/CHANGELOG.md +++ b/composer-packages/phpstan/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## [1.0.1] - 2026-10-01 + ### Added - `homepage`, `authors` and `support` metadata in `composer.json`, so the Packagist diff --git a/node-packages/eslint-config/CHANGELOG.md b/node-packages/eslint-config/CHANGELOG.md index 7d08709..9c5c3bf 100644 --- a/node-packages/eslint-config/CHANGELOG.md +++ b/node-packages/eslint-config/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## [1.1.0] - 2026-10-01 + ### Changed - `engines.node` raised to `>=22.19` to match the rest of the monorepo (`@rtcamp/wp-tooling` needs it for Lighthouse 13). diff --git a/node-packages/eslint-config/package.json b/node-packages/eslint-config/package.json index 71e1fa1..6ad5fac 100644 --- a/node-packages/eslint-config/package.json +++ b/node-packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@rtcamp/eslint-config", - "version": "1.0.0", + "version": "1.1.0", "description": "rtCamp shareable ESLint flat config for WordPress projects — extends @wordpress/eslint-plugin.", "license": "GPL-2.0-or-later", "author": "rtCamp", diff --git a/node-packages/stylelint-config/CHANGELOG.md b/node-packages/stylelint-config/CHANGELOG.md index 66aef49..6e37353 100644 --- a/node-packages/stylelint-config/CHANGELOG.md +++ b/node-packages/stylelint-config/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## [1.1.0] - 2026-10-01 + ### Changed - `engines.node` raised to `>=22.19` to match the rest of the monorepo (`@rtcamp/wp-tooling` needs it for Lighthouse 13). diff --git a/node-packages/stylelint-config/package.json b/node-packages/stylelint-config/package.json index d363406..48c18a5 100644 --- a/node-packages/stylelint-config/package.json +++ b/node-packages/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@rtcamp/stylelint-config", - "version": "1.0.0", + "version": "1.1.0", "description": "rtCamp shareable Stylelint config for WordPress projects — extends @wordpress/stylelint-config (+ scss).", "license": "GPL-2.0-or-later", "author": "rtCamp", diff --git a/node-packages/tailwind-config/CHANGELOG.md b/node-packages/tailwind-config/CHANGELOG.md index 24aeedf..a7c94f7 100644 --- a/node-packages/tailwind-config/CHANGELOG.md +++ b/node-packages/tailwind-config/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## [1.1.0] - 2026-10-01 + ### Changed - `engines.node` raised to `>=22.19` to match the rest of the monorepo (`@rtcamp/wp-tooling` needs it for Lighthouse 13). diff --git a/node-packages/tailwind-config/package.json b/node-packages/tailwind-config/package.json index a923005..4034df4 100644 --- a/node-packages/tailwind-config/package.json +++ b/node-packages/tailwind-config/package.json @@ -1,6 +1,6 @@ { "name": "@rtcamp/tailwind-config", - "version": "1.0.0", + "version": "1.1.0", "description": "rtCamp shareable Tailwind CSS v4 PostCSS config + theme.json→Tailwind webpack plugin for WordPress projects.", "license": "GPL-2.0-or-later", "author": "rtCamp", diff --git a/node-packages/wp-tooling/CHANGELOG.md b/node-packages/wp-tooling/CHANGELOG.md index 9ebc433..9852d71 100644 --- a/node-packages/wp-tooling/CHANGELOG.md +++ b/node-packages/wp-tooling/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## [2.0.0] - 2026-10-01 + ### Added - `detect-changes --strict` (library: `detectChanges({ strict: true })`): a failed `git diff` exits 1 (throws the new `DetectChangesError`, code `EDIFFFAIL`, exported from `@rtcamp/wp-tooling/ci`) instead of reporting zero changes, which skipped every job gated on the counts and left the run green. Off by default, so existing callers see no change; CI callers should turn it on. The stderr wording keeps the "git diff failed" phrase that rtCamp/wp-shared-workflows matches today. diff --git a/node-packages/wp-tooling/package.json b/node-packages/wp-tooling/package.json index 0d7cc9f..975598a 100644 --- a/node-packages/wp-tooling/package.json +++ b/node-packages/wp-tooling/package.json @@ -1,7 +1,7 @@ { "name": "@rtcamp/wp-tooling", "description": "Shared tooling for rtCamp WordPress plugin scaffolding — TTY UI, scaffold registry, release scripts, git hooks, CI helpers, version monitor.", - "version": "1.0.0", + "version": "2.0.0", "author": "rtCamp", "bin": { "wp-tooling": "./bin/wp-tooling.js" @@ -31,13 +31,13 @@ "./perf": "./src/perf/index.js", "./version-monitor": "./src/version-monitor/index.js" }, - "files": [ - "bin", - "src", - "scaffolds", - "docs", - "README.md" - ], + "files": [ + "bin", + "src", + "scaffolds", + "docs", + "README.md" + ], "homepage": "https://github.com/rtCamp/wp-tooling#readme", "keywords": [ "cli", diff --git a/package-lock.json b/package-lock.json index eee16b1..34ce533 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12610,7 +12610,7 @@ }, "node-packages/eslint-config": { "name": "@rtcamp/eslint-config", - "version": "1.0.0", + "version": "1.1.0", "license": "GPL-2.0-or-later", "devDependencies": { "eslint-import-resolver-typescript": "^4.4.4", @@ -12634,7 +12634,7 @@ }, "node-packages/stylelint-config": { "name": "@rtcamp/stylelint-config", - "version": "1.0.0", + "version": "1.1.0", "license": "GPL-2.0-or-later", "devDependencies": { "@rtcamp/eslint-config": "^1.0.0", @@ -12651,7 +12651,7 @@ }, "node-packages/tailwind-config": { "name": "@rtcamp/tailwind-config", - "version": "1.0.0", + "version": "1.1.0", "license": "GPL-2.0-or-later", "devDependencies": { "@rtcamp/eslint-config": "^1.0.0", @@ -12667,7 +12667,7 @@ }, "node-packages/wp-tooling": { "name": "@rtcamp/wp-tooling", - "version": "1.0.0", + "version": "2.0.0", "license": "GPL-2.0-or-later", "bin": { "wp-tooling": "bin/wp-tooling.js" From d1164fb79baa94627501032fb6745d896c54bfb1 Mon Sep 17 00:00:00 2001 From: Aryan Jasala Date: Thu, 1 Oct 2026 23:10:58 +0530 Subject: [PATCH 2/3] docs(npm): rewrite the wp-tooling README and add headers to the config READMEs npm stores each README at publish time, so these are the package pages. - @rtcamp/wp-tooling: describes what ships (the 14 commands, the 46 scaffolds by group and the 10 library entry points), adds a quick start, requirements and documentation links, installs with --save-dev, and drops the line that listed the lint configs as part of this package. Links are absolute, and package.json gains repository.directory, so they resolve on npmjs.com. - eslint-config, stylelint-config and tailwind-config: the same header as the other rtCamp packages (license, npm version and Node badges, one-line summary) and the Node.js 22.19+ requirement. --- node-packages/eslint-config/README.md | 18 +++- node-packages/stylelint-config/README.md | 18 +++- node-packages/tailwind-config/README.md | 20 +++- node-packages/wp-tooling/README.md | 124 +++++++++++++++++++---- node-packages/wp-tooling/package.json | 3 +- 5 files changed, 158 insertions(+), 25 deletions(-) diff --git a/node-packages/eslint-config/README.md b/node-packages/eslint-config/README.md index 6e3089c..3df316d 100644 --- a/node-packages/eslint-config/README.md +++ b/node-packages/eslint-config/README.md @@ -1,6 +1,18 @@ -# @rtcamp/eslint-config +

@rtcamp/eslint-config

-rtCamp's shareable **ESLint flat config** for WordPress projects. Extends +

+ License: GPL-2.0-or-later + npm version + Node 22.19+ +

+ +

+ rtCamp's shareable ESLint flat config for WordPress projects. +

+ +--- + +It extends `@wordpress/eslint-plugin` (recommended), `@eslint-community/eslint-plugin-eslint-comments`, and `eslint-plugin-jest` (scoped to `**/*.test.js`). @@ -8,6 +20,8 @@ rtCamp's shareable **ESLint flat config** for WordPress projects. Extends ## Install +Requires Node.js 22.19+. + ```bash npm install --save-dev @rtcamp/eslint-config eslint @wordpress/eslint-plugin ``` diff --git a/node-packages/stylelint-config/README.md b/node-packages/stylelint-config/README.md index 59b0514..2332366 100644 --- a/node-packages/stylelint-config/README.md +++ b/node-packages/stylelint-config/README.md @@ -1,10 +1,24 @@ -# @rtcamp/stylelint-config +

@rtcamp/stylelint-config

-rtCamp's shareable **Stylelint config** for WordPress projects. Extends +

+ License: GPL-2.0-or-later + npm version + Node 22.19+ +

+ +

+ rtCamp's shareable Stylelint config for WordPress projects. +

+ +--- + +It extends `@wordpress/stylelint-config` and `@wordpress/stylelint-config/scss`. ## Install +Requires Node.js 22.19+. + ```bash npm install --save-dev @rtcamp/stylelint-config stylelint @wordpress/stylelint-config stylelint-scss ``` diff --git a/node-packages/tailwind-config/README.md b/node-packages/tailwind-config/README.md index 76e7a99..d5035e1 100644 --- a/node-packages/tailwind-config/README.md +++ b/node-packages/tailwind-config/README.md @@ -1,10 +1,24 @@ -# @rtcamp/tailwind-config +

@rtcamp/tailwind-config

-rtCamp's Tailwind CSS v4 integration for WordPress themes: a shareable PostCSS config plus a -webpack plugin that keeps Tailwind theme tokens in sync with `theme.json`. +

+ License: GPL-2.0-or-later + npm version + Node 22.19+ +

+ +

+ rtCamp's Tailwind CSS v4 PostCSS config and theme.json sync for WordPress themes. +

+ +--- + +It ships a shareable PostCSS config plus a webpack plugin that keeps Tailwind theme tokens in +sync with `theme.json`. ## Install +Requires Node.js 22.19+. + ```bash npm install --save-dev @rtcamp/tailwind-config tailwindcss @tailwindcss/postcss ``` diff --git a/node-packages/wp-tooling/README.md b/node-packages/wp-tooling/README.md index bdeb172..5da22ea 100644 --- a/node-packages/wp-tooling/README.md +++ b/node-packages/wp-tooling/README.md @@ -1,32 +1,122 @@ -# @rtcamp/wp-tooling +

@rtcamp/wp-tooling

-Shared tooling for rtCamp WordPress projects. Consumed as an npm package by every rtCamp skeleton — plugin and theme alike. +

+ License: GPL-2.0-or-later + npm version + Node 22.19+ + Zero runtime dependencies +

+ +

+ The CLI and library behind rtCamp's WordPress starters: scaffolding, project setup, releases, + git hooks, CI helpers and accessibility and performance checks. +

+ +--- -## What's inside +`@rtcamp/wp-tooling` is what [plugin-elementary](https://github.com/rtCamp/plugin-elementary) and +[theme-elementary](https://github.com/rtCamp/theme-elementary) run for `npm run init`, `release:*` +and their git hooks. It works in any WordPress plugin or theme, and it has no runtime +dependencies. -- TTY UI toolkit — Wizard, prompts, selects, spinner (zero-dependency) -- ScaffoldRegistry — auto-discovers `scaffold.json` files in consuming repos -- Release scripts — version bump, changelog, package zip -- Git hooks — commit-msg, pre-commit installer -- Lint configs — `@rtcamp/eslint-config`, `@rtcamp/stylelint-config` -- CI helpers — `detect-changes` (bucket changed files) and `coverage-gate` (fail a PR when too few of its changed lines are covered; reads Clover or LCOV) -- Version monitor — detectors, updaters, reporters for WordPress / PHP / Node +Requirements: -## Development +- Node.js 22.19+ +- A WordPress plugin or theme project. PHP scaffolds target [`rtcamp/wp-primitives`](https://github.com/rtCamp/wp-primitives) `^2.0`. -See [`AGENTS.md`](../../AGENTS.md) at the monorepo root for architecture rules, coding -standards, testing commands, and the release/subtree-split workflow. Contribution -guidelines live in [`CONTRIBUTING.md`](../../CONTRIBUTING.md). +## Install -## Install (consumer side) +```bash +npm install --save-dev @rtcamp/wp-tooling +``` + +## Quick start ```bash -npm install @rtcamp/wp-tooling +npx wp-tooling list # every scaffold in the catalogue +npx wp-tooling add wp/cpt --slug=book --singular=Book --plural=Books +npx wp-tooling features --enable tailwind # toggle a feature the project declares (both starters do) +npx wp-tooling --help # options for any command ``` +## Commands + +| Command | What it does | +| --- | --- | +| `add` | Add a scaffold to the current project, e.g. `wp-tooling add wp/cli --name=qm-export` | +| `list` | List every scaffold in the merged catalogue | +| `validate` | Validate scaffold manifests | +| `features` | Turn optional project features on or off, e.g. `--enable tailwind` | +| `cache` | Manage the on-disk cache of remote scaffold templates | +| `install-hooks` | Install the `commit-msg` and `pre-commit` git hooks | +| `release:bump` | Bump the version in `package.json`, `composer.json` and the plugin or theme header | +| `release:changelog` | Finalise the `## Unreleased` section of `CHANGELOG.md` | +| `release:zip` | Build a `.distignore`-aware `dist/-.zip` | +| `detect-changes` | Bucket the files a change touches, so CI runs only the jobs it needs | +| `coverage-gate` | Fail when too few of a pull request's changed lines are covered (Clover or LCOV) | +| `a11y` | Run pa11y-ci and report normalised accessibility violations | +| `perf` | Collect Core Web Vitals and Lighthouse scores, plus optional server profiling | +| `version-monitor` | Detect and apply WordPress, PHP and Node updates that Dependabot misses | + +## Scaffolds + +46 scaffolds; the code scaffolds also generate their tests: + +| Group | Scaffolds | +| --- | --- | +| `wp/*` | admin page, dynamic and interactive blocks, WP-CLI command, custom post type, cron, module, registrable, REST controller, settings page, shortcode, taxonomy, user role | +| `wp-api/*` | block bindings, script modules, speculative loading | +| `utility/*` | wiring for the wp-primitives cache, feature selector, logger, timer and transients | +| `setup/*` | Claude skills, EditorConfig, Jest, pa11y, performance, PHPUnit, PSR-4, Tailwind | +| `lint/*` | ESLint, Stylelint, PHPCS (core, full and VIP), PHPStan, i18n | +| `ci/*` | GitHub Actions for lint, tests, build, build artifacts, accessibility and WordPress.org deploys | + +Run `npx wp-tooling list` for the exact ids and `npx wp-tooling add --help` for each one's inputs. + +## Library + +The same functionality is available from code: + +| Entry point | Use | +| --- | --- | +| `@rtcamp/wp-tooling/init` | The setup engine behind `npm run init` in both starters | +| `@rtcamp/wp-tooling/scaffolds` | Scaffold registry, rendering and validation | +| `@rtcamp/wp-tooling/features` | Feature toggles | +| `@rtcamp/wp-tooling/release` | Version bump, changelog and zip | +| `@rtcamp/wp-tooling/hooks` | Git hook installer | +| `@rtcamp/wp-tooling/ci` | `detectChanges`, `computeGate` and their parsers and errors | +| `@rtcamp/wp-tooling/a11y` | `runA11y` | +| `@rtcamp/wp-tooling/perf` | Performance runner | +| `@rtcamp/wp-tooling/version-monitor` | Detectors, updaters and reporters | +| `@rtcamp/wp-tooling/ui` | Zero-dependency terminal UI: wizard, prompts, selects, spinner | + +## Documentation + +- [Authoring scaffolds](https://github.com/rtCamp/wp-tooling/blob/main/node-packages/wp-tooling/docs/authoring-scaffolds.md) +- [Examples](https://github.com/rtCamp/wp-tooling/blob/main/node-packages/wp-tooling/docs/examples.md) +- [AI orchestration](https://github.com/rtCamp/wp-tooling/blob/main/node-packages/wp-tooling/docs/ai-orchestration.md) +- [The wp-primitives contract](https://github.com/rtCamp/wp-tooling/blob/main/node-packages/wp-tooling/docs/wp-primitives-contract.md) +- [Editor setup](https://github.com/rtCamp/wp-tooling/blob/main/node-packages/wp-tooling/docs/editor-setup.md) +- [CHANGELOG](https://github.com/rtCamp/wp-tooling/blob/main/node-packages/wp-tooling/CHANGELOG.md) + +## Related packages + +[`@rtcamp/eslint-config`](https://www.npmjs.com/package/@rtcamp/eslint-config), +[`@rtcamp/stylelint-config`](https://www.npmjs.com/package/@rtcamp/stylelint-config) and +[`@rtcamp/tailwind-config`](https://www.npmjs.com/package/@rtcamp/tailwind-config) are separate +packages from the same repository. The scaffolds install them when you add the matching lint or +setup scaffold. + +## Contributing + +This package lives in the [rtCamp/wp-tooling](https://github.com/rtCamp/wp-tooling) monorepo. See +[AGENTS.md](https://github.com/rtCamp/wp-tooling/blob/main/AGENTS.md) for architecture and coding +rules and [CONTRIBUTING.md](https://github.com/rtCamp/wp-tooling/blob/main/CONTRIBUTING.md) for +setup, tests and the pull request checklist. + ## License -GPL-2.0-or-later. See [LICENSE](./LICENSE). +GPL-2.0-or-later. See [LICENSE](https://github.com/rtCamp/wp-tooling/blob/main/node-packages/wp-tooling/LICENSE).

rtCamp diff --git a/node-packages/wp-tooling/package.json b/node-packages/wp-tooling/package.json index 975598a..4eefda8 100644 --- a/node-packages/wp-tooling/package.json +++ b/node-packages/wp-tooling/package.json @@ -54,7 +54,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rtCamp/wp-tooling.git" + "url": "git+https://github.com/rtCamp/wp-tooling.git", + "directory": "node-packages/wp-tooling" }, "scripts": { "check": "npm run lint && npm test", From 96e1f8528743f17acc22ef3fb953535055b9747b Mon Sep 17 00:00:00 2001 From: Aryan Jasala Date: Thu, 1 Oct 2026 23:15:41 +0530 Subject: [PATCH 3/3] docs: keep the release notes and AGENTS.md true after the first publish - The wp-tooling 2.0.0 notes said rtcamp/wp-phpcs is not on Packagist and that the config packages 404 on npm. Both stop being true with this release, so the two sentences now describe the state when each fix was made. - AGENTS.md described npm releases as subtree-split only and said npm install @rtcamp/wp-tooling does not resolve from the registry. It now says the npm packages publish to npmjs.com with their own versions, keeps the npm/ branches as the git-URL path, and warns never to use a v* tag for an npm release. --- AGENTS.md | 6 +++--- node-packages/wp-tooling/CHANGELOG.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f5d3500..c8125fb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,8 +37,8 @@ npm test # Jest acro ## Architectural decisions - **Package layering**: `node-packages/*` (npm workspaces, `@rtcamp` scope) and `composer-packages/*` (Composer, `rtcamp` vendor) are independent ecosystems sharing one repo for coordinated development only — nothing internal is shared or imported across that boundary. -- **Release via subtree split, not a plain publish**: both ecosystems release with `git subtree split --prefix=

`. Composer packages split to standalone mirror repos (`rtCamp/wp-phpcs`, `rtCamp/wp-phpstan`) on a `v*` tag push; npm packages split to branches of this same repo (`npm/`) on every push to `main`. -- **The npm split is a temporary stopgap**: today `@rtcamp/wp-tooling` and friends install only via `git+https://github.com/rtCamp/wp-tooling.git#npm/` — there is no public-registry publish yet. A future workflow will `npm publish` directly; nothing here is meant to change in anticipation of that. +- **Composer packages release by subtree split**: a `v*` tag push runs `release-php.yml`, which splits each `composer-packages/*` directory with `git subtree split --prefix=` to its read-only mirror repo (`rtCamp/wp-phpcs`, `rtCamp/wp-phpstan`) and tags it there for Packagist. +- **npm packages publish to the npm registry**: each `node-packages/*` workspace is published to npmjs.com as `@rtcamp/` (public access, set in its `publishConfig`), with its own version. Every push to `main` also splits each workspace to an `npm/` branch of this repo, which keeps serving git-URL installs for projects that have not moved to registry versions. - **Dependency discipline differs by package type**: `wp-tooling` ships zero runtime dependencies (full banned-package list in its own `AGENTS.md`); the three config packages instead rely on `peerDependencies` — consumers bring their own `eslint`/`stylelint`/`tailwindcss`. - **Prefer official WordPress tooling**: build custom only when no official `@wordpress/*` (or upstream PHPCS/PHPStan) option covers the need, or the official option blocks a hard constraint. `eslint-config` extends `@wordpress/eslint-plugin`, `stylelint-config` extends `@wordpress/stylelint-config`, `wp-phpcs` layers on WPCS/VIPCS/PHPCompatibilityWP/Slevomat, `wp-phpstan` wraps `szepeviktor/phpstan-wordpress`. - **PHP version skew is intentional**: the packages target PHP `>=8.2` (the rtCamp plugin/theme floor) while the monorepo root requires `>=8.4.1` for `symplify/monorepo-builder`. `monorepo-builder validate` will flag this — expected, not a bug. @@ -51,7 +51,7 @@ For full release-mechanism details, see `.github/workflows/release-php.yml` and - There is no root `composer test` / `composer check` — root `composer.json` has no `scripts` key. Run tests from inside each `composer-packages/*` directory. - `wp-tooling release:bump` / `release:changelog` are for **consumer** WordPress plugins/themes, not this monorepo. They require a `.php` file with a `Plugin Name:` header at cwd root and throw otherwise. - Subtree-split artifacts — the `npm/` branches and the `wp-phpcs`/`wp-phpstan` mirror repos — are generated. Never hand-edit them; a diverged target fails the next split run instead of being silently rewritten. -- `npm install @rtcamp/wp-tooling` does not resolve from the public npm registry today; the current install path is a git URL (`#npm/wp-tooling`). Don't assume a registry publish exists yet — see Architectural decisions above. +- Never use a `v*` tag for an npm release: `release-php.yml` fires on every `v*` tag and tags share one namespace, so it would cut a Composer release too. Tag npm releases `@` (for example `@rtcamp/eslint-config@1.1.0`). - Every one of the six packages carries its own `LICENSE` file — `git subtree split` only carries history of files *inside* the split directory, so the root `LICENSE` never reaches a mirror repo or split branch. - `ci.yml` runs every workspace lint, every Jest suite with its coverage threshold (Node 22.19 and 24), and each `composer-packages/*` suite installed standalone (PHP 8.2, 8.3 and 8.4) on every PR and push to main. A red CI blocks the merge that would otherwise ship straight onto the `npm/*` branches. - `.vscode/extensions.json` only recommends extensions from verified publishers (Microsoft, GitHub, Red Hat, EditorConfig Foundation) — don't add others, regardless of popularity. diff --git a/node-packages/wp-tooling/CHANGELOG.md b/node-packages/wp-tooling/CHANGELOG.md index 9852d71..1b21ecc 100644 --- a/node-packages/wp-tooling/CHANGELOG.md +++ b/node-packages/wp-tooling/CHANGELOG.md @@ -28,7 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - fill `testVersion` from the `Requires PHP` header (PHPCompatibility aborts on the first line of every file without it), `minimum_wp_version` from `Requires at least`, the text domain from `Text Domain`, and the prefixes from the text domain and the PSR-4 namespace; - accept PSR-4 class file names, and exempt block `render.php` files from the global-variable prefix and text-domain-mismatch checks, since core includes them inside a function and they translate with `block.json`'s text domain; - lint `tests/`, exempting it from the prefix, VIP file-operation and remote-data, `ini_set` and global-override rules by sniff name. An exclude-pattern on a re-referenced standard such as `WordPress-Docs` has no effect, because its sniffs are already loaded; - - declare `rtcamp/wp-phpcs` as the only dev dependency, with two `composer.json` wiring entries without which `composer require` fails: the `rtCamp/wp-phpcs` VCS repository, since the package is not on Packagist, and `allow-plugins` for the Composer installer that registers the standards. + - declare `rtcamp/wp-phpcs` as the only dev dependency, with two `composer.json` wiring entries without which `composer require` fails: the `rtCamp/wp-phpcs` VCS repository, so the install works whether or not Packagist serves the package, and `allow-plugins` for the Composer installer that registers the standards. Every PHP file the bundled `wp/*`, `wp-api/*` and `setup/phpunit` scaffolds render (classes, tests and the PHPUnit bootstrap), and the five `utility/*` accessor snippets, passes both. - `automattic/vipwpcs` as `lint/phpcs/vip`'s dev dependency, with `allow-plugins` wiring for `dealerdirect/phpcodesniffer-composer-installer`, which WPCS and VIPCS depend on: without it a non-interactive `composer require` exits 1 and no standard is registered. The `setup` skill's install command and `docs/examples.md` use the same package. @@ -48,7 +48,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - PHPCS scaffolds exclude intentionally broken AI evaluation fixtures. The standalone server profiler uses short arrays and documents the specific PHPCS exceptions required by WP-CLI evaluation, privileged CLI query data and STDERR diagnostics. - Feature hooks: `readEnv`/`setEnv` and `readDefine`/`setDefine` treat the key or define name as a literal. They were interpolated into a regular expression, so a name containing `.` or another metacharacter could read or flip a different line. - `wp-tooling features`: when `npm install` fails after enabling a feature, the retry commands it prints no longer put runtime dependencies under `--save-dev`, and a failed interactive change reads "Failed to enable " rather than "Failed to enabling ". -- `lint/eslint`, `lint/stylelint` and `setup/tailwind` asked for `@rtcamp/eslint-config`, `@rtcamp/stylelint-config` and `@rtcamp/tailwind-config` at `^0.1.0` from the npm registry. None of them is published there (all three 404, and the packages are at 1.0.0), so `npm install` failed, and `features --enable tailwind --record-deps` wrote a spec into package.json that broke the project's next `npm install`. They now use the git specs the skeletons already use (`github:rtCamp/wp-tooling#npm/`). +- `lint/eslint`, `lint/stylelint` and `setup/tailwind` asked for `@rtcamp/eslint-config`, `@rtcamp/stylelint-config` and `@rtcamp/tailwind-config` at `^0.1.0` from the npm registry. None of them was on the registry at that version (all three returned 404 when this was fixed), so `npm install` failed, and `features --enable tailwind --record-deps` wrote a spec into package.json that broke the project's next `npm install`. They now use the git specs the skeletons already use (`github:rtCamp/wp-tooling#npm/`). - `lint/phpcs/full` now extends `rtCampWP-Basic` from `rtcamp/wp-phpcs` (and reports it plus `dealerdirect/phpcodesniffer-composer-installer` as dev dependencies) instead of `vendor/rtcamp/wp-framework/phpcs.xml.dist`. The framework export-ignores that file, so every dist install, the Composer default, ended up with a ruleset pointing at a file that was not there. The generated ruleset also sets `testVersion` to `8.2-`, which PHPCompatibilityWP needs. - `detect-changes --output github` and `coverage-gate --output github` write multi-line outputs under a random per-output heredoc delimiter instead of the fixed `EOF_WP_TOOLING`. The file lists come from the pull request, so a PR adding a file named `EOF_WP_TOOLING` followed by one named `php-count=0` could close the heredoc early and override the real count, skipping the PHP jobs. - `discover_from: composer.json:autoload.psr-4` now resolves **path** inputs (`base_path`, `*_path`, `*_dir`) from the map entry's directory instead of skipping them, grafted the same way namespaces already were — with a root of `Acme\Blog\` → `inc/`, a `base_path` default of `includes/Services` resolves to `inc/Services`. Previously the namespace was grafted but the directory kept the manifest default, so any project not laid out under `includes/` got a correctly-namespaced class written outside its autoload root, where it never loaded. Affects the 12 bundled scaffolds that declare PSR-4 discovery on `base_path`. Projects already using `includes/`, projects without a `composer.json`, and callers that pass `--base_path` explicitly are unaffected.