Refactor: Replace generate-command-index.js with esbuild plugin#1111
Conversation
- Removed `scripts/generate-command-index.js`. - Added a custom esbuild plugin in `tsup.config.ts` to dynamically generate and bundle the command index directly during build time. - Updated `plan.md` to prevent config files from being renamed, which would have caused output collisions. - Restored `@types/node` dependency to `"latest"`. Co-authored-by: SjnExe <142050666+SjnExe@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Moved `generateCommandIndexPlugin` from `tsup.config.ts` into a new isolated file `scripts/esbuild-plugin-command-index.js`. - Cleaned up `tsup.config.ts` to simply import the plugin, avoiding clutter. - Removed the old `generate-command-index.js` logic completely from the Github Actions `build.yml` file, fixing the CI failure. Co-authored-by: SjnExe <142050666+SjnExe@users.noreply.github.com>
… regex - Removed the remaining `node scripts/generate-command-index.js` call from `.github/workflows/build.yml` in the `stable` step that caused the `build` check to fail. - Fixed the ESLint `no-useless-escape` warning in `scripts/esbuild-plugin-command-index.js` by changing `[\\\/]` to `[\\/]` in the plugin's `onLoad` filter regex, which caused the `lint` check to fail. Co-authored-by: SjnExe <142050666+SjnExe@users.noreply.github.com>
This PR replaces the manual pre-build step
generate-command-index.jswith a robust esbuild plugin intsup.config.ts. Now,tsuphandles the dynamic import aggregation of command modules at bundle time, eliminating the need for intermediate generated files. The changes also include updates toplan.mdto document the critical exception against renaming config files to prevent output bundle conflicts.PR created automatically by Jules for task 8592049685763482586 started by @SjnExe