20 Commits

Author SHA1 Message Date
chris48s
bd3a11b4b6 upgrade to docusaurus 3 (#9820)
* 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
2024-03-23 19:54:57 +00:00
chris48s
5024688bc3 migrate examples to openApi part 23; affects [wordpress] (#9732)
* migrate some services from examples to openApi

* whoops. missed a spot
2023-12-24 20:29:08 +00:00
dependabot[bot]
b9d96755ec chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 (#9357)
* chore(deps-dev): bump prettier from 2.8.8 to 3.0.0

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* reformat all the things (prettier 3)

* update tests to await calls to prettier.format()

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris48s <git@chris-shaw.dev>
2023-07-10 09:27:51 +00:00
Pierre-Yves Bigourdan
a1885cdd37 Remove no download handling and add API warning to [Wordpress] badges (#7606) 2022-02-13 16:17:03 +00:00
chris48s
c73072deed Remove requestOptions2GotOptions compatibility layer (#7270)
* gzip --> decompress

* strictSSL --> https.rejectUnauthorized

* auth --> username/password

* qs --> searchParams

* fix base service auth docs

* completely remove requestOptions2GotOptions layer

* update the docs

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-11-15 19:56:08 +00:00
chris48s
8983c39f74 Re-apply 'Migrate request to got (part 1)' (#6755)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-07-11 13:28:14 +00:00
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
chris48s
e0510ca761 Revert request --> got migration (for now) (#6277)
* 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
2021-03-17 20:10:38 +00:00
chris48s
2359eb278b Migrate request to got (part 1 of many) (#6160)
* 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
2021-03-09 20:03:52 +00:00
Joe Izzard
d60b90b860 [Wordpress] Theme & Plugin Last Updated badge (#5722)
* 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>
2020-10-20 17:44:58 +00:00
Joe Izzard
7e7162156b [Wordpress] Added Theme Required WP Version Badge & refactor (#5717)
* 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>
2020-10-20 01:56:13 +00:00
Joe Izzard
a1c50ea4d5 [Wordpress] Plugin & Theme required php (#5723)
* 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>
2020-10-17 18:31:58 +00:00
chris48s
504015c0ba migrate hapi/joi to joi (#5624)
* update joi + joi-extension-semver

* @hapi/joi --> joi

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-30 17:51:02 +00:00
Joe Izzard
ff3acce7bb [WordPress] API Update (#5579)
* 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>
2020-09-20 18:31:31 +00:00
dependabot-preview[bot]
294aa1e1df Build(deps-dev): bump eslint-plugin-import from 2.17.3 to 2.18.0; autofixes (#3671)
* Build(deps-dev): bump eslint-plugin-import from 2.17.3 to 2.18.0

Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.17.3 to 2.18.0.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.17.3...v2.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Autofixes
2019-07-08 12:13:46 -04:00
chris48s
8621fe42d7 Upgrade Joi (#3505)
* upgrade joi
* find & replace ALL THE THINGS
* update related deps
2019-06-02 21:59:55 +01:00
Paul Melnikow
5828223356 Refactor [Wordpress] services (#3324)
- 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.
2019-04-22 10:45:25 -05:00
Paul Melnikow
226fa67a02 Create shortcut for BaseService-related imports (#2809)
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.
2019-01-21 15:41:24 -05:00
Paul Melnikow
07b282fa1f Enforce property shorthand (#2243)
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.
2018-11-01 13:46:23 -04:00
Tagan Hoyle
60592b8547 Refactor [Wordpress] Service (#2152) 2018-10-27 11:59:43 +01:00