* feat: updated to new WordPress API
Updated to the new WordPress API, and separated plugin and theme schemas for future expansion
* test: updated testing for new API
Updated some testing to work with the new API request
* feat: updated schema to require keys
Updated schema to require all the keys in the schema
* fix: remove duplicate requirement
The helper already includes required so we don't need to require it again
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
* fix: remove duplicate requirement
The helper already includes required so we don't need to require it again
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
- Prefer inline transforms to take place in `handle()` rather than `render()`
- Avoid inversion of control by removing `BaseWordpress#handle()`, passing `extensionType` into `fetch()`, and removing one layer of subclassing
- Move “not found” checks into `fetch()`
- Cache wordpress versions instead of fetching on each request
- Start to convert aliases to redirects (there are more of these which could be tackled in a follow-on)
- Replace at least one route `format` with a `pattern` (ref #3329)
- Partially reorder: name, category, route, examples, defaultBadgeData, render, fetch, handle
Some of this is in line with our established patterns or makes it clearly easier to follow; some of it is arguably stylistic.
Continue to implement #2698:
- Add `core/base-service/index.js` (but hold off on moving the things it imports)
- Add shortcuts in `services/index.js` for Base*Service, errors, and deprecatedService. This file will be streamlined later to avoid cluttering it with rarely used bits.
- Apply consistent ordering of imports and use of `module.exports` in testers.
- Remove some renaming of imports.
- Remove obsolete tests here and there.
I had to track down the right lint rule for this. We have no-useless-rename for destructuring and import/export. The one for object literals is object-shorthand.