build: Improve build efficiency and add dev mode - #1681
Conversation
- Remove duplicate webui build in vscode-ide-companion (fixes double build) - Fix misleading [watch] log messages in esbuild.js (only show in watch mode) - Update vite-plugin-dts to ^4.5.4 for TypeScript 5.8+ support - Update baseline-browser-mapping to ^2.9.19 to silence outdated data warnings - Fix vitest config to use @qwen-code/qwen-code-core instead of old gemini-cli-core - Add resolve.alias in cli vitest.config.ts for source-based testing - Add npm run dev script for running from TypeScript source without build Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
📋 Review SummaryThis PR significantly improves the development and build experience by removing redundant build steps, fixing misleading log messages, updating dependencies, and adding a new dev mode for running the CLI directly from TypeScript source. The changes are well-structured and address several pain points in the development workflow. 🔍 General Feedback
🎯 Specific Feedback🔴 CriticalNo specific issues identified in this review. 🟡 HighNo specific issues identified in this review. 🟢 Medium
🔵 Low
✅ Highlights
|
1 similar comment
📋 Review SummaryThis PR significantly improves the development and build experience by removing redundant build steps, fixing misleading log messages, updating dependencies, and adding a new dev mode for running the CLI directly from TypeScript source. The changes are well-structured and address several pain points in the development workflow. 🔍 General Feedback
🎯 Specific Feedback🔴 CriticalNo specific issues identified in this review. 🟡 HighNo specific issues identified in this review. 🟢 Medium
🔵 Low
✅ Highlights
|
- Update license header to include Qwen copyright - Add error handler for spawn in dev.js - Refactor core/src/index.ts to export all public APIs - Simplify core/index.ts to be a clean re-export - Fix vitest alias to point to package entry Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
VSCode IDE Companion depends on @qwen-code/webui, but npm workspaces build packages in alphabetical order, causing webui to be built after its dependent. Fixed by explicitly defining the build order: 1. test-utils 2. core 3. cli 4. webui 5. sdk 6. vscode-ide-companion Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
When vitest loads @qwen-code/qwen-code-core from source files (via alias), ripgrepUtils.ts failed to find the bundled ripgrep binary because it only handled bundle and transpiled code paths. Added detection for source file loading (.ts files in src/utils/) to correctly resolve the vendor path (2 levels up instead of 3). Also refactored the path resolution logic to be more concise using levelsUp calculation. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
…experience build: Improve build efficiency and add dev mode
TLDR
This PR introduces a new
npm run devmode that allows running the CLI directly from TypeScript source without requiring a build step, significantly improving the development experience. It also includes build efficiency improvements, logging fixes, and dependency updates.Dive Deeper
Developer Experience (Primary)
npm run devscript: A new development entry point that runs the CLI directly from TypeScript source files using tsx and Node.js loader hooks. Changes to packages/core or packages/cli are reflected immediately without rebuilding. This eliminates the build-wait-test cycle during development.Build Efficiency Improvements
build:devandbuild:prodscripts.Logging Fixes
Dependency Updates
Testing Configuration
Reviewer Test Plan
npm run dev -- helpto verify the CLI starts without a build stepnpm run buildin vscode-ide-companion and verify it no longer rebuilds webuicd packages/vscode-ide-companion && npm run build:dev- should not show redundant webui buildTesting Matrix
Linked issues / bugs
No linked issues
🤖 Generated with Qwen Code