feat(theme): emit stability blockquotes for JSDoc stability tags#17
Merged
avivkeller merged 3 commits intowebpack:mainfrom Mar 13, 2026
Merged
Conversation
- Add stabilityBlockquote() helper in helpers/index.mjs that maps: @deprecated -> Stability 0, @experimental/@beta -> Stability 1, @legacy -> Stability 3 - Call helper at top of signature() so blockquote appears before params - Pass showTags: false to comment() to suppress old heading-style rendering - Regenerate pages/ with updated output (26 deprecated members fixed) Note: accessor-level @deprecated tags use a separate render path and are not yet handled. See PR description for details. Closes webpack#8
avivkeller
approved these changes
Mar 13, 2026
Member
avivkeller
left a comment
There was a problem hiding this comment.
Can you add a new line between stability blockquotes and the typed list?
Closed
Contributor
Author
Done — pushed the fix. |
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.
Summary
Currently, members annotated with
@deprecated,@experimental/@beta, or@legacyin the webpack type definitions render stability information as a plain heading (e.g.###### Deprecated) at the bottom of the member section. This PR adds Node.js-style stability blockquotes that appear at the top of the member — before parameters and return type — following the format used in Node.js docs.Two files are changed:
plugins/theme/helpers/index.mjs— adds a newstabilityBlockquote(comment)helper that inspects a TypeDocCommentobject and returns the appropriate blockquote string ornull:@deprecated→> Stability: 0 - Deprecated[: message]@experimental/@beta→> Stability: 1 - Experimental@legacy→> Stability: 3 - Legacy[: message]plugins/theme/partials/index.mjs— updates thesignature()partial to prepend the stability blockquote before all other content, and passesshowTags: falsetoctx.partials.comment()to prevent TypeDoc from also rendering a duplicate###### Deprecatedheading.Before:
After:
Note: Members rendered via the
accessorpartial bypasssignature()and are not covered by this change (6 cases).Accessor-level @deprecated tags use a separate render path (accessor partial) that calls comment() directly. These 6 cases are not yet fixed. Requesting maintainer input on the preferred approach. This can be addressed in a follow-up.
What kind of change does this PR introduce?
feat
Did you add tests for your changes?
No. The project does not currently have a test suite for theme partials/helpers. The output was verified manually by regenerating docs with
npm run generate-docsand inspecting the changed pages.Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
No documentation changes needed. The stability blockquote format is self-explanatory and consistent with Node.js conventions.
Use of AI
I used Claude to assist with drafting parts of the implementation. All code was reviewed and understood before committing. I have read the AI policy at https://github.com/webpack/governance/blob/main/AI_POLICY.md.