chris48s
151c70dd17
Add ability to format bytes as metric or IEC; affects [bundlejs bundlephobia ChromeWebStoreSize CratesSize DockerSize GithubRepoSize GithubCodeSize GithubSize NpmUnpackedSize SpigetDownloadSize steam VisualStudioAppCenterReleasesSize whatpulse] ( #10547 )
...
* add renderSizeBadge helper, use it everywhere
- switch from pretty-bytes to byte-size
- add renderSizeBadge() helper function
- match upstream conventions for metric/IEC units
- add new test helpers and use them in service tests
* unrelated: fix npm unpacked size query param schema
not strictly related to this PR
but I noticed it was broken
* chromewebstore: reformat size string, test against isIecFileSize
2024-12-01 19:53:26 +00:00
chris48s
9d2a568a90
tolerate missing short_version in [visualstudioappcenter] ( #9951 )
2024-02-11 13:03:37 +00:00
chris48s
3eb4959163
migrate examples to openApi part 14; affects [azuredevops discord netlify opencollective pub ros visualstudio] ( #9560 )
...
* migrate some services from examples to openApi
* migrate pub version
* improve pub descriptions
2023-12-04 13:09:37 +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
chris48s
14892e3943
Implement a pattern for dealing with upstream APIs which are slow on the first hit; affects [endpoint] ( #9233 )
...
* allow serviceData to override cacheSeconds with a longer value
* prevent [endpoint] json cacheSeconds property exceeding service default
* allow ShieldsRuntimeError to specify a cacheSeconds property
By default error responses use the cacheLength of
the service class throwing the error.
This allows error to tell the handling layer the maxAge
that should be set on the error badge response.
* add customExceptions param
This
1. allows us to specify custom properties to pass to the exception
constructor if we throw any of the standard got errors
e.g: `ETIMEDOUT`, `ECONNRESET`, etc
2. uses a custom `cacheSeconds` property (if set on the exception)
to set the response maxAge
* customExceptions --> systemErrors
* errorMessages --> httpErrors
2023-06-13 21:08:43 +01:00
Pierre-Yves B
23c0406bed
Migrate from CommonJS to ESM ( #6651 )
2021-07-09 12:53:55 +01:00
dependabot-preview[bot]
ee83590942
Build(deps-dev): bump @typescript-eslint/eslint-plugin from 2.34.0 to 4.19.0, run [GitHub GitlabCoverage F-Droid Wordpress VisualStudioAppCenter Ore Packagist] ( #6319 )
...
* Build(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin ) from 2.34.0 to 4.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases )
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md )
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.19.0/packages/eslint-plugin )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
* chore: update eslint camelcase rule
* chore: eslint camelcase updates for wordpress
* chore: fix eslint camelcase for misc other services
* chore: fix eslint camelcase issue in github and gitlab
* chore: run prettier
* chore: account for JSX globals
* deps: bump typescript-eslint-parser to v4
* chore: frontend lint changes
* chore: update eslint config to only run @typescript-eslint/explicit-module-boundary-types on ts files
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com >
2021-03-28 08:26:01 -05:00
dependabot-preview[bot]
1361500296
Build(deps-dev): bump prettier from 2.1.2 to 2.2.1 ( #5905 )
...
* Build(deps-dev): bump prettier from 2.1.2 to 2.2.1
Bumps [prettier](https://github.com/prettier/prettier ) from 2.1.2 to 2.2.1.
- [Release notes](https://github.com/prettier/prettier/releases )
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md )
- [Commits](https://github.com/prettier/prettier/compare/2.1.2...2.2.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
* run new prettier
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: chris48s <chris.shaw480@gmail.com >
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-12-12 16:10:19 +00:00
N Balgopal Patro
85e3772de9
Converted Service Classes to Static Fields, run [visualstudio w3c] ( #5642 )
...
* Completed For visual-studio-app-center
* Completed For visual-studio-marketplace
* Completed For w3c
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-10-03 02:19:48 +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
chris48s
13d75e0607
upgrade to prettier 2 ( #5051 )
...
* arrowParens: avoid
* remove trailingComma setting
2020-05-05 21:07:43 +01:00
dependabot-preview[bot]
478d14300c
Build(deps-dev): bump eslint-plugin-import from 2.20.1 to 2.20.2 ( #4859 )
...
* Build(deps-dev): bump eslint-plugin-import from 2.20.1 to 2.20.2
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import ) from 2.20.1 to 2.20.2.
- [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.20.1...v2.20.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
* Fixes
* refactor: combine imports
* refactor: combine imports
* refactor: combine imports
* refactor: update import ordering
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
Co-authored-by: Paul Melnikow <email@paulmelnikow.com >
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com >
Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com >
2020-04-16 18:39:13 -05:00
François Hodierne
0d8a2d5ca0
Update to eslint 6.8.0 [appveyor githubissuedetail packagist] ( #4489 )
...
* update to eslint 6.8.0 and related packages
* Fixes for no-prototype-builtins
* Updates for explicit-function-return-type
* Add ignores for no-explicit-any
* update to eslint 6.8.0 and related packages
* Fixes for no-prototype-builtins
* Updates for explicit-function-return-type
* Add ignores for no-explicit-any
* package: activate eslint-config-standard
* apply updated eslint configuration
* lint: apply eslint feedback after rebase
* Update lockfile
* Update lockfile
* Restore missing deps
* Update lockfile
* Re-add eslint-plugin-node
* Add eslint-plugin-standard and eslint-plugin-react-hooks
* Clean lint
Co-authored-by: Paul Melnikow <github@paulmelnikow.com >
2020-02-29 11:06:36 -06:00
James Cahill
9868025154
Added [VisualStudioAppCenter] badges 🎉 ( #4108 )
...
* VisualStudioAppCenterBuilds
* [vsacb] Add schema, documentation and use buildStatus for rendering
* Add VSACReleasesVersion badge and test
* Make tests green again, add another nock test and fix category
* Add VSAC Releases Size badge and test
* Add VSAC Base class
* [vsacb] use base fetch function
* Add VSACR OSVersion service and tests
* Finishing touches
* Change slug from VSAC to Visual-Studio-App-Center
* Use prettyBytes for rendering
* CQ
* Use bytes response directly
* Remove superfluous required statement
* Improve os version badge format
* Switch to nock for build test
Co-authored-by: Pierre-Yves B. <PyvesDev@gmail.com >
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com >
2020-02-04 19:43:15 +00:00