-
Notifications
You must be signed in to change notification settings - Fork 536
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
refactor(api-markdown-documenter): Unify "file-safe-name" helper utilities #23394
refactor(api-markdown-documenter): Unify "file-safe-name" helper utilities #23394
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.
Copilot reviewed 5 out of 9 changed files in this pull request and generated no comments.
Files not reviewed (4)
- tools/api-markdown-documenter/src/api-item-transforms/ApiItemTransformUtilities.ts: Evaluated as low risk
- tools/api-markdown-documenter/src/ApiItemUtilitiesModule.ts: Evaluated as low risk
- tools/api-markdown-documenter/src/api-item-transforms/helpers/Helpers.ts: Evaluated as low risk
- tools/api-markdown-documenter/src/api-item-transforms/configuration/DocumentationSuite.ts: Evaluated as low risk
* Accounts for method overloads by adding a suffix such as "myMethod_2". | ||
* Converts invalid filename characters to underscores. | ||
*/ | ||
function getFileSafeNameForName(apiItemName: string): string { |
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.
Code that was previously using this helper directly were (incorrectly) not getting the qualified naming for cases like overloads.
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.
One small thing, lgtm otherwise
tools/api-markdown-documenter/src/utilities/ApiItemUtilities.ts
Outdated
Show resolved
Hide resolved
tools/api-markdown-documenter/src/utilities/ApiItemUtilities.ts
Outdated
Show resolved
Hide resolved
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
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.
🚀
Refactors a small collection of utility functions aimed at generating consistent, unique, and file-name-safe identifiers for API items (used for naming files, heading IDs, etc.). Unifies all of the exported functions aimed at providing this functionality into a single one, which also now captures package-name policy (previously duplicated in a few places).
Breaking change: publicly exposed function is now called
getFileSafeNameForApiItem