Skip to content

Commit 6b38dbe

Browse files
docs: add JSDoc comments for wrapper
1 parent 2871f37 commit 6b38dbe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.storybook/blocks/utilities.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ try {
2525
}
2626

2727
/**
28-
* Gets all component directories that have a specific status
29-
* Only works in Node.js environment
28+
* Gets all component directories that have a specific status.
29+
* This is a Storybook-facing "wrapper" that defers the actual work to the
30+
* Node.js script in tasks/migrated-component-scanner.js. In this browser this
31+
* wrapper returns an empty array and prevents bundlers from pulling in fs/path
32+
* and avoiding runtime errors.
3033
* @param {Object} options Options for filtering components
3134
* @param {string} options.statusType Status type to filter by (e.g., 'migrated')
3235
* @returns {string[]} Array of matching component directory names

0 commit comments

Comments
 (0)