[fix] TypeScript errors in manager/compatibility branch (#4625)

This commit is contained in:
Jin Yi
2025-07-31 15:34:03 +09:00
parent e085bb4c0f
commit 104bd43dc1
6 changed files with 16 additions and 16 deletions

View File

@@ -606,7 +606,6 @@ describe('PackVersionSelectorPopover', () => {
})
})
it('shows banned package warnings', async () => {
// Set up the mock for versions
mockGetPackVersions.mockResolvedValueOnce(defaultMockVersions)

View File

@@ -147,7 +147,7 @@ const onToggle = debounce(
const handleToggleInteraction = async (event: Event) => {
if (!canToggleDirectly.value) {
event.preventDefault()
showConflictModal()
showConflictModal(false)
}
}
</script>

View File

@@ -35,7 +35,7 @@ import { getConflictMessage } from '@/utils/conflictMessageUtil'
const { nodePack, conflictResult } = defineProps<{
nodePack: components['schemas']['Node']
conflictResult: ConflictDetectionResult | null
conflictResult: ConflictDetectionResult | null | undefined
}>()
const packageId = computed(() => nodePack?.id || '')

View File

@@ -28,6 +28,7 @@ import {
type ShowDialogOptions,
useDialogStore
} from '@/stores/dialogStore'
import type { ConflictDetectionResult } from '@/types/conflictDetectionTypes'
export type ConfirmationDialogType =
| 'default'
@@ -434,6 +435,7 @@ export const useDialogService = () => {
function showNodeConflictDialog(
options: {
showAfterWhatsNew?: boolean
conflictedPackages?: ConflictDetectionResult[]
dialogComponentProps?: DialogComponentProps
buttonText?: string
onButtonClick?: () => void
@@ -443,7 +445,8 @@ export const useDialogService = () => {
dialogComponentProps,
buttonText,
onButtonClick,
showAfterWhatsNew
showAfterWhatsNew,
conflictedPackages
} = options
return dialogStore.showDialog({
@@ -467,7 +470,8 @@ export const useDialogService = () => {
...dialogComponentProps
},
props: {
showAfterWhatsNew
showAfterWhatsNew,
conflictedPackages
},
footerProps: {
buttonText,

View File

@@ -9,7 +9,7 @@ import type { ConflictDetectionResult } from '@/types/conflictDetectionTypes'
// Mock getConflictMessage utility
vi.mock('@/utils/conflictMessageUtil', () => ({
getConflictMessage: vi.fn((conflict, t) => {
getConflictMessage: vi.fn((conflict) => {
return `${conflict.type}: ${conflict.current_value} vs ${conflict.required_value}`
})
}))

View File

@@ -907,9 +907,7 @@ describe.skip('useConflictDetection with Registry Store', () => {
})
it('should expose conflict modal display method', () => {
const {
shouldShowConflictModalAfterUpdate
} = useConflictDetection()
const { shouldShowConflictModalAfterUpdate } = useConflictDetection()
expect(shouldShowConflictModalAfterUpdate).toBeDefined()
})
@@ -969,7 +967,6 @@ describe.skip('useConflictDetection with Registry Store', () => {
expect(result).toBe(true) // Should show modal when conflicts exist and not dismissed
})
it('should detect system environment correctly', async () => {
// Mock system environment
mockSystemStatsStore.systemStats = {