Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
app/components/Package/Replacement.vue (1)
8-22: ExtractresolveUrlto a shared utility to avoid duplication.This function is identical to the one in
app/components/Compare/ReplacementSuggestion.vue(lines 17-31). Consider extracting it to a shared composable or utility file to prevent code drift and ease maintenance.♻️ Suggested approach
Create a shared utility, e.g.
app/utils/resolveReplacementUrl.ts:import type { KnownUrl } from 'module-replacements' export function resolveReplacementUrl(url?: KnownUrl): string | null { if (!url) return null if (typeof url === 'string') return url switch (url.type) { case 'mdn': return `https://developer.mozilla.org/en-US/docs/${url.id}` case 'node': return `https://nodejs.org/${url.id}` case 'e18e': return `https://e18e.dev/docs/replacements/${url.id}` default: return null } }Then import and use in both components.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5d57e7a1-352a-4ca0-bbf6-8b2a365896a2
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (35)
app/components/Compare/ReplacementSuggestion.vueapp/components/Package/Replacement.vuei18n/locales/ar.jsoni18n/locales/az-AZ.jsoni18n/locales/bg-BG.jsoni18n/locales/bn-IN.jsoni18n/locales/cs-CZ.jsoni18n/locales/de-DE.jsoni18n/locales/en.jsoni18n/locales/es.jsoni18n/locales/fr-FR.jsoni18n/locales/hi-IN.jsoni18n/locales/hu-HU.jsoni18n/locales/id-ID.jsoni18n/locales/it-IT.jsoni18n/locales/ja-JP.jsoni18n/locales/kn-IN.jsoni18n/locales/mr-IN.jsoni18n/locales/nb-NO.jsoni18n/locales/ne-NP.jsoni18n/locales/pl-PL.jsoni18n/locales/pt-BR.jsoni18n/locales/ru-RU.jsoni18n/locales/ta-IN.jsoni18n/locales/te-IN.jsoni18n/locales/tr-TR.jsoni18n/locales/uk-UA.jsoni18n/locales/zh-CN.jsoni18n/locales/zh-TW.jsoni18n/schema.jsonpackage.jsonserver/api/replacements/[...pkg].get.tstest/nuxt/a11y.spec.tstest/nuxt/composables/use-compare-replacements.spec.tstest/nuxt/composables/use-replacement-dependencies.spec.ts
💤 Files with no reviewable changes (17)
- i18n/locales/zh-CN.json
- i18n/locales/ja-JP.json
- i18n/locales/cs-CZ.json
- i18n/locales/zh-TW.json
- i18n/locales/uk-UA.json
- i18n/locales/az-AZ.json
- i18n/locales/pl-PL.json
- i18n/locales/de-DE.json
- i18n/locales/bg-BG.json
- i18n/locales/ru-RU.json
- i18n/locales/es.json
- i18n/locales/en.json
- i18n/locales/fr-FR.json
- i18n/locales/id-ID.json
- i18n/schema.json
- i18n/locales/hu-HU.json
- i18n/locales/tr-TR.json
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7424dab9-5a11-408b-9f4c-9094682f5131
📒 Files selected for processing (3)
app/components/Compare/ReplacementSuggestion.vueapp/components/Package/Replacement.vueapp/utils/resolve-replacement-url.ts
|
For some reason this doesn't have Node.js version |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/components/Compare/ReplacementSuggestion.vue (1)
18-23: De-duplicate the replacement metadata parsing.
docUrlandnodeVersionnow mirror the logic inapp/components/Package/Replacement.vue. Moving both into a small shared utility next toresolveReplacementUrlwould keep the compare and package views aligned, and future schema changes would only need one fix.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 54a2bc78-0d01-4fee-bec0-69e066b02e3f
📒 Files selected for processing (2)
app/components/Compare/ReplacementSuggestion.vueapp/components/Package/Replacement.vue
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 59577309-1a31-409d-b9a4-c7029692555b
📒 Files selected for processing (3)
app/components/Compare/ReplacementSuggestion.vueapp/components/Package/Replacement.vuei18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
- i18n/locales/en.json
There was a problem hiding this comment.
🧹 Nitpick comments (2)
app/components/Package/Replacement.vue (2)
42-50: Guard against missing description for simple replacements.If
replacement.descriptionis undefined or empty for a simple replacement, line 43 will render nothing, leaving an empty<div class="mb-2">element. Consider adding a fallback or conditional rendering.Proposed fix
<div v-else-if="replacement.type === 'simple'" class="block"> - <div class="mb-2">{{ replacement.description }}</div> + <div v-if="replacement.description" class="mb-2">{{ replacement.description }}</div> <div v-if="replacement.example">
71-73: Guard against missing description for removal replacements.Similar to the simple type, if
replacement.descriptionis undefined for a removal, the template will render nothing. Consider adding a fallback.Proposed fix
<template v-else-if="replacement.type === 'removal'"> - {{ replacement.description }} + {{ replacement.description || replacement.id }} </template>
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f0dd13a4-3ed7-4e63-858d-9ea81677b376
📒 Files selected for processing (2)
app/components/Package/Replacement.vuei18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
- i18n/locales/en.json
|
@coderabbitai what should I do with these failing readonly types? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 30290 🌐 Web query: 💡 Result: In TypeScript types (beta.0)The published/source TypeScript types define:
Notably, in the source types for If you’re seeing Sources: Citations:
🏁 Script executed: Length of output: 17106 🏁 Script executed: Length of output: 2086 🏁 Script executed: Length of output: 904 🏁 Script executed: Length of output: 2408
When you wrap a noDepSuggestions: readonly(noDepSuggestions), // ComputedRef<ReplacementSuggestion[]>Vue's type system produces The fix: In return {
replacements: readonly(replacements),
- noDepSuggestions: readonly(noDepSuggestions),
- infoSuggestions: readonly(infoSuggestions),
+ noDepSuggestions,
+ infoSuggestions,
loading: readonly(loading),
}This removes the unnecessary |





Try module replacements v3