Skip to content

Commit 05e1f37

Browse files
committed
chore: rename markdown output format to list
1 parent 16680e6 commit 05e1f37

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

main.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,13 @@ function formatHierarchy(hierarchy, prefix = "", isLast = true) {
223223
}
224224

225225
/**
226-
* Formats a component hierarchy as a markdown list, showing only complete paths
226+
* Formats a component hierarchy as a list, showing complete paths grouped by location
227227
* @param {Object} hierarchy - Component hierarchy object
228228
* @param {string} parentPath - Current path in the component tree
229229
* @param {Object|null} firstUsageLocation - Location where the first child component uses the target
230-
* @returns {string} Formatted markdown list
230+
* @returns {string} Formatted list
231231
*/
232-
function getMarkdownList(
233-
hierarchy,
234-
parentPath = "",
235-
firstUsageLocation = null
236-
) {
232+
function getList(hierarchy, parentPath = "", firstUsageLocation = null) {
237233
let result = "";
238234
const pathsByLocation = new Map();
239235
let totalPaths = 0; // Add counter for verification
@@ -418,7 +414,7 @@ async function main() {
418414
let output = "";
419415
if (viewResponse.viewList) {
420416
if (viewResponse.format === "markdown") {
421-
output = getMarkdownList(hierarchy);
417+
output = getList(hierarchy);
422418
console.log("\nComponent Usage List:");
423419
} else {
424420
output = formatHierarchy(hierarchy);
@@ -455,4 +451,4 @@ if (process.argv[1] === fileURLToPath(import.meta.url)) {
455451
main();
456452
}
457453

458-
export { analyze, formatHierarchy, getMarkdownList };
454+
export { analyze, formatHierarchy, getList };

0 commit comments

Comments
 (0)