Skip to content

Commit 035f117

Browse files
chore: strip BOM and fix lint imports
1 parent 7de336e commit 035f117

8 files changed

Lines changed: 82 additions & 2 deletions

File tree

‎.husky/_/post-checkout‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
3+
git lfs post-checkout "$@"

‎.husky/_/post-commit‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
3+
git lfs post-commit "$@"

‎.husky/_/post-merge‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
3+
git lfs post-merge "$@"

‎.husky/_/pre-push‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
3+
git lfs pre-push "$@"

‎.husky/pre-commit‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
branch="$(git rev-parse --abbrev-ref HEAD)"
2+
3+
if [ "$branch" = "main" ]; then
4+
echo "You can't commit directly to main - please check out a branch."
5+
exit 1
6+
fi
7+
8+
# Detect if running on Windows and use pnpm.cmd, otherwise use pnpm.
9+
if [ "$OS" = "Windows_NT" ]; then
10+
pnpm_cmd="pnpm.cmd"
11+
else
12+
if command -v pnpm >/dev/null 2>&1; then
13+
pnpm_cmd="pnpm"
14+
else
15+
pnpm_cmd="npx pnpm"
16+
fi
17+
fi
18+
19+
# Detect if running on Windows and use npx.cmd, otherwise use npx.
20+
if [ "$OS" = "Windows_NT" ]; then
21+
npx_cmd="npx.cmd"
22+
else
23+
npx_cmd="npx"
24+
fi
25+
26+
$npx_cmd lint-staged

‎.husky/pre-push‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
branch="$(git rev-parse --abbrev-ref HEAD)"
2+
3+
if [ "$branch" = "main" ]; then
4+
echo "You can't push directly to main - please check out a branch."
5+
exit 1
6+
fi
7+
8+
# Detect if running on Windows and use pnpm.cmd, otherwise use pnpm.
9+
if [ "$OS" = "Windows_NT" ]; then
10+
pnpm_cmd="pnpm.cmd"
11+
else
12+
if command -v pnpm >/dev/null 2>&1; then
13+
pnpm_cmd="pnpm"
14+
else
15+
pnpm_cmd="npx pnpm"
16+
fi
17+
fi
18+
19+
$pnpm_cmd run check-types
20+
21+
# Use dotenvx to securely load .env.local and run commands that depend on it
22+
if [ -f ".env.local" ]; then
23+
# Check if RUN_TESTS_ON_PUSH is set to true and run tests with dotenvx
24+
if npx dotenvx get RUN_TESTS_ON_PUSH -f .env.local 2>/dev/null | grep -q "^true$"; then
25+
npx dotenvx run -f .env.local -- $pnpm_cmd run test
26+
fi
27+
else
28+
# Fallback: run tests if RUN_TESTS_ON_PUSH is set in regular environment
29+
if [ "$RUN_TESTS_ON_PUSH" = "true" ]; then
30+
$pnpm_cmd run test
31+
fi
32+
fi
33+
34+
# Check for new changesets.
35+
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
36+
echo "Changeset files: $NEW_CHANGESETS"
37+
38+
if [ "$NEW_CHANGESETS" = "0" ]; then
39+
echo "-------------------------------------------------------------------------------------"
40+
echo "Changes detected. Please run 'pnpm changeset' to create a changeset if applicable."
41+
echo "-------------------------------------------------------------------------------------"
42+
fi

‎src/core/webview/ClineProvider.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ import { buildApiHandler } from "../../api"
113113
import { forceFullModelDetailsLoad, hasLoadedFullDetails } from "../../api/providers/fetchers/lmstudio"
114114

115115
import { ContextProxy } from "../config/ContextProxy"
116-
import { ProviderSettingsManager, ProviderSettingsNotFoundError } from "../config/ProviderSettingsManager"
116+
import { ProviderSettingsManager } from "../config/ProviderSettingsManager"
117117
import { CustomModesManager } from "../config/CustomModesManager"
118118
import { PendingActionSettlementError, Task } from "../task/Task"
119119

‎src/core/webview/__tests__/ClineProvider.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// pnpm --filter roo-cline test core/webview/__tests__/ClineProvider.spec.ts
1+
// pnpm --filter roo-cline test core/webview/__tests__/ClineProvider.spec.ts
22

33
import fs from "fs"
44
import * as path from "path"

0 commit comments

Comments
 (0)