Skip to content

chore: upgrade scaffolding#97

Merged
justlevine merged 15 commits into
developfrom
refactor/skeleton-migration
Jun 22, 2026
Merged

chore: upgrade scaffolding#97
justlevine merged 15 commits into
developfrom
refactor/skeleton-migration

Conversation

@imrraaj

@imrraaj imrraaj commented May 18, 2026

Copy link
Copy Markdown
Contributor

Description

Updates the scaffolding per plugin-skeleton-d and reapplies all OneLogs-specific plugin customizations that were reset during the scaffold import.

Technical Details

Scaffold reset (from plugin-skeleton-d):

  • Replaced all root config files, tests/php/, and .github/* with the latest scaffold
  • New files added: .lefthook.yml, .lintstagedrc.mjs, .prettierrc.js, .prettierrc.js, .stylelint.config.js, eslint.config.mjs, tsconfig.base.json, playwright.config.ts, reusable GitHub Actions workflows

Plugin-specific migration (OneLogs customizations reapplied):

  • Fixed all onesearch/OneSearchonelogs/OneLogs references across CI workflows, PHP configs, env files, docs, and test files
  • Restored webpack.config.js entry points (logs-dashboard, settings, onboarding) — removed OneSearch's search entry
  • Fixed .phpcs.xml.dist: prefixes, text domain, file paths
  • Fixed phpunit.xml.dist: upgraded schema PHPUnit 9.5 → 11.5, updated bootstrap and test paths
  • Fixed phpstan.neon.dist, .wp-env.json, blueprint.json, composer.json, jest.config.js
  • Fixed all PHP test namespaces (OneSearch\OneLogs\)
  • Deleted OneSearch-specific PHP tests (Search module: AdminTest, AlgoliaTest, PostRecordTest)
  • Deleted OneSearch-specific JS tests (AlgoliaSettings, SiteSearchSettings, SettingsPage, MultiSelectChips, SiteIndexableEntities)
  • Rewrote tests/js/utils.test.ts to test OneLogs constants/utils
  • Fixed tests/js/setup.ts globals (OneLogsSettings, correct field names)
  • Removed Algolia/strauss config from composer.json (OneLogs has no Algolia dependency)

Dependency alignment with scaffold:

  • package.json: added 13 missing devDependencies (@testing-library/*, @playwright/test, lefthook, lint-staged, prettier, jest-watch-typeahead, @wordpress/prettier-config, @wordpress/stylelint-config, @typescript-eslint/*), bumped 8 packages to scaffold versions, upgraded eslint to ^9 (required by @wordpress/eslint-plugin ^25)
  • composer.json: bumped phpunit/phpunit^11.5, phpstan^2.1.54, wp-phpunit^6.9, platform PHP 8.08.2

Testing

  • npm install
  • composer install
Open WordPress Playground Preview

imrraaj and others added 6 commits May 15, 2026 11:41
- Fix all onesearch/OneSearch branding references across scaffold files
- Update CI/CD workflows: release.yml, ci.yml, reusable-build.yml,
  reusable-wp-playground-pr-preview.yml (artifact names, zip filenames)
- Fix .github/.codecov.yml plugin path
- Fix .github/PULL_REQUEST_TEMPLATE.md repository links
- Update blueprint.json metadata for OneLogs
- Fix .phpcs.xml.dist: description, filename, prefixes, text domain
- Update phpunit.xml.dist to PHPUnit 11.5 format with correct paths
- Delete phpcs.xml.dist (superseded by .phpcs.xml.dist, contained wrong phpunit content)
- Fix phpstan.neon.dist: bootstrap and paths to onelogs.php
- Update phpstan/stubs: remove OneSearch-specific Algolia properties
- Fix .wp-env.json, .wp-env.test.json, .wp-env.child.json plugin paths
- Fix .gitignore zip filename
- Restore webpack.config.js entry points: logs-dashboard (OneLogs-specific),
  settings (index.js), remove search entry (OneSearch-specific)
- Fix composer.json strauss namespace/classmap/constant prefixes
- Fix docs/CONTRIBUTING.md, DEVELOPMENT.md, SECURITY.md
- Fix tests/php/bootstrap.php, TestCase.php namespaces
 OneLogs\ namespaces
- Delete tests/php/Unit/Modules/Search/ (module does not exist in OneLogs)
- Fix tests/_data/plugins/localhost-helper.php
- Fix tests/e2e/settings/activation.spec.ts CSS classes and plugin file
 OneLogsSettings globals
- Rewrite tests/js/utils.test.ts for OneLogs constants/utils API
- Fix tests/js/OnboardingScreen.test.tsx for onelogs_site_type
- Fix tests/js/SiteModal.test.tsx: OneLogs token header, REST path
- Delete OneSearch-specific JS tests: AlgoliaSettings, SiteSearchSettings,
  SettingsPage, MultiSelectChips, SiteIndexableEntities
- Fix jest.config.js displayName and comment

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…olia/strauss from composer.json

 'onelogs'
- composer.json: remove strauss block (algolia/algoliasearch-client- OneLogs has no Algolia usagephp)
- composer.json: remove strauss scripts (prefix-namespaces, post-install-cmd, post-update-cmd)
- composer.json: update clean script to only rm vendor (not vendor-prefixed)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 18, 2026 06:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refreshes the OneLogs plugin's scaffolding to match the plugin-skeleton-d template, then reapplies all OneLogs-specific customizations that were reset during import. The net effect is a large infrastructure overhaul: new reusable GitHub Actions workflows, Prettier/lefthook/lint-staged tooling, ESLint 9 + flat config, PHPUnit 11.5, PHPStan 2.x, PHP 8.2 platform, a Jest config, a new tsconfig.base.json, a Playwright e2e harness, a release-please pipeline, and a full PHP/JS test suite rewritten under OneLogs\ namespaces.

Changes:

  • Scaffold reset: new root config files, reusable workflows, Prettier/lefthook/lint-staged tooling, ESLint flat config, PHPUnit 11.5 migration.
  • OneLogs-specific reapplication: text-domain/namespace/prefix fixes, removed Algolia/Strauss, rewrote PHP and JS tests against OneLogs APIs.
  • Dependency bumps: PHP 8.0 → 8.2, PHPUnit ^11.5, PHPStan ^2.1.54, eslint ^9, @wordpress/scripts ^32, @wordpress/eslint-plugin ^25, plus 13 new devDependencies.

Reviewed changes

Copilot reviewed 90 out of 103 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
webpack.config.js Re-derives shared config from new array-shaped @wordpress/scripts export, formats with tabs/single quotes
uninstall.php, onelogs.php strict_types=1strict_types = 1 formatting
tsconfig.json, tsconfig.base.json Splits compiler options into a base config consumed by both root and test tsconfigs
tests/php/**/*.php New PHPUnit 11.5 test suite under OneLogs\Tests namespace
tests/js/*.{ts,tsx} New Jest+RTL tests for utils/SiteTable/SiteModal/SiteSettings/OnboardingScreen and shared setup
tests/e2e/settings/activation.spec.ts New Playwright activation/deactivation smoke test
tests/_data/plugins/localhost-helper.php Dev mu-plugin to rewrite localhost → host.docker.internal for onelogs endpoints
playwright.config.ts, jest.config.js New JS test harness wrappers around @wordpress/scripts defaults
phpunit.xml.dist, phpstan.neon.dist, phpstan/stubs/wordpress-extended.php PHPUnit 11.5 schema, PHPStan 2.x params, empty stub file
phpcs.xml.dist (deleted) / .phpcs.xml.dist Replaces inline ruleset with rtCamp shared ruleset
package.json, composer.json Dependency bumps and rewritten scripts; new prefer-stable/autoload entries; php ^8.2
blueprint.json, release-please-config.json, .release-please-manifest.json New Playground blueprint and release-please configuration
eslint.config.mjs, .prettierrc.js, .prettierignore, .stylelint.config.js, .stylelintrc.json, .stylelintignore, .lefthook.yml, .lintstagedrc.mjs New flat ESLint config + Prettier/stylelint/lefthook tooling
inc/**/*.php Adds declare(strict_types = 1), drops trailing blanks, minor docblock trimming
assets/src/**/*.{js,ts,tsx} Wide Prettier reformat (tabs + single quotes, no inner padding), small structural splits
.wp-env.json, .wp-env.test.json, .wp-env.child.json Splits dev / test / child environments into separate configs
.github/workflows/*.yml, .github/PULL_REQUEST_TEMPLATE.md, .github/dependabot.yml, .github/.codecov.yml Replaces monolithic test.yml/release.yml with a reusable workflow architecture + new PR-title, Copilot, codecov configs
.gitignore, .gitattributes, .editorconfig Reorganizes ignore rules and adds export-ignore/editorconfig conventions
docs/{CONTRIBUTING,CODE_OF_CONDUCT,SECURITY}.md Markdown reformatting and rewording

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/php/Unit/UtilsTest.php Outdated
Comment thread tests/js/setup.ts Outdated
Comment thread phpstan/stubs/wordpress-extended.php Outdated
Comment thread tests/php/Unit/Modules/Core/RestTest.php Outdated
Comment thread tests/php/Unit/AutoloaderTest.php Outdated
Comment thread .github/workflows/release.yml
Comment thread webpack.config.js
Comment thread tests/js/OnboardingScreen.test.tsx Outdated
Comment thread assets/src/admin/logs/components/FiltersPanel.tsx Outdated
Comment thread assets/src/admin/onboarding/page.tsx Outdated
@imrraaj imrraaj requested a review from justlevine May 18, 2026 09:10
@justlevine justlevine force-pushed the refactor/skeleton-migration branch from 9924241 to f0d5967 Compare June 21, 2026 21:37
justlevine
justlevine previously approved these changes Jun 21, 2026

@justlevine justlevine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we need someone else to approve it

@justlevine justlevine force-pushed the refactor/skeleton-migration branch from 338c37c to 37027cb Compare June 21, 2026 23:24
@justlevine

Copy link
Copy Markdown
Contributor

(e2e is failing because the repo needs to be renamed to onelogs

@justlevine justlevine merged commit a441017 into develop Jun 22, 2026
26 of 27 checks passed
@justlevine justlevine deleted the refactor/skeleton-migration branch June 22, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants