From c17681850683869c51c120972fbde68e5f56d4b7 Mon Sep 17 00:00:00 2001 From: jtw Date: Fri, 13 Feb 2026 23:15:09 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=EB=B6=80=EB=8F=99=EC=86=8C=EC=88=98?= =?UTF-8?q?=EC=A0=90=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/kkuko/profile/components/ItemModal.tsx | 4 ++-- app/kkuko/profile/utils/profileHelper.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/kkuko/profile/components/ItemModal.tsx b/app/kkuko/profile/components/ItemModal.tsx index ee49287..733a935 100644 --- a/app/kkuko/profile/components/ItemModal.tsx +++ b/app/kkuko/profile/components/ItemModal.tsx @@ -17,7 +17,7 @@ export default function ItemModal({ itemsData, profileData, onClose }: ItemModal const itemOptionUI = (key: string, value: number) => (
{getOptionName(key)}: - {value > 0 ? '+' : ''}{formatNumber(value * (key[0] === 'g' ? 100000 : 1000))}{key[0] === 'g' ? '%p' : ''} + {value > 0 ? '+' : ''}{formatNumber(value * (key[0] === 'g' ? 100 : 1000))}{key[0] === 'g' ? '%p' : ''}
) @@ -71,7 +71,7 @@ export default function ItemModal({ itemsData, profileData, onClose }: ItemModal const imageGroup = getImageGroup(); return ( -
+
{/* Item Image */} {imageGroup && ( diff --git a/app/kkuko/profile/utils/profileHelper.ts b/app/kkuko/profile/utils/profileHelper.ts index 8546e98..da167e2 100644 --- a/app/kkuko/profile/utils/profileHelper.ts +++ b/app/kkuko/profile/utils/profileHelper.ts @@ -37,7 +37,7 @@ export const extractColorFromLabel = (description: string, isDarkTheme: boolean) }; export const formatNumber = (num: number): string => { - return (num / 1000).toString(); + return num.toFixed(3).replace(/\.?0+$/, ''); }; export const calculateTotalOptions = (itemsData: ItemInfo[]) => { @@ -48,13 +48,13 @@ export const calculateTotalOptions = (itemsData: ItemInfo[]) => { const relevantOptions = Date.now() >= item.options.date ? item.options.after : item.options.before; Object.entries(relevantOptions).forEach(([key, value]) => { if (value !== undefined && typeof value === 'number' && !isNaN(value)) { - totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100000 : 1000); + totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100 : 1000); } }); } else { Object.entries(item.options).forEach(([key, value]) => { if (value !== undefined && typeof value === 'number' && !isNaN(value)) { - totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100000 : 1000); + totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100 : 1000); } }); } From 1935fba2dac8890c93b098bedff0355ab6db69db Mon Sep 17 00:00:00 2001 From: jtw Date: Fri, 13 Feb 2026 23:35:45 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=EB=B6=84=EB=8B=B9=20=EC=98=B5?= =?UTF-8?q?=EC=85=98=20=EA=B3=84=EC=82=B0=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/kkuko/profile/components/ItemModal.tsx | 2 +- app/kkuko/profile/utils/profileHelper.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/kkuko/profile/components/ItemModal.tsx b/app/kkuko/profile/components/ItemModal.tsx index 733a935..c6aa0a1 100644 --- a/app/kkuko/profile/components/ItemModal.tsx +++ b/app/kkuko/profile/components/ItemModal.tsx @@ -17,7 +17,7 @@ export default function ItemModal({ itemsData, profileData, onClose }: ItemModal const itemOptionUI = (key: string, value: number) => (
{getOptionName(key)}: - {value > 0 ? '+' : ''}{formatNumber(value * (key[0] === 'g' ? 100 : 1000))}{key[0] === 'g' ? '%p' : ''} + {value > 0 ? '+' : ''}{formatNumber(value * (key[0] === 'g' ? 100 : 1))}{key[0] === 'g' ? '%p' : ''}
) diff --git a/app/kkuko/profile/utils/profileHelper.ts b/app/kkuko/profile/utils/profileHelper.ts index da167e2..cfc80f3 100644 --- a/app/kkuko/profile/utils/profileHelper.ts +++ b/app/kkuko/profile/utils/profileHelper.ts @@ -48,13 +48,13 @@ export const calculateTotalOptions = (itemsData: ItemInfo[]) => { const relevantOptions = Date.now() >= item.options.date ? item.options.after : item.options.before; Object.entries(relevantOptions).forEach(([key, value]) => { if (value !== undefined && typeof value === 'number' && !isNaN(value)) { - totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100 : 1000); + totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100 : 1); } }); } else { Object.entries(item.options).forEach(([key, value]) => { if (value !== undefined && typeof value === 'number' && !isNaN(value)) { - totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100 : 1000); + totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100 : 1); } }); } From 4c15b536c6c5f85ddd22478499fec4953be053e5 Mon Sep 17 00:00:00 2001 From: jtw Date: Fri, 13 Feb 2026 23:35:59 +0900 Subject: [PATCH 3/4] =?UTF-8?q?test:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kkuko/profile/components/ItemModal.test.tsx | 2 +- .../kkuko/profile/utils/profileHelper.test.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/__tests__/kkuko/profile/components/ItemModal.test.tsx b/__tests__/kkuko/profile/components/ItemModal.test.tsx index f859dbd..ebbd902 100644 --- a/__tests__/kkuko/profile/components/ItemModal.test.tsx +++ b/__tests__/kkuko/profile/components/ItemModal.test.tsx @@ -39,7 +39,7 @@ describe('ItemModal', () => { expect(screen.getByText('장착 아이템 목록')).toBeInTheDocument(); expect(screen.getByText('Cool Hat')).toBeInTheDocument(); expect(screen.getByText('score:')).toBeInTheDocument(); - expect(screen.getByText('+10000')).toBeInTheDocument(); + expect(screen.getByText('+10')).toBeInTheDocument(); }); it('should call onClose when close button is clicked', () => { diff --git a/__tests__/kkuko/profile/utils/profileHelper.test.ts b/__tests__/kkuko/profile/utils/profileHelper.test.ts index cddc8d3..a0a2e2f 100644 --- a/__tests__/kkuko/profile/utils/profileHelper.test.ts +++ b/__tests__/kkuko/profile/utils/profileHelper.test.ts @@ -63,9 +63,9 @@ describe('profileHelper', () => { }); describe('formatNumber', () => { - it('should divide by 1000 and return string', () => { - expect(formatNumber(1500)).toBe('1.5'); - expect(formatNumber(10000)).toBe('10'); + it('should return string', () => { + expect(formatNumber(0.014999999)).toBe('0.015'); + expect(formatNumber(0.12)).toBe('0.12'); }); }); @@ -76,9 +76,9 @@ describe('profileHelper', () => { { id: '2', name: 'Item2', description: '', group: '', options: { str: 3 }, updatedAt: 1 } ]; const result = calculateTotalOptions(items); - // 1 * 1000 + 3 * 1000 = 4000 - expect(result['str']).toBe(4000); - expect(result['dex']).toBe(2000); + // 1 * 1 + 3 * 1 = 4 + expect(result['str']).toBe(4); + expect(result['dex']).toBe(2); }); it('should handle special options', () => { @@ -95,7 +95,7 @@ describe('profileHelper', () => { ]; const result = calculateTotalOptions(items); // Should use 'after' - expect(result['str']).toBe(5000); + expect(result['str']).toBe(5); }); it('should handle special options (before)', () => { @@ -112,7 +112,7 @@ describe('profileHelper', () => { ]; const result = calculateTotalOptions(items); // Should use 'before' - expect(result['str']).toBe(1000); + expect(result['str']).toBe(1); }); }); From 37ebf51434889de326f0180198ff0845185ba210 Mon Sep 17 00:00:00 2001 From: jtw Date: Fri, 13 Feb 2026 23:46:56 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[skip=20deploy]=20ci:=20=EB=A6=B4=EB=A6=AC?= =?UTF-8?q?=EC=A6=88=20ci=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-release.yml | 4 ++-- .github/workflows/release.yml | 2 +- scripts/release.js | 8 ++++---- vercel.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index f48e243..063929c 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -7,8 +7,8 @@ on: jobs: publish: - # 커밋 메시지가 버전 범핑 포맷([skip ci] - (v...)) 일 때만 실행 - if: "contains(github.event.head_commit.message, '[skip ci] - (v')" + # 커밋 메시지가 버전 범핑 포맷([skip deploy] - (v...)) 일 때만 실행 + if: "contains(github.event.head_commit.message, '[skip deploy] - (v')" runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb11a38..62fc0b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ permissions: jobs: # Job 1: 변경사항 감지 및 PR 생성 prepare-release: - if: "!contains(github.event.head_commit.message, '[skip ci]')" + if: "!contains(github.event.head_commit.message, '[skip deploy]')" runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/scripts/release.js b/scripts/release.js index 19c3bfb..25da186 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -28,12 +28,12 @@ async function run() { console.log(`ℹ️ Current Version: v${currentVersion}`); - // 2. [skip ci] 체크 (PR 모드일 때만) + // 2. [skip deploy] 체크 (PR 모드일 때만) if (!isReleaseMode) { const log = await git.log({ maxCount: 1 }); const lastCommitMsg = log.latest.message; - if (lastCommitMsg.includes('[skip ci]')) { - console.log('🛑 Last commit contains [skip ci]. Exiting...'); + if (lastCommitMsg.includes('[skip ci]') || lastCommitMsg.includes('[skip deploy]')) { + console.log('🛑 Last commit contains [skip deploy]. Exiting...'); return; } } @@ -158,7 +158,7 @@ async function run() { // 8. Git 커밋 및 PR 생성 if (!isDryRun) { const branchName = `release/${nextVersion}`; - const commitMessage = `[skip ci] - (${nextVersion})`; + const commitMessage = `[skip deploy] - (${nextVersion})`; // Git 설정 await git.addConfig('user.name', 'github-actions[bot]'); diff --git a/vercel.json b/vercel.json index 8dab8bd..4c9f014 100644 --- a/vercel.json +++ b/vercel.json @@ -1,4 +1,4 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "ignoreCommand": "git log -1 --pretty=%B | grep -q '\\[skip ci\\]'" + "ignoreCommand": "git log -1 --pretty=%B | grep -q '\\[skip deploy\\]'" } \ No newline at end of file