Skip to content

Commit bd7ee4a

Browse files
committed
fix: remove build artifacts from git and prevent CI test failures
- Remove all JS/TS build artifacts from src/ directory (were incorrectly committed) - Update .gitignore to comprehensively exclude all build artifacts - Remove shebang from src/index.ts (not an executable entry point) - Add pre-commit hook to check for and prevent committing build artifacts - Update pre-push hook to include clean build step - Fix CI test failure caused by shebang in compiled JS file This ensures only TypeScript source files in git (no compiled JS), fresh builds in CI without cached artifacts, consistent behavior across all platforms, and prevention of similar issues in the future.
1 parent 2a39ced commit bd7ee4a

120 files changed

Lines changed: 117 additions & 6671 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@ build/
88
**/*.tsbuildinfo
99
tsconfig.tsbuildinfo
1010

11+
# TypeScript compilation artifacts in source directories (NEVER commit these!)
12+
src/**/*.js
13+
src/**/*.d.ts
14+
src/**/*.js.map
15+
tests/**/*.js
16+
tests/**/*.d.ts
17+
tests/**/*.js.map
18+
19+
# Package source compilation artifacts
20+
packages/*/src/**/*.js
21+
packages/*/src/**/*.d.ts
22+
packages/*/src/**/*.js.map
23+
packages/*/tests/**/*.js
24+
packages/*/tests/**/*.d.ts
25+
packages/*/tests/**/*.js.map
26+
27+
# Package distribution files
28+
*.tgz
29+
packages/**/*.tgz
30+
*.vsix
31+
1132
# Turbo cache (not using Turborepo)
1233
.turbo/
1334

@@ -19,6 +40,23 @@ bundled-adapters/
1940
!.vscode/extensions.json
2041
.idea/
2142
*.sublime-*
43+
*.iml
44+
.history/
45+
46+
# Editor swap/backup files
47+
*.swp
48+
*.swo
49+
*~
50+
*.bak
51+
*.tmp
52+
53+
# JetBrains IDEs
54+
.idea/
55+
56+
# Eclipse
57+
.project
58+
.classpath
59+
.settings/
2260

2361
# LLM files
2462
.clinerules
@@ -27,7 +65,13 @@ bundled-adapters/
2765
# Environment variables
2866
.env
2967
.env.local
30-
.env.*.local
68+
.env.*
69+
!.env.example
70+
!.env.template
71+
72+
# Local npm config (might contain tokens)
73+
.npmrc
74+
.yarnrc
3175

3276
# Personal configuration files that might be created
3377
**/personal-config.json
@@ -39,14 +83,34 @@ sessions/
3983
npm-debug.log*
4084
yarn-debug.log*
4185
yarn-error.log*
86+
lerna-debug.log*
87+
pnpm-debug.log*
4288

4389
# OS files
4490
.DS_Store
4591
Thumbs.db
92+
Desktop.ini
4693

4794
# Testing
4895
coverage/
4996
.nyc_output/
97+
test-results/
98+
junit.xml
99+
*.tap
100+
test-report.xml
101+
102+
# Node.js profiling & debugging
103+
*.heapsnapshot
104+
*.cpuprofile
105+
*.heap
106+
v8.log
107+
.chrome/
108+
109+
# Build tool caches
110+
.esbuild/
111+
.parcel-cache/
112+
.webpack/
113+
.rollup.cache/
50114

51115
# Temporary files
52116
tmp/

‎.husky/pre-commit‎

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,45 @@
1-
#!/usr/bin/env sh
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
23

3-
# Run linting check
4-
echo "🔍 Running ESLint checks before commit..."
5-
npm run lint
4+
# Run existing personal info check
5+
node scripts/check-personal-paths.cjs
6+
7+
# Check for build artifacts in src directories
8+
echo "🔍 Checking for build artifacts in source directories..."
69

7-
if [ $? -eq 0 ]; then
8-
echo "✅ ESLint checks passed!"
9-
else
10-
echo "❌ ESLint errors found! Please fix them before committing."
11-
echo "💡 You can use 'npm run lint:fix' to auto-fix some issues."
12-
echo "💡 Or use 'git commit --no-verify' to bypass this check (not recommended)."
10+
# Check for JS files in src/
11+
if git diff --cached --name-only | grep -E '^src/.*\.(js|d\.ts|js\.map)$'; then
12+
echo ""
13+
echo "❌ Error: Build artifacts detected in src/ directory!"
14+
echo " These files should not be committed:"
15+
git diff --cached --name-only | grep -E '^src/.*\.(js|d\.ts|js\.map)$'
16+
echo ""
17+
echo "💡 Run 'npm run clean' to remove build artifacts"
18+
echo "💡 Only TypeScript source files should be in src/"
1319
exit 1
1420
fi
1521

16-
# Run personal information check on staged files
17-
echo ""
18-
echo "🔍 Checking staged files for personal information..."
19-
node scripts/check-personal-paths.cjs
22+
# Check for JS files in packages/*/src/
23+
if git diff --cached --name-only | grep -E '^packages/.*/src/.*\.(js|d\.ts|js\.map)$'; then
24+
echo ""
25+
echo "❌ Error: Build artifacts detected in package source directories!"
26+
echo " These files should not be committed:"
27+
git diff --cached --name-only | grep -E '^packages/.*/src/.*\.(js|d\.ts|js\.map)$'
28+
echo ""
29+
echo "💡 Run 'npm run clean' to remove build artifacts"
30+
echo "💡 Only TypeScript source files should be in packages/*/src/"
31+
exit 1
32+
fi
2033

21-
if [ $? -eq 0 ]; then
22-
echo "✅ Pre-commit checks passed. Personal information check completed."
23-
echo "💡 Note: Tests will run before push to ensure code quality on GitHub."
24-
else
34+
# Check for package tarballs
35+
if git diff --cached --name-only | grep -E '\.tgz$'; then
2536
echo ""
26-
echo "❌ Pre-commit checks failed. Please address the issues."
37+
echo "❌ Error: Package tarball files detected!"
38+
echo " These files should not be committed:"
39+
git diff --cached --name-only | grep -E '\.tgz$'
40+
echo ""
41+
echo "💡 Package tarballs are for local testing only"
2742
exit 1
28-
fi
43+
fi
44+
45+
echo "✅ No build artifacts found in staged files"

‎.husky/pre-push‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@ echo "🧪 Running tests before push to ensure code quality..."
22
echo "💡 This prevents broken code from being pushed to GitHub."
33
echo ""
44

5+
# Clean build to ensure no stale artifacts
6+
echo "🔨 Running clean build to ensure fresh compilation..."
7+
npm run clean
8+
npm run build
9+
10+
if [ $? -ne 0 ]; then
11+
echo ""
12+
echo "❌ Build failed! Push blocked to prevent broken code on GitHub."
13+
echo "💡 Fix build errors before pushing."
14+
exit 1
15+
fi
16+
17+
echo "✅ Build successful!"
18+
echo ""
19+
520
# Run the full test suite
621
npm test
722

-748 KB
Binary file not shown.

‎src/adapters/adapter-loader.d.ts‎

Lines changed: 0 additions & 38 deletions
This file was deleted.

‎src/adapters/adapter-loader.js‎

Lines changed: 0 additions & 153 deletions
This file was deleted.

‎src/adapters/adapter-loader.js.map‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)