chore(deps): bump vite-plus to v0.2.2#29
Conversation
…x-dev#2717) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Willow (GHOST) <git@willow.sh>
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.
Code Review
This pull request refactors the markdown rendering and sanitization logic by extracting shared utilities into a new mdKit.ts module, introduces a ChangelogSkeleton component for loading states, adds a heading version matcher, and updates dependencies and localizations. Key feedback includes resolving a runtime ReferenceError from using $t in Card.vue's script setup, restoring a guard in usePackageChangelog.ts to prevent invalid API requests, adding a missing :key in Skeleton.vue's v-for loop, removing a leftover console.log and fixing a regex bug in mdKit.ts, and adding mdKit.ts to uno.config.ts to ensure UnoCSS compiles the required icons.
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.
| const { providerIcon, viewOnProvider } = inject<{ | ||
| providerIcon: MaybeRef<IconClass> | ||
| viewOnProvider: MaybeRef<string> | ||
| }>('changelog-provider-linkattr', { | ||
| providerIcon: 'i-lucide:code', | ||
| viewOnProvider: computed(() => $t('common.view_on.git_repo')), | ||
| }) |
There was a problem hiding this comment.
Using $t directly inside the <script setup> block will throw a ReferenceError: $t is not defined at runtime because global template helpers are not automatically bound to the script scope. Instead, use the useI18n composable to retrieve the t function.
const { t } = useI18n()
const { providerIcon, viewOnProvider } = inject<{
providerIcon: MaybeRef<IconClass>
viewOnProvider: MaybeRef<string>
}>('changelog-provider-linkattr', {
providerIcon: 'i-lucide:code',
viewOnProvider: computed(() => t('common.view_on.git_repo')),
})
| export function usePackageChangelog( | ||
| packageName: MaybeRefOrGetter<string | null | undefined>, | ||
| packageName: MaybeRefOrGetter<string>, | ||
| version?: MaybeRefOrGetter<string | null | undefined>, | ||
| ) { | ||
| return useLazyFetch<ChangelogInfo | null>(() => { | ||
| const name = toValue(packageName) | ||
| if (!name) return 'data:application/json,null' // returns null | ||
| const ver = toValue(version) | ||
| return `/api/changelog/info/${name}/v/${ver || 'latest'}` | ||
| }) | ||
| } | ||
|
|
||
| /** | ||
| * check whether the current package & version has changelogs | ||
| * @param setState with `useState` also set the state of `changelog:info` (currently only for packageHeader) | ||
| */ | ||
| export function usePackageHasChangelog( | ||
| packageName: MaybeRefOrGetter<string>, | ||
| version?: MaybeRefOrGetter<string | null | undefined>, | ||
| setState?: boolean, | ||
| ) { |
There was a problem hiding this comment.
When props.pkg is initially null or loading, packageName can evaluate to an empty string (''). Without a guard, this triggers broken API requests to /api/changelog/info//v/latest. Restoring the !name guard and allowing nullable types prevents these invalid requests.
export function usePackageChangelog(
packageName: MaybeRefOrGetter<string | null | undefined>,
version?: MaybeRefOrGetter<string | null | undefined>,
) {
return useLazyFetch<ChangelogInfo | null>(() => {
const name = toValue(packageName)
if (!name) return null
const ver = toValue(version)
return '/api/changelog/info/' + name + '/v/' + (ver || 'latest')
})
}
/**
* check whether the current package & version has changelogs
* @param setState with `useState` also set the state of `changelog:info` (currently only for packageHeader)
*/
export function usePackageHasChangelog(
packageName: MaybeRefOrGetter<string | null | undefined>,
version?: MaybeRefOrGetter<string | null | undefined>,
setState?: boolean,
) {| <template> | ||
| <SkeletonBlock class="h-8 w-40 rounded" /> | ||
| <ul class="ms-3 list-disc my-4 ps-6 marker:color-[--border-hover]"> | ||
| <li class="mb-1" v-for="_n in 5"> |
| if (exemptIssuePr && /^#\d+\b/.test(match[0])) return false | ||
|
|
||
| console.log({ match, test: /^#\d+\b/.test(match[0]), exemptIssuePr }) |
There was a problem hiding this comment.
There are two issues here:
- A leftover debug
console.logis present in the production code path. - Testing
match[0]with/^#\d+\b/fails to exempt issues/PRs if there are any leading spaces (sincematch[0]includes the matched leading spaces from^ {0,3}). Testingmatch[1]andmatch[2]directly is more robust and correctly handles leading spaces.
| if (exemptIssuePr && /^#\d+\b/.test(match[0])) return false | |
| console.log({ match, test: /^#\d+\b/.test(match[0]), exemptIssuePr }) | |
| if (exemptIssuePr && match[1] === '#' && /^\d+\b/.test(match[2])) return false |
| include: [ | ||
| /\.(vue|mdx|html)($|\?)/, | ||
| // git provider icons composable | ||
| '**/composables/useProviderIcon.ts', | ||
| ], |
There was a problem hiding this comment.
Since server/utils/mdKit.ts is not a .vue, .mdx, or .html file, the icons used within it (such as i-lucide:check and i-lucide:copy) will not be scanned or generated by UnoCSS. Adding server/utils/mdKit.ts to the include array ensures these icons are correctly compiled.
include: [
/\.(vue|mdx|html)($|\?)/,
// git provider icons composable
'**/composables/useProviderIcon.ts',
// markdown kit utility (contains copy/check icons)
'**/server/utils/mdKit.ts',
]
e18e dependency analysisNo dependency warnings found. |
Summary
Bump
vite-plusand related packages to the pkg.pr.new prerelease build for v0.2.2 (registry-bridge commit build) to smoke-test the prerelease.vite-plus+vite(alias to@voidzero-dev/vite-plus-core) andvitestpinned to the commit build across deps / overrides / catalogsminimumReleaseAgeenabled with thevite-plus/@voidzero-dev/*/ oxc / oxlint stack excluded.npmrc(or.yarnrc.yml) points the package manager at the registry bridge (prerelease scaffolding)Test plan