* update packages
* add plugin to strip autolinks in code blocks
* fix all the documentation for MDXv3
* remove check-docusaurus-versions
in docusaurus 3 this is now a hard error, not just a warning
* port upstream change to Curl component
fixes performing the 'execute' action when pressing enter
* Revert "send custom user agent when using got (#6256)"
This reverts commit fd7eddc7bb.
* Revert "Migrate request to got (part 1 of many) (#6160)"
This reverts commit 2359eb278b.
* install got as a prod dependency, allow npm 7
* install new packages
* migrate request to got
* update dynamic json test
This is a behavioural difference between request and got
request will send the request, then we'll get a
`400 Bad Request` back and re-throw at as invalid
got will pick up that the URL is invalid and throw
`RequestError: URI malformed` before attempting to send it
which we'll re-throw as inaccessible
* fix OPM service
* fix wordpress querystring
Got doesn't natively support assmebling a querystring
from nested objects because it uses node's URLSearchParams
internally. Use qs and pass qs a string.
Wordpress is the only service that needs this,
so we could build the string manually in this case
if we don't want to take qs as a prod dependency.
It is mostly hard-coded values anyway.
* fix wercker
got overwrites any ?foo=bar in the URL string if
searchParams is also passed whereas request appends
see https://github.com/sindresorhus/got#url
* fix keybase
* add tests for got wrapper
* bootstrap global agent in server start
* feat: added schema and API options for new badge
* fix: fixed platform test's for new schema and api options
* feat: added new badge for theme and plugin last updated
* test: added testing for new badge
* feat: added regex pattern for last update string
* fix: fixed mock test's that didn't match regex pattern
* refactor: changed to moment formatting
Changed to use the moment lib to validate and format last_update date strings from upstream API
* fix: fixed failing platform service tests
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* feat: added wp required version badge for themes
Refactored to allow plugin and theme extensionType for WP Required Version. Also added required schema for themes, already present for plugins.
* test: added testing for the new badge
Added testing for the new theme badge
* refactor: convert static classes to static props
* fix: modules export
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
* feat: added schema and api options
* feat: added new badge for required php version
* test: fixed existing testing and added new for new badge
Fixed existing testing to conform to new api options and schema. Also added testing for the new badge
* fix: changed to mocked test
Changed the Theme Not Set test to a mock as unable to find a live example (previously used 'generatepress' however this now has the data). Also split out query selector fields to allow updating in one place for themes and plugins
* fix: changed the style of the badge to better show the info
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
* 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.