docs(adr): document load and dispose lifecycle hooks#544
Open
tbouffard wants to merge 1 commit into
Open
Conversation
The plugin support ADR only described the construct and onConfigure lifecycle steps. Commit 58a2446 added four optional hooks to the Plugin interface (onBeforeLoad, onLoadSuccess, onLoadError, onDispose), so the ADR no longer matched the implementation. Align the ADR with the Plugin interface JSDoc: list all six hooks in the interface contract, extend the lifecycle enumeration with the per-load hooks and disposal, add a decision driver and a consequence about reacting to the load/dispose lifecycle without client code wiring. Status stays draft.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Aligns the plugin support ADR (
docs/adr/0001-plugin-support.md) with the current implementation.Problem
Commit 58a2446 (
feat: add plugin lifecycle hooks for load and dispose, #540) added four optional hooks to thePlugininterface:onBeforeLoad,onLoadSuccess,onLoadError,onDispose. The ADR still only described theconstructandonConfiguresteps, so it no longer matched the code.Changes
Plugininterface JSDoc (source of truth).loadcan run multiple times and thatonLoadErrorfires before the error is rethrown) and disposal.statusstaysdraft.Verification
Each hook described in the ADR was cross-checked against the real signatures in
packages/addons/src/plugins-support.ts.