mirror of
https://github.com/badges/shields.git
synced 2026-11-20 06:43:07 +03:00
refactor: rename deprecatedService to retiredService [*****] (#11803)
* refactor: rename deprecatedService to retiredService - Updated all instances of deprecatedService to retiredService in service implementations, tests, and documentation. - Changed attribute names from isDeprecated to isRetired in relevant schemas and service definitions. - Adjusted tests and documentation to reflect the new terminology and ensure consistency. * docs: rename deprecating-badges.md to retiring-badges.md * refactor: rename files deprecated-service to retired-service * refactor: update terminology from deprecated to retired in badge documentation
This commit is contained in:
1 parent
7158b63447
commit
cb34c2fb62
56 files changed
+161
-161
No files matched your search
@@ -86,7 +86,7 @@ class BaseService {
|
||||
throw new Error(`Category not set for ${this.name}`)
|
||||
}
|
||||
|
||||
static isDeprecated = false
|
||||
static isRetired = false
|
||||
|
||||
/**
|
||||
* Route to mount this service on
|
||||
@@ -208,7 +208,7 @@ class BaseService {
|
||||
}
|
||||
|
||||
static getDefinition() {
|
||||
const { category, name, isDeprecated, openApi } = this
|
||||
const { category, name, isRetired, openApi } = this
|
||||
const { base, format, pattern } = this.route
|
||||
const queryParams = getQueryParamNames(this.route)
|
||||
|
||||
@@ -221,7 +221,7 @@ class BaseService {
|
||||
route = undefined
|
||||
}
|
||||
|
||||
const result = { category, name, isDeprecated, route, openApi }
|
||||
const result = { category, name, isRetired, route, openApi }
|
||||
|
||||
assertValidServiceDefinition(result, `getDefinition() for ${this.name}`)
|
||||
|
||||
|
||||
@@ -369,17 +369,17 @@ describe('BaseService', function () {
|
||||
|
||||
describe('getDefinition', function () {
|
||||
it('returns the expected result', function () {
|
||||
const { category, name, isDeprecated, route, openApi } =
|
||||
const { category, name, isRetired, route, openApi } =
|
||||
DummyService.getDefinition()
|
||||
expect({
|
||||
category,
|
||||
name,
|
||||
isDeprecated,
|
||||
isRetired,
|
||||
route,
|
||||
}).to.deep.equal({
|
||||
category: 'other',
|
||||
name: 'DummyService',
|
||||
isDeprecated: false,
|
||||
isRetired: false,
|
||||
route: {
|
||||
pattern: '/foo/:namedParamA',
|
||||
queryParams: ['queryParamA', 'legacyQueryParamA'],
|
||||
|
||||
@@ -6,7 +6,7 @@ import BaseSvgScrapingService from './base-svg-scraping.js'
|
||||
import BaseTomlService from './base-toml.js'
|
||||
import BaseXmlService from './base-xml.js'
|
||||
import BaseYamlService from './base-yaml.js'
|
||||
import deprecatedService from './deprecated-service.js'
|
||||
import retiredService from './retired-service.js'
|
||||
import redirector from './redirector.js'
|
||||
import {
|
||||
NotFound,
|
||||
@@ -26,7 +26,7 @@ export {
|
||||
BaseTomlService,
|
||||
BaseXmlService,
|
||||
BaseYamlService,
|
||||
deprecatedService,
|
||||
retiredService,
|
||||
redirector,
|
||||
NotFound,
|
||||
InvalidResponse,
|
||||
|
||||
@@ -16,7 +16,7 @@ import trace from './trace.js'
|
||||
const attrSchema = Joi.object({
|
||||
name: Joi.string().min(3),
|
||||
category: isValidCategory,
|
||||
isDeprecated: Joi.boolean().default(true),
|
||||
isRetired: Joi.boolean().default(true),
|
||||
route: isValidRoute,
|
||||
openApi: openApiSchema,
|
||||
transformPath: Joi.func()
|
||||
@@ -35,7 +35,7 @@ export default function redirector(attrs) {
|
||||
const {
|
||||
name,
|
||||
category,
|
||||
isDeprecated,
|
||||
isRetired,
|
||||
route,
|
||||
openApi,
|
||||
transformPath,
|
||||
@@ -51,7 +51,7 @@ export default function redirector(attrs) {
|
||||
})}Redirect`
|
||||
|
||||
static category = category
|
||||
static isDeprecated = isDeprecated
|
||||
static isRetired = isRetired
|
||||
static route = route
|
||||
static openApi = openApi
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ describe('Redirector', function () {
|
||||
const dateAdded = new Date()
|
||||
const attrs = { category, route, transformPath, dateAdded }
|
||||
|
||||
it('returns true on isDeprecated', function () {
|
||||
expect(redirector(attrs).isDeprecated).to.be.true
|
||||
it('returns true on isRetired', function () {
|
||||
expect(redirector(attrs).isRetired).to.be.true
|
||||
})
|
||||
|
||||
it('has the expected name', function () {
|
||||
|
||||
@@ -13,22 +13,22 @@ const attrSchema = Joi.object({
|
||||
issueUrl: Joi.string().uri(),
|
||||
}).required()
|
||||
|
||||
function deprecatedService(attrs) {
|
||||
function retiredService(attrs) {
|
||||
const { route, name, label, category, issueUrl } = Joi.attempt(
|
||||
attrs,
|
||||
attrSchema,
|
||||
`Deprecated service for ${attrs.route.base}`,
|
||||
`Retired service for ${attrs.route.base}`,
|
||||
)
|
||||
|
||||
return class DeprecatedService extends BaseService {
|
||||
return class RetiredService extends BaseService {
|
||||
static name = name
|
||||
? `Deprecated${name}`
|
||||
: `Deprecated${camelcase(route.base.replace(/\//g, '_'), {
|
||||
? `Retired${name}`
|
||||
: `Retired${camelcase(route.base.replace(/\//g, '_'), {
|
||||
pascalCase: true,
|
||||
})}`
|
||||
|
||||
static category = category
|
||||
static isDeprecated = true
|
||||
static isRetired = true
|
||||
static route = route
|
||||
static _cacheLength = 86400
|
||||
static defaultBadgeData = {
|
||||
@@ -51,4 +51,4 @@ function deprecatedService(attrs) {
|
||||
}
|
||||
}
|
||||
|
||||
export default deprecatedService
|
||||
export default retiredService
|
||||
+13
-13
@@ -1,7 +1,7 @@
|
||||
import { expect } from 'chai'
|
||||
import deprecatedService from './deprecated-service.js'
|
||||
import retiredService from './retired-service.js'
|
||||
|
||||
describe('DeprecatedService', function () {
|
||||
describe('RetiredService', function () {
|
||||
const route = {
|
||||
base: 'service/that/no/longer/exists',
|
||||
pattern: ':various+',
|
||||
@@ -10,46 +10,46 @@ describe('DeprecatedService', function () {
|
||||
const dateAdded = new Date()
|
||||
const commonAttrs = { route, category, dateAdded }
|
||||
|
||||
it('returns true on isDeprecated', function () {
|
||||
const service = deprecatedService({ ...commonAttrs })
|
||||
expect(service.isDeprecated).to.be.true
|
||||
it('returns true on isRetired', function () {
|
||||
const service = retiredService({ ...commonAttrs })
|
||||
expect(service.isRetired).to.be.true
|
||||
})
|
||||
|
||||
it('has the expected name', function () {
|
||||
const service = deprecatedService({ ...commonAttrs })
|
||||
expect(service.name).to.equal('DeprecatedServiceThatNoLongerExists')
|
||||
const service = retiredService({ ...commonAttrs })
|
||||
expect(service.name).to.equal('RetiredServiceThatNoLongerExists')
|
||||
})
|
||||
|
||||
it('sets specified route', function () {
|
||||
const service = deprecatedService({ ...commonAttrs })
|
||||
const service = retiredService({ ...commonAttrs })
|
||||
expect(service.route).to.deep.equal(route)
|
||||
})
|
||||
|
||||
it('sets specified label', function () {
|
||||
const label = 'coverity'
|
||||
const service = deprecatedService({ ...commonAttrs, label })
|
||||
const service = retiredService({ ...commonAttrs, label })
|
||||
expect(service.defaultBadgeData.label).to.equal(label)
|
||||
})
|
||||
|
||||
it('sets specified category', function () {
|
||||
const service = deprecatedService({ ...commonAttrs })
|
||||
const service = retiredService({ ...commonAttrs })
|
||||
expect(service.category).to.equal(category)
|
||||
})
|
||||
|
||||
it('sets default deprecation message', async function () {
|
||||
const service = deprecatedService({ ...commonAttrs })
|
||||
const service = retiredService({ ...commonAttrs })
|
||||
expect(await service.invoke()).to.deep.equal({
|
||||
message: 'retired badge',
|
||||
})
|
||||
})
|
||||
|
||||
it('sets default deprecation color', async function () {
|
||||
const service = deprecatedService({ ...commonAttrs })
|
||||
const service = retiredService({ ...commonAttrs })
|
||||
expect(service.defaultBadgeData.color).to.equal('lightgray')
|
||||
})
|
||||
|
||||
it('sets specified issue URL and sets red color', async function () {
|
||||
const service = deprecatedService({
|
||||
const service = retiredService({
|
||||
...commonAttrs,
|
||||
issueUrl: 'https://github.com/badges/shields/issues/8671',
|
||||
})
|
||||
@@ -43,7 +43,7 @@ const openApiSchema = Joi.object()
|
||||
const serviceDefinition = Joi.object({
|
||||
category: Joi.string().required(),
|
||||
name: Joi.string().required(),
|
||||
isDeprecated: Joi.boolean().required(),
|
||||
isRetired: Joi.boolean().required(),
|
||||
route: Joi.alternatives().try(
|
||||
Joi.object({
|
||||
pattern: Joi.string().required(),
|
||||
|
||||
@@ -24,8 +24,8 @@ Every redirector must specify:
|
||||
- **`name`** - Custom name for the service class (auto-generated from route if not specified)
|
||||
- **`transformQueryParams`** - A function to transform path parameters into query parameters
|
||||
- **`overrideTransformedQueryParams`** - Boolean (default: `false`). When `true`, query params from the URL take precedence over transformed params in case of conflicts
|
||||
- **`isDeprecated`** - Boolean (default: `true`). Set to `false` for non-deprecated redirectors that should appear in the API documentation
|
||||
- **`openApi`** - OpenAPI documentation object. Only needed for non-deprecated redirectors (`isDeprecated: false`) that should appear in the user-facing documentation
|
||||
- **`isRetired`** - Boolean (default: `true`). Set to `false` for non-retired redirectors that should appear in the API documentation
|
||||
- **`openApi`** - OpenAPI documentation object. Only needed for non-retired redirectors (`isRetired: false`) that should appear in the user-facing documentation
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -117,7 +117,7 @@ If a user specifies `/old/service/token/abc123/foo?token=xyz789`, `xyz789` takes
|
||||
|
||||
### Example 5: Non-Deprecated Redirector with Documentation
|
||||
|
||||
In some cases, a badged based on a redirector may not be deprecated and should appear on the website. This requires setting `isDeprecated: false` and providing an `openApi` specification:
|
||||
In some cases, a badged based on a redirector may not be retired and should appear on the website. This requires setting `isRetired: false` and providing an `openApi` specification:
|
||||
|
||||
```js
|
||||
import { redirector, pathParam } from '../index.js'
|
||||
@@ -125,7 +125,7 @@ import { commonParams } from '../maven-metadata/maven-metadata.js'
|
||||
|
||||
export default redirector({
|
||||
category: 'version',
|
||||
isDeprecated: false,
|
||||
isRetired: false,
|
||||
route: {
|
||||
base: 'gradle-plugin-portal/v',
|
||||
pattern: ':pluginId',
|
||||
@@ -213,12 +213,12 @@ We'll keep the redirector for a minimum of one year. It may stay in place for si
|
||||
- The redirector led to less than 100 badge renders on a weekday.
|
||||
- The redirector serves less than 1% of the traffic of the new badge URL it points to.
|
||||
|
||||
It can then be removed and replaced with a deprecated badge linking to an issue that explains the migration path, for example:
|
||||
It can then be removed and replaced with a retired badge linking to an issue that explains the migration path, for example:
|
||||
|
||||
```js
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'build',
|
||||
route: {
|
||||
base: 'github/workflow/status',
|
||||
@@ -232,4 +232,4 @@ export default deprecatedService({
|
||||
|
||||
Doing so will render badges similar to the following: 
|
||||
|
||||
Removal of the resulting deprecated badge follows the process documented [here](./deprecating-badges.md).
|
||||
Removal of the resulting retired badge follows the process documented [here](./retiring-badges.md).
|
||||
@@ -1,26 +1,26 @@
|
||||
# Deprecating Badges
|
||||
|
||||
When a service that Shields integrates with shuts down, those badges will no longer work and need to be deprecated within Shields.
|
||||
When a service that Shields integrates with shuts down, those badges will no longer work and need to be retired (deprecated) within Shields.
|
||||
|
||||
Deprecating a badge involves two steps:
|
||||
|
||||
1. Updating the service code to use the `DeprecatedService` class
|
||||
2. Updating the service tests to reflect the new behavior of the deprecated service
|
||||
1. Updating the service code to use the `RetiredService` class
|
||||
2. Updating the service tests to reflect the new behavior of the retired service
|
||||
|
||||
## Update Service Implementation
|
||||
|
||||
Locate the source file(s) for the service, which can be found in `*.service.js` files located within the directory for the service (`./services/:service-name/`) such as `./services/imagelayers/imagelayers.service.js`.
|
||||
|
||||
Replace the existing service class implementation with the `DeprecatedService` class from `./core/base-service/deprecated-service.js` using the respective `category`, `route`, and `label` values for that service.
|
||||
Replace the existing service class implementation with the `RetiredService` class from `./core/base-service/retired-service.js` using the respective `category`, `route`, and `label` values for that service.
|
||||
|
||||
Set the badge label to the service name. This ensures users can immediately identify which service is no longer available at a glance.
|
||||
|
||||
For example:
|
||||
|
||||
```js
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'size',
|
||||
route: {
|
||||
base: 'imagelayers',
|
||||
@@ -35,7 +35,7 @@ export default deprecatedService({
|
||||
|
||||
Locate the test file(s) for the service, which can be found in `*.tester.js` files located in the service directory (`./services/:service-name/`), such as `./services/imagelayers/imagelayers.tester.js`.
|
||||
|
||||
With `DeprecatedService` classes we cannot use `createServiceTester()` so you will need to create the `ServiceTester` class directly. For example:
|
||||
With `RetiredService` classes we cannot use `createServiceTester()` so you will need to create the `ServiceTester` class directly. For example:
|
||||
|
||||
```js
|
||||
import { ServiceTester } from '../tester.js'
|
||||
@@ -46,7 +46,7 @@ export const t = new ServiceTester({
|
||||
})
|
||||
```
|
||||
|
||||
Next you will need to replace/refactor the existing tests to validate the new deprecated badge behavior for this service. Deprecated badges always return a message of `retired badge` (such as `imagelayers | retired badge`) so the tests need to be updated to reflect that message value. For example:
|
||||
Next you will need to replace/refactor the existing tests to validate the new retired badge behavior for this service. Retired badges always return a message of `retired badge` (such as `imagelayers | retired badge`) so the tests need to be updated to reflect that message value. For example:
|
||||
|
||||
```js
|
||||
t.create('retired badge (previously image size)')
|
||||
@@ -86,7 +86,7 @@ t.create('retired badge (previously number of layers)')
|
||||
|
||||
## What Happens Next?
|
||||
|
||||
Once a service is deprecated, we'll keep the deprecation notice for a minimum of one year. During that time, the badge will render as follows: 
|
||||
Once a service is retired, we'll keep the deprecation notice for a minimum of one year. During that time, the badge will render as follows: 
|
||||
|
||||
Past that point, all related code will be deleted, and a not found error will be rendered instead: 
|
||||
|
||||
@@ -143,4 +143,4 @@ Some other information that may be useful:
|
||||
- [Contributing Docs](../CONTRIBUTING.md)
|
||||
- [Badge Tutorial](./TUTORIAL.md)
|
||||
- [Service Tests Tutorial](./service-tests.md)
|
||||
- Previous Pull Requests that deprecated badges like [#10371](https://github.com/badges/shields/pull/10371) and [#11075](https://github.com/badges/shields/pull/11075)
|
||||
- Previous Pull Requests that retired badges like [#10371](https://github.com/badges/shields/pull/10371) and [#11075](https://github.com/badges/shields/pull/11075)
|
||||
+1
-1
@@ -115,7 +115,7 @@ const servicesConfig = {
|
||||
order: [
|
||||
'name',
|
||||
'category',
|
||||
'isDeprecated',
|
||||
'isRetired',
|
||||
'route',
|
||||
'auth',
|
||||
'openApi',
|
||||
|
||||
@@ -22,7 +22,7 @@ function writeSpec(filename, spec) {
|
||||
|
||||
for (const category of definitions.categories) {
|
||||
const services = definitions.services.filter(
|
||||
service => service.category === category.id && !service.isDeprecated,
|
||||
service => service.category === category.id && !service.isRetired,
|
||||
)
|
||||
|
||||
writeSpec(
|
||||
@@ -34,12 +34,12 @@ function writeSpec(filename, spec) {
|
||||
let coreServices = []
|
||||
coreServices = coreServices.concat(
|
||||
definitions.services.filter(
|
||||
service => service.category === 'static' && !service.isDeprecated,
|
||||
service => service.category === 'static' && !service.isRetired,
|
||||
),
|
||||
)
|
||||
coreServices = coreServices.concat(
|
||||
definitions.services.filter(
|
||||
service => service.category === 'dynamic' && !service.isDeprecated,
|
||||
service => service.category === 'dynamic' && !service.isRetired,
|
||||
),
|
||||
)
|
||||
writeSpec(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { renderDownloadsBadge } from '../downloads.js'
|
||||
import { deprecatedService, pathParams } from '../index.js'
|
||||
import { retiredService, pathParams } from '../index.js'
|
||||
import { BaseAmoService, description as baseDescription } from './amo-base.js'
|
||||
|
||||
const description = `${baseDescription}
|
||||
@@ -39,7 +39,7 @@ class AmoWeeklyDownloads extends BaseAmoService {
|
||||
}
|
||||
}
|
||||
|
||||
const AmoLegacyRedirect = deprecatedService({
|
||||
const AmoLegacyRedirect = retiredService({
|
||||
category: 'downloads',
|
||||
label: 'mozilla-add-on',
|
||||
route: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export const VsoBuildRedirector = deprecatedService({
|
||||
export const VsoBuildRedirector = retiredService({
|
||||
category: 'build',
|
||||
label: 'vso',
|
||||
route: {
|
||||
@@ -10,7 +10,7 @@ export const VsoBuildRedirector = deprecatedService({
|
||||
dateAdded: new Date('2025-12-20'),
|
||||
issueUrl: 'https://github.com/badges/shields/pull/11583',
|
||||
})
|
||||
export const VsoReleaseRedirector = deprecatedService({
|
||||
export const VsoReleaseRedirector = retiredService({
|
||||
category: 'build',
|
||||
label: 'vso',
|
||||
route: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export const BitComponents = deprecatedService({
|
||||
export const BitComponents = retiredService({
|
||||
category: 'other',
|
||||
route: {
|
||||
base: 'bit/collection/total-components',
|
||||
|
||||
@@ -2,7 +2,7 @@ import Joi from 'joi'
|
||||
import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
|
||||
import {
|
||||
BaseSvgScrapingService,
|
||||
deprecatedService,
|
||||
retiredService,
|
||||
redirector,
|
||||
pathParam,
|
||||
queryParam,
|
||||
@@ -108,7 +108,7 @@ class CircleCi extends BaseSvgScrapingService {
|
||||
}
|
||||
|
||||
const legacyRoutes = [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'build',
|
||||
label: 'circleci',
|
||||
route: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Joi from 'joi'
|
||||
import { version as versionColor } from '../color-formatters.js'
|
||||
import { deprecatedService, pathParam, queryParam } from '../index.js'
|
||||
import { retiredService, pathParam, queryParam } from '../index.js'
|
||||
import { BaseClojarsService, description } from './clojars-base.js'
|
||||
|
||||
const queryParamSchema = Joi.object({
|
||||
@@ -58,7 +58,7 @@ class ClojarsVersionService extends BaseClojarsService {
|
||||
}
|
||||
}
|
||||
|
||||
const ClojarsVersionRedirector = deprecatedService({
|
||||
const ClojarsVersionRedirector = retiredService({
|
||||
category: 'version',
|
||||
label: 'clojars',
|
||||
route: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export const CodeClimate = deprecatedService({
|
||||
export const CodeClimate = retiredService({
|
||||
category: 'analysis',
|
||||
route: {
|
||||
base: 'codeclimate',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'coverage',
|
||||
label: 'codecov',
|
||||
route: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'build',
|
||||
route: {
|
||||
base: 'codeship',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export const Coincap = deprecatedService({
|
||||
export const Coincap = retiredService({
|
||||
category: 'other',
|
||||
route: {
|
||||
base: 'coincap',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'build',
|
||||
route: {
|
||||
base: 'docker/cloud/automated',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'build',
|
||||
route: {
|
||||
base: 'docker/cloud/build',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'other',
|
||||
label: 'endpoint',
|
||||
route: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../../index.js'
|
||||
import { retiredService } from '../../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'social',
|
||||
label: 'github',
|
||||
route: { base: 'github/stars/gists', pattern: ':gistId' },
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'issue-tracking',
|
||||
label: 'github',
|
||||
route: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'build',
|
||||
route: {
|
||||
base: 'github/workflow/status',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
// https://github.com/badges/shields/issues/8138
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'build',
|
||||
label: 'gitlab',
|
||||
route: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'coverage',
|
||||
label: 'gitlab',
|
||||
route: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
// https://github.com/badges/shields/issues/8138
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'build',
|
||||
label: 'gitlab',
|
||||
route: {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { commonParams } from '../maven-metadata/maven-metadata.js'
|
||||
|
||||
export default redirector({
|
||||
category: 'version',
|
||||
isDeprecated: false,
|
||||
isRetired: false,
|
||||
route: {
|
||||
base: 'gradle-plugin-portal/v',
|
||||
pattern: ':pluginId',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export const HackageDeps = deprecatedService({
|
||||
export const HackageDeps = retiredService({
|
||||
category: 'dependencies',
|
||||
route: {
|
||||
base: 'hackage-deps/v',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
const commonProps = {
|
||||
category: 'build',
|
||||
@@ -8,21 +8,21 @@ const commonProps = {
|
||||
}
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
route: {
|
||||
base: 'jenkins-ci/s',
|
||||
pattern: ':protocol(http|https)/:host/:job+',
|
||||
},
|
||||
...commonProps,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
route: {
|
||||
base: 'jenkins/s',
|
||||
pattern: ':protocol(http|https)/:host/:job+',
|
||||
},
|
||||
...commonProps,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
route: {
|
||||
base: 'jenkins/build',
|
||||
pattern: ':protocol(http|https)/:host/:job+',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
const commonProps = {
|
||||
category: 'coverage',
|
||||
@@ -8,14 +8,14 @@ const commonProps = {
|
||||
}
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
route: {
|
||||
base: 'jenkins',
|
||||
pattern: ':coverageFormat(j|c)/:protocol(http|https)/:host/:job+',
|
||||
},
|
||||
...commonProps,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
route: {
|
||||
base: 'jenkins/coverage',
|
||||
pattern:
|
||||
@@ -23,7 +23,7 @@ export default [
|
||||
},
|
||||
...commonProps,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
route: {
|
||||
base: 'jenkins/coverage/api',
|
||||
pattern: '',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
const commonProps = {
|
||||
category: 'build',
|
||||
@@ -8,14 +8,14 @@ const commonProps = {
|
||||
}
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
route: {
|
||||
base: 'jenkins/t',
|
||||
pattern: ':protocol(http|https)/:host/:job+',
|
||||
},
|
||||
...commonProps,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
route: {
|
||||
base: 'jenkins/tests',
|
||||
pattern: ':protocol(http|https)/:host/:job+',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'issue-tracking',
|
||||
label: 'jira',
|
||||
route: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'issue-tracking',
|
||||
label: 'jira',
|
||||
route: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService, redirector } from '../index.js'
|
||||
import { retiredService, redirector } from '../index.js'
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'version',
|
||||
label: 'jitpack',
|
||||
name: 'JitpackVersionGitHubRedirect',
|
||||
|
||||
@@ -3,7 +3,7 @@ import { commonParams } from '../maven-metadata/maven-metadata.js'
|
||||
|
||||
export default redirector({
|
||||
category: 'version',
|
||||
isDeprecated: false,
|
||||
isRetired: false,
|
||||
route: {
|
||||
base: 'maven-central/v',
|
||||
pattern: ':groupId/:artifactId/:versionPrefix?',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'social',
|
||||
route: {
|
||||
base: 'nostrband/followers',
|
||||
|
||||
@@ -4,7 +4,7 @@ import { nonNegativeInteger } from '../validators.js'
|
||||
import {
|
||||
BaseXmlService,
|
||||
NotFound,
|
||||
deprecatedService,
|
||||
retiredService,
|
||||
pathParams,
|
||||
pathParam,
|
||||
queryParam,
|
||||
@@ -135,7 +135,7 @@ function createServiceFamily({
|
||||
}
|
||||
}
|
||||
|
||||
const NugetVersionRedirector = deprecatedService({
|
||||
const NugetVersionRedirector = retiredService({
|
||||
category: 'version',
|
||||
label: defaultLabel,
|
||||
route: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default [
|
||||
// https://github.com/badges/shields/issues/5433
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
name: 'OffsetEarthCarbonRedirect',
|
||||
category: 'other',
|
||||
label: 'offset-earth',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default [
|
||||
// https://github.com/badges/shields/issues/5433
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
name: 'OffsetEarthTreesRedirect',
|
||||
category: 'other',
|
||||
label: 'offset-earth',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export const PubPopularity = deprecatedService({
|
||||
export const PubPopularity = retiredService({
|
||||
category: 'rating',
|
||||
route: {
|
||||
base: 'pub/popularity',
|
||||
|
||||
@@ -2,7 +2,7 @@ import Joi from 'joi'
|
||||
import { latest, renderVersionBadge } from '../version.js'
|
||||
import {
|
||||
BaseJsonService,
|
||||
deprecatedService,
|
||||
retiredService,
|
||||
pathParam,
|
||||
queryParam,
|
||||
} from '../index.js'
|
||||
@@ -65,7 +65,7 @@ class PubVersion extends BaseJsonService {
|
||||
}
|
||||
}
|
||||
|
||||
const PubVersionRedirector = deprecatedService({
|
||||
const PubVersionRedirector = retiredService({
|
||||
category: 'version',
|
||||
label: 'pub',
|
||||
route: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export const SecurityHeaders = deprecatedService({
|
||||
export const SecurityHeaders = retiredService({
|
||||
category: 'monitoring',
|
||||
route: {
|
||||
base: 'security-headers',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'other',
|
||||
label: 'swagger',
|
||||
name: 'SwaggerRedirect',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService, redirector } from '../index.js'
|
||||
import { retiredService, redirector } from '../index.js'
|
||||
|
||||
export default [
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
name: 'TeamCityBuildLegacyCodeBetterRedirect',
|
||||
category: 'build',
|
||||
label: 'teamcity',
|
||||
|
||||
@@ -54,7 +54,7 @@ This badge is unusual.
|
||||
We don't usually host badges that don't show any dynamic information.
|
||||
Also when an upstream API is removed, we usually deprecate/remove badges
|
||||
according to the process in
|
||||
https://github.com/badges/shields/blob/master/doc/deprecating-badges.md
|
||||
https://github.com/badges/shields/blob/master/doc/retiring-badges.md
|
||||
|
||||
In the case of twitter, we decided to provide a static fallback instead
|
||||
due to how widely used the badge was. See
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
// Visual Studio App Center was retired. See: https://learn.microsoft.com/en-us/appcenter/retirement
|
||||
const VisualStudioAppCenterBuilds = deprecatedService({
|
||||
const VisualStudioAppCenterBuilds = retiredService({
|
||||
category: 'build',
|
||||
route: {
|
||||
base: 'visual-studio-app-center/builds',
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
// Visual Studio App Center was retired. See: https://learn.microsoft.com/en-us/appcenter/retirement
|
||||
const VisualStudioAppCenterReleasesOSVersion = deprecatedService({
|
||||
const VisualStudioAppCenterReleasesOSVersion = retiredService({
|
||||
category: 'version',
|
||||
route: {
|
||||
base: 'visual-studio-app-center/releases/osver',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
// Visual Studio App Center was retired. See: https://learn.microsoft.com/en-us/appcenter/retirement
|
||||
const VisualStudioAppCenterReleasesSize = deprecatedService({
|
||||
const VisualStudioAppCenterReleasesSize = retiredService({
|
||||
category: 'size',
|
||||
route: {
|
||||
base: 'visual-studio-app-center/releases/size',
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
// Visual Studio App Center was retired. See: https://learn.microsoft.com/en-us/appcenter/retirement
|
||||
const VisualStudioAppCenterReleasesVersion = deprecatedService({
|
||||
const VisualStudioAppCenterReleasesVersion = retiredService({
|
||||
category: 'version',
|
||||
route: {
|
||||
base: 'visual-studio-app-center/releases/version',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
const dateAdded = new Date('2026-04-09')
|
||||
const label = 'visual-studio-marketplace'
|
||||
@@ -6,25 +6,25 @@ const pattern = ':various+'
|
||||
|
||||
export default [
|
||||
// Downloads / Installs
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'downloads',
|
||||
route: { base: 'visual-studio-marketplace/d', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'downloads',
|
||||
route: { base: 'visual-studio-marketplace/i', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'downloads',
|
||||
route: { base: 'vscode-marketplace/d', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'downloads',
|
||||
route: { base: 'vscode-marketplace/i', pattern },
|
||||
label,
|
||||
@@ -32,13 +32,13 @@ export default [
|
||||
}),
|
||||
|
||||
// Version
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'version',
|
||||
route: { base: 'visual-studio-marketplace/v', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'version',
|
||||
route: { base: 'vscode-marketplace/v', pattern },
|
||||
label,
|
||||
@@ -46,25 +46,25 @@ export default [
|
||||
}),
|
||||
|
||||
// Rating / Stars
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'rating',
|
||||
route: { base: 'visual-studio-marketplace/r', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'rating',
|
||||
route: { base: 'visual-studio-marketplace/stars', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'rating',
|
||||
route: { base: 'vscode-marketplace/r', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'rating',
|
||||
route: { base: 'vscode-marketplace/stars', pattern },
|
||||
label,
|
||||
@@ -72,25 +72,25 @@ export default [
|
||||
}),
|
||||
|
||||
// Release date / Last updated
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'activity',
|
||||
route: { base: 'visual-studio-marketplace/release-date', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'activity',
|
||||
route: { base: 'vscode-marketplace/release-date', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'activity',
|
||||
route: { base: 'visual-studio-marketplace/last-updated', pattern },
|
||||
label,
|
||||
dateAdded,
|
||||
}),
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'activity',
|
||||
route: { base: 'vscode-marketplace/last-updated', pattern },
|
||||
label,
|
||||
@@ -98,7 +98,7 @@ export default [
|
||||
}),
|
||||
|
||||
// Azure DevOps installs (covers measure/extensionId segments)
|
||||
deprecatedService({
|
||||
retiredService({
|
||||
category: 'downloads',
|
||||
route: { base: 'visual-studio-marketplace/azure-devops/installs', pattern },
|
||||
label,
|
||||
|
||||
@@ -2,13 +2,13 @@ import { ServiceTester } from '../tester.js'
|
||||
|
||||
export const t = new ServiceTester({
|
||||
id: 'visualstudiomarketplace',
|
||||
title: 'Visual Studio Marketplace (deprecated)',
|
||||
title: 'Visual Studio Marketplace (retired)',
|
||||
pathPrefix: '/visual-studio-marketplace',
|
||||
})
|
||||
|
||||
export const tLegacy = new ServiceTester({
|
||||
id: 'visualstudiomarketplacelegacy',
|
||||
title: 'VSCode Marketplace (deprecated)',
|
||||
title: 'VSCode Marketplace (retired)',
|
||||
pathPrefix: '/vscode-marketplace',
|
||||
})
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deprecatedService } from '../index.js'
|
||||
import { retiredService } from '../index.js'
|
||||
|
||||
export default deprecatedService({
|
||||
export default retiredService({
|
||||
category: 'downloads',
|
||||
route: {
|
||||
base: 'wikiapiary',
|
||||
|
||||
Reference in new issue
Block a user