Skip to content

Commit 607d962

Browse files
committed
Update deps prompt and add gh CLI check
1 parent 0957e9a commit 607d962

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

scripts/claude.mjs

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,15 +1065,21 @@ ${JSON.stringify(packageJson.devDependencies || {}, null, 2)}
10651065
Outdated packages:
10661066
${JSON.stringify(outdatedPackages, null, 2)}
10671067
1068+
IMPORTANT Socket Requirements:
1069+
- All dependencies MUST be pinned to exact versions (no ^ or ~ prefixes)
1070+
- Use pnpm add <pkg> --save-exact for all new dependencies
1071+
- GitHub CLI (gh) is required but installed separately (not via npm)
1072+
10681073
Provide:
1069-
1. Security vulnerability analysis
1070-
2. Unused dependency detection
1071-
3. Update recommendations with migration notes
1072-
4. License compatibility check
1073-
5. Bundle size impact analysis
1074-
6. Alternative package suggestions
1074+
1. Version pinning issues (identify any deps with ^ or ~ prefixes)
1075+
2. Security vulnerability analysis
1076+
3. Unused dependency detection
1077+
4. Update recommendations with migration notes (using exact versions)
1078+
5. License compatibility check
1079+
6. Bundle size impact analysis
1080+
7. Alternative package suggestions
10751081
1076-
Focus on actionable recommendations.`
1082+
Focus on actionable recommendations. Always recommend exact versions when suggesting updates.`
10771083

10781084
await runCommand(claudeCmd, prepareClaudeArgs([], opts), {
10791085
input: prompt,
@@ -1615,6 +1621,17 @@ Provide specific file edits or commands to fix this issue.`
16151621
return true
16161622
}
16171623

1624+
// Check for GitHub CLI
1625+
const ghCheck = await runCommandWithOutput('which', ['gh'])
1626+
if (ghCheck.exitCode !== 0) {
1627+
log.error('GitHub CLI (gh) is required for CI monitoring')
1628+
log.info('Install with:')
1629+
log.substep('macOS: brew install gh')
1630+
log.substep('Linux: See https://github.com/cli/cli/blob/trunk/docs/install_linux.md')
1631+
log.substep('Windows: winget install --id GitHub.cli')
1632+
return false
1633+
}
1634+
16181635
// Get current commit SHA
16191636
const shaResult = await runCommandWithOutput('git', ['rev-parse', 'HEAD'], {
16201637
cwd: rootPath

0 commit comments

Comments
 (0)