Skip to content

Commit db811f9

Browse files
committed
Address CI issues
1 parent a0f1253 commit db811f9

File tree

8 files changed

+1633
-99
lines changed

8 files changed

+1633
-99
lines changed

ci-failures.txt

Lines changed: 1518 additions & 0 deletions
Large diffs are not rendered by default.

claude-config-composer/package-lock.json

Lines changed: 0 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

claude-config-composer/src/cli/commands/dry-run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import chalk from 'chalk';
2-
import ora from 'ora';
32
import { ConfigRegistry } from '../../registry/config-registry';
43
import { ErrorHandler, RegistryError, ValidationError } from '../../utils/error-handler';
54
import { DisplayUtils } from '../utils/display';
@@ -19,6 +18,7 @@ export class DryRunCommand {
1918
}
2019

2120
const registry = new ConfigRegistry();
21+
const ora = (await import('ora')).default;
2222
const spinner = ora('Analyzing configurations...').start();
2323

2424
try {

claude-config-composer/src/cli/commands/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import chalk from 'chalk';
22
import fs from 'fs/promises';
3-
import ora from 'ora';
43
import path from 'path';
54
import { ConfigGenerator } from '../../generator/config-generator';
65
import { ConfigRegistry } from '../../registry/config-registry';
@@ -43,6 +42,7 @@ export class GenerateCommand {
4342
}
4443

4544
const registry = new ConfigRegistry();
45+
const ora = (await import('ora')).default;
4646
const spinner = ora('Initializing registry...').start();
4747

4848
try {

claude-config-composer/src/cli/commands/interactive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { checkbox, confirm, select } from '@inquirer/prompts';
22
import chalk from 'chalk';
3-
import ora from 'ora';
43
import { ConfigGenerator } from '../../generator/config-generator';
54
import { ConfigRegistry } from '../../registry/config-registry';
65
import { ErrorHandler, GenerationError, RegistryError } from '../../utils/error-handler';
@@ -22,6 +21,7 @@ export class InteractiveCommand {
2221
DisplayUtils.showTitle(useFancy);
2322

2423
const registry = new ConfigRegistry();
24+
const ora = (await import('ora')).default;
2525
const spinner = ora('Loading available configurations...').start();
2626

2727
try {

claude-config-composer/src/generator/config-generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import chalk from 'chalk';
22
import fs from 'fs/promises';
3-
import ora from 'ora';
43
import path from 'path';
54
import { ComponentMerger } from '../merger/component-merger';
65
import { ConfigMerger } from '../merger/config-merger';
@@ -75,7 +74,8 @@ export class ConfigGenerator {
7574
];
7675

7776
let currentStep = 0;
78-
const spinner = showProgress ? ora(steps[currentStep]).start() : null;
77+
const ora = showProgress ? (await import('ora')).default : null;
78+
const spinner = showProgress && ora ? ora(steps[currentStep]).start() : null;
7979

8080
try {
8181
// Parse all configurations
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "=== Testing in Node 18 environment (matching CI) ==="
5+
echo ""
6+
7+
# Clean and reinstall to ensure fresh state
8+
echo "Cleaning node_modules and dist..."
9+
rm -rf node_modules dist package-lock.json
10+
11+
echo "Installing with npm ci (like CI does)..."
12+
npm install
13+
14+
echo "Building..."
15+
npm run build
16+
17+
echo "Running tests..."
18+
npm test
19+
20+
echo ""
21+
echo "Testing CLI list command..."
22+
OUTPUT=$(node dist/cli-simple.js list)
23+
24+
# Check that all expected configs appear
25+
if ! echo "$OUTPUT" | grep -q "Next.js 15"; then
26+
echo "❌ Next.js 15 not found in config list"
27+
exit 1
28+
fi
29+
30+
if ! echo "$OUTPUT" | grep -q "shadcn/ui"; then
31+
echo "❌ shadcn/ui not found in config list"
32+
exit 1
33+
fi
34+
35+
if ! echo "$OUTPUT" | grep -q "Tailwind CSS"; then
36+
echo "❌ Tailwind CSS not found in config list"
37+
exit 1
38+
fi
39+
40+
if ! echo "$OUTPUT" | grep -q "Vercel AI SDK"; then
41+
echo "❌ Vercel AI SDK not found in config list"
42+
exit 1
43+
fi
44+
45+
if ! echo "$OUTPUT" | grep -q "Drizzle ORM"; then
46+
echo "❌ Drizzle ORM not found in config list"
47+
exit 1
48+
fi
49+
50+
echo "✅ CLI list command working correctly!"
51+
echo ""
52+
echo "=== All tests passed! ==="
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "=== Replicating CI Environment (Node 18.20.8) ==="
5+
6+
# Use Docker to run in exact CI environment
7+
docker run --rm -v "$(pwd):/app" -w /app node:18.20.8 bash -c '
8+
set -e
9+
echo "Node version: $(node --version)"
10+
echo "NPM version: $(npm --version)"
11+
12+
echo ""
13+
echo "=== Installing dependencies ==="
14+
npm ci
15+
16+
echo ""
17+
echo "=== Building project ==="
18+
npm run build
19+
20+
echo ""
21+
echo "=== Running tests ==="
22+
npm test
23+
24+
echo ""
25+
echo "=== Testing CLI list command ==="
26+
OUTPUT=$(node dist/cli-simple.js list)
27+
28+
# Check that all expected configs appear in list
29+
if ! echo "$OUTPUT" | grep -q "Next.js 15"; then
30+
echo "❌ Next.js 15 not found in config list"
31+
exit 1
32+
fi
33+
34+
if ! echo "$OUTPUT" | grep -q "shadcn/ui"; then
35+
echo "❌ shadcn/ui not found in config list"
36+
exit 1
37+
fi
38+
39+
if ! echo "$OUTPUT" | grep -q "Tailwind CSS"; then
40+
echo "❌ Tailwind CSS not found in config list"
41+
exit 1
42+
fi
43+
44+
if ! echo "$OUTPUT" | grep -q "Vercel AI SDK"; then
45+
echo "❌ Vercel AI SDK not found in config list"
46+
exit 1
47+
fi
48+
49+
if ! echo "$OUTPUT" | grep -q "Drizzle ORM"; then
50+
echo "❌ Drizzle ORM not found in config list"
51+
exit 1
52+
fi
53+
54+
echo "✅ CLI list command working correctly!"
55+
56+
echo ""
57+
echo "=== All CI checks passed! ==="
58+
'

0 commit comments

Comments
 (0)