-
-
Notifications
You must be signed in to change notification settings - Fork 98
Unify the main function name of Integration packages #657
Copy link
Copy link
Open
Labels
breaking changeBreaking changeBreaking changecomponent/federationFederation object relatedFederation object relatedcomponent/integrationWeb framework integrationWeb framework integrationtype/enhancementImprovements to existing featuresImprovements to existing featurestype/refactorCode refactoringCode refactoring
Metadata
Metadata
Assignees
Labels
breaking changeBreaking changeBreaking changecomponent/federationFederation object relatedFederation object relatedcomponent/integrationWeb framework integrationWeb framework integrationtype/enhancementImprovements to existing featuresImprovements to existing featurestype/refactorCode refactoringCode refactoring
Summary
Unify the main function names of Integration packages.
Problem
For most Integration packages, the main component is a function of type
<TContextData>(federation: Federation<TContextData>, contextDataFactory: ContextDataFactory<TContextData>) => Handler<TContextData>that takes aFederationobject and aContextDataFactoryfactory function and turns them into a middleware handler. However, the name of this function differs by package, adding to user confusion.Proposed Solution
To reduce this confusion, we are unifying the main function names. Just as the
ContextDataFactorytype is defined separately for each package but has the same name, it should be entirely possible to unify the main function names as well.Alternatives Considered
However, changing all the name right now would cause even greater confusion for users. To avoid this, in the current 2.x version, we will unify the names and keep the existing names as aliases, but mark them as
deprecatedto encourage users to use the unified name.Scope / Dependencies
packages/init: template filesAdditional Suggestions
() => void 0.