feat: Remove vite-node#845
Conversation
|
|
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
❌ Deploy Preview for histoire-examples-svelte3 failed.
|
✅ Deploy Preview for histoire-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
❌ Deploy Preview for histoire-examples-vue3 failed.
|
❌ Deploy Preview for histoire-controls failed.
|
There was a problem hiding this comment.
Code Review
This pull request upgrades core dependencies (including Vue, TypeScript, and Vite), migrates the bundling process from Rollup to Rolldown, and replaces vite-node with Vite's native ModuleRunner for story collection. Additionally, it refactors several control components to use Vue 3's defineModel and applies numerous TypeScript type improvements and safety checks. A critical bug was identified in the sidebar tree generation logic where stories belonging to the default group are completely omitted because the default group lacks a configuration object.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| if (group.groupConfig) { | ||
| result.push({ | ||
| group: true, | ||
| id: group.groupConfig.id ?? group.groupConfig.title, | ||
| title: group.groupConfig.title, | ||
| children: buildTree(group.treeObject), | ||
| }) | ||
| } |
There was a problem hiding this comment.
Critical Bug: The default group (defaultGroup) has groupConfig set to null. With this change, when iterating over groups, the default group will fall into the else block, and since group.groupConfig is null, it will do nothing. As a result, all stories belonging to the default group (i.e., any story not explicitly assigned to a group) will be completely omitted from the sidebar tree.
To fix this, we should render the default group's stories at the root level by calling result.push(...buildTree(group.treeObject)) when group.groupConfig is falsy.
if (group.groupConfig) {
result.push({
group: true,
id: group.groupConfig.id ?? group.groupConfig.title,
title: group.groupConfig.title,
children: buildTree(group.treeObject),
})
}
else {
result.push(...buildTree(group.treeObject))
}
WIP