From df18f785f37d60ad5f485f8b46bd9835980e8cf0 Mon Sep 17 00:00:00 2001 From: Yuya Hirayama Date: Thu, 3 Jul 2025 15:27:06 +0900 Subject: [PATCH 1/2] fix: update lockfile version to 3 for npm compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npx cccsc@latest add was creating lockfiles with version 1, but current npm versions expect version 3. Added CURRENT_LOCKFILE_VERSION constant to replace magic number. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/utils/config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/config.js b/src/utils/config.js index 28847df..8355bd1 100644 --- a/src/utils/config.js +++ b/src/utils/config.js @@ -2,6 +2,9 @@ import fs from 'fs-extra'; import { getCccscConfigPath, getCccscLockPath, ensureCccscConfigDir } from './paths.js'; import { parseRepositoryPath } from './github.js'; +// Current lockfile version for npm compatibility +const CURRENT_LOCKFILE_VERSION = 3; + export async function loadCccscConfig(isLocal = false) { const configPath = getCccscConfigPath(isLocal); @@ -36,7 +39,7 @@ export async function loadCccscLock(isLocal = false) { } return { - lockfileVersion: 1, + lockfileVersion: CURRENT_LOCKFILE_VERSION, repositories: {} }; } From 37c34d0f0d7d1b3250cacda35d25fd501f3fc474 Mon Sep 17 00:00:00 2001 From: Yuya Hirayama Date: Thu, 3 Jul 2025 15:29:33 +0900 Subject: [PATCH 2/2] fix: update test to expect lockfileVersion 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update test assertion to match the new lockfile version constant. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- tests/utils/config.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils/config.test.js b/tests/utils/config.test.js index 75915ea..fea9299 100644 --- a/tests/utils/config.test.js +++ b/tests/utils/config.test.js @@ -114,7 +114,7 @@ describe('Config Utils', () => { const result = await loadCccscLock(true); expect(result).toEqual({ - lockfileVersion: 1, + lockfileVersion: 3, repositories: {} }); });