-
Notifications
You must be signed in to change notification settings - Fork 553
improvement(api-markdown-documenter): Don't support LineBreakNode
s as BlockContent
#24767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improvement(api-markdown-documenter): Don't support LineBreakNode
s as BlockContent
#24767
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes support for the redundant LineBreakNode in BlockContent contexts. The changes include eliminating the LineBreakNode import and its mapping in BlockContent, removing filtering logic for adjacent line breaks in TsdocNodeTransforms, and updating the API reports, package version, and changelog.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tools/api-markdown-documenter/src/documentation-domain/BlockContent.ts | Removed LineBreakNode import and mapping from the BlockContentMap. |
tools/api-markdown-documenter/src/api-item-transforms/TsdocNodeTransforms.ts | Replaced mutation with a const declaration and removed redundant filtering logic and the now-unused helper function. |
tools/api-markdown-documenter/api-report/api-markdown-documenter.public.api.md | Removed the LineBreakNode entry from the public API report. |
tools/api-markdown-documenter/api-report/api-markdown-documenter.beta.api.md | Removed the LineBreakNode entry from the beta API report. |
tools/api-markdown-documenter/api-report/api-markdown-documenter.alpha.api.md | Removed the LineBreakNode entry from the alpha API report. |
tools/api-markdown-documenter/package.json | Updated the package version to reflect the changes. |
tools/api-markdown-documenter/CHANGELOG.md | Added a changelog entry documenting the removal of LineBreakNode from BlockContent. |
Comments suppressed due to low confidence (8)
tools/api-markdown-documenter/src/documentation-domain/BlockContent.ts:8
- Removal of the LineBreakNode import from BlockContent.ts is consistent with the design change; please confirm that no other dependent logic requires this type.
import type { LineBreakNode } from "./LineBreakNode.js";
tools/api-markdown-documenter/src/api-item-transforms/TsdocNodeTransforms.ts:108
- The shift from a mutable to an immutable declaration and the removal of redundant new line filtering improves code clarity.
let transformedChildren: BlockContent[] = [];
tools/api-markdown-documenter/src/api-item-transforms/TsdocNodeTransforms.ts:472
- Removal of the filterNewlinesAdjacentToParagraphs function is appropriate given that LineBreakNodes are no longer supported; ensure tests cover this change.
function filterNewlinesAdjacentToParagraphs(nodes: readonly BlockContent[]): BlockContent[] { ... }
tools/api-markdown-documenter/api-report/api-markdown-documenter.public.api.md:168
- Removal of the LineBreakNode mapping in the public API report aligns with the updated design.
lineBreak: LineBreakNode;
tools/api-markdown-documenter/api-report/api-markdown-documenter.beta.api.md:168
- Removing the LineBreakNode mapping from the beta API report is consistent with the overall removal of support.
lineBreak: LineBreakNode;
tools/api-markdown-documenter/api-report/api-markdown-documenter.alpha.api.md:168
- Removal of the LineBreakNode mapping in the alpha API report is consistent with the updated design.
lineBreak: LineBreakNode;
tools/api-markdown-documenter/package.json:3
- The version bump to 0.21.0 is appropriate and reflects the changes made; ensure that related documentation and tests are updated accordingly.
"version": "0.21.0",
tools/api-markdown-documenter/CHANGELOG.md:3
- The changelog entry clearly documents the removal of LineBreakNode from BlockContent; ensure consistency in all release notes.
## 0.21.0
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
Block Content items are implicitly separated by a line break, so allowing
LineBreakNode
s in that context is redundant and was not needed.Support for
LineBreakNode
s inBlockContent
contexts has been removed.