feat: suggest installing dependency as devDependency when appropriate#1052
feat: suggest installing dependency as devDependency when appropriate#1052wojtekmaj wants to merge 3 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
2e5f52c to
52c29be
Compare
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
📝 WalkthroughWalkthroughAdds dev-dependency suggestion and dev-install command support. Introduces a Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This pull request implements automatic detection and suggestion of dev dependency installation commands for packages that are typically installed as development dependencies. The feature addresses issue #530 by helping developers avoid mistakenly adding dev-only tools as regular dependencies.
Changes:
- Added dev dependency detection heuristics based on a curated list of known dev packages and README analysis
- Updated install command generation to support a
devflag that adds the appropriate flag (-Dor-dfor bun) to the install command - Modified the Terminal/Install UI component to display a suggested dev install command when appropriate
- Added internationalization support for the new UI text in English and Polish locales
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
app/utils/install-command.ts |
Core logic for dev dependency detection, including known package list, README parsing, and command generation with dev flags |
app/components/Terminal/Install.vue |
UI implementation showing suggested dev install command when recommended, with copy functionality |
app/pages/package/[...package].vue |
Integration to pass README HTML data to Terminal/Install component |
test/unit/app/utils/install-command.spec.ts |
Comprehensive tests for dev install commands, detection heuristics, and flag generation |
i18n/locales/en.json, pl-PL.json, en-GB.json, en-US.json |
Translation strings for new UI text |
lunaria/files/*.json |
Translation tracking files for localization workflow |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
app/components/Terminal/Install.vue (1)
161-194: Remove the per-button focus‑visible outline utility.The new dev install copy button adds an inline
focus-visible:outline-accent/70class, but button focus outlines are handled globally. Please drop the outline utility and rely on the global rule.Suggested change
- class="px-2 py-0.5 font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border rounded transition-colors duration-200 opacity-0 group-hover/devinstallcmd:opacity-100 hover:(text-fg border-border-hover) active:scale-95 focus-visible:opacity-100 focus-visible:outline-accent/70 select-none" + class="px-2 py-0.5 font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border rounded transition-colors duration-200 opacity-0 group-hover/devinstallcmd:opacity-100 hover:(text-fg border-border-hover) active:scale-95 focus-visible:opacity-100 select-none"Based on learnings: focus-visible styling for button and select elements is implemented globally in app/assets/main.css; avoid per-element focus-visible utility classes like focus-visible:outline-accent/70.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Closes #530
Examples: