-
Task
-
Resolution: Done
-
Blocker
-
1.4
-
None
Migration and Deprecation Checklist:
- Remove `src/run.ts` and associated files
- Update `dev/index.ts` to use the new backend system
- Delete the `src/dynamic` directory
- Delete the `src/alpha.ts` file
- If applicable, update `src/index.ts` to export the plugin/module as `default`
- If there are multiple modules/plugins in a package, reference the `ocm-backend` PR. Please notify pschultz@redhat.com as well.
- Remove all references to `alpha` in `package.json`
- If applicable, remove the `@backstage/backend-dynamic-feature-service` dependency
- Remove all references to `backstage/backend-common` and remove the dependency
- Update tests to use `startTestBackend` (if applicable)
- Update module/plugin-specific tests to use `startTestBackend`
- Do not migrate provider-specific tests to `startTestBackend`
- Examples provided in referenced PRs
- Update providers (if applicable) to use `deps` for required services and `options` for optional args
- Use `backstage/errors` when applicable
- Update `config.d.ts`
- Review the dependencies to determine if any can be moved to devDependencies by using the type modifier in the import statement. For example, change import { LoggerService } from '@backstage/backend-plugin-api'; to import type { LoggerService } from '@backstage/backend-plugin-api';. If the dependency is only used for type imports, it can be safely moved to a devDependency.
- Clean up unused dependencies in `package.json`
- Remove `express-service-static-core` and `express-promise-router`
- Replace `import { Request } from 'express-serve-static-core';` with `import { Request } from 'express';`
- Replace `import Router from "express-promise-router";` with `import { Router } from 'express';` and change the types to `Promise<Router>`
- Run `yarn export-dynamic --clean` if applicable
- Remove legacy backend references in `README.md`
- Going forward, we should avoid manually mocking any services. Refer to the OCM router tests here.
Example PRs: