fedify icon indicating copy to clipboard operation
fedify copied to clipboard

Remove deprecated APIs for Fedify 2.0

Open dahlia opened this issue 4 months ago • 3 comments

Overview

This issue tracks the removal of all deprecated APIs that need to be removed in Fedify 2.0.0 as part of the major version cleanup.

APIs to Remove

1. Federation Configuration

  • [x] Remove documentLoader property from FederationOptions interface: #393

    • Location: packages/fedify/src/federation/federation.ts:680
    • Migration: Use documentLoaderFactory instead
  • [x] Remove contextLoader property from FederationOptions interface

    • Location: packages/fedify/src/federation/federation.ts:687
    • Migration: Use contextLoaderFactory instead
  • [ ] Remove CreateFederationOptions<TContextData> interface

    • Location: packages/fedify/src/federation/middleware.ts:113
    • Migration: Use FederationOptions directly

2. Document Loader

  • [ ] Remove fetchDocumentLoader() function
    • Location: packages/fedify/src/runtime/docloader.ts:398
    • Migration: Use getDocumentLoader() instead

3. Handle Property Support

  • [ ] Remove { handle: string } option support from:
    • SharedInboxKeyDispatcher return type
    • Context.getDocumentLoader() parameter
    • Context.sendActivity() parameter
    • Context.forwardActivity() parameter
    • All related type definitions and runtime handling code
    • Locations:
      • packages/fedify/src/federation/callback.ts:201,207
      • packages/fedify/src/federation/context.ts:229,379,395,605,626
      • packages/fedify/src/federation/middleware.ts:739,1364,2021,2024,2029-2034,2194,2202-2205,2811,2820-2823
    • Migration: Use { identifier: string } or { username: string } instead

4. CLI Commands

  • [x] Remove fedify node command alias
    • Location: packages/cli/src/nodeinfo.ts:43-47
    • Migration: Use fedify nodeinfo instead

Implementation Notes

Code Changes Required

  1. Remove all deprecated properties, interfaces, and functions
  2. Remove all runtime deprecation warnings related to these APIs
  3. Update all internal code that might still be using these deprecated APIs
  4. Remove all test cases specifically for deprecated APIs
  5. Update type exports to exclude removed interfaces

Documentation Updates

  1. Update migration guide for 2.0
  2. Remove deprecated API references from all documentation
  3. Add clear migration paths in the changelog

Breaking Changes

All removals listed above are breaking changes and should be clearly documented in:

  • CHANGES.md under version 2.0.0
  • Migration guide from 1.x to 2.0
  • Release notes

Testing

  • [ ] Ensure all tests pass after removal
  • [ ] Verify no internal code is using removed APIs
  • [ ] Check that type definitions compile correctly
  • [ ] Test migration paths work as documented

dahlia avatar Aug 21 '25 11:08 dahlia

Can I take that issue? I will carefully follow the implementation plan.

crohasang avatar Aug 24 '25 16:08 crohasang

@crohasang Sure! Thanks!

dahlia avatar Aug 24 '25 21:08 dahlia

Remove fedify node command alias is done at #414

dodok8 avatar Sep 13 '25 05:09 dodok8