Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): biome git hook #3173

Merged
merged 3 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions .pre-commit/run_sdk_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,25 @@ SDK_DIR="$SCRIPT_DIR/../sdk"
# get changed TS files
TS_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep "^sdk.*\.\(ts\|tsx\)$" || true)

if [ -n "$TS_FILES" ]; then
echo "Running SDK checks..."
cd "$SDK_DIR"
echo "Running SDK checks..."
cd "$SDK_DIR"

# clean + build
echo "Building SDK..."
pnpm build:clean
# clean + build
echo "Building SDK..."
pnpm build

# precommit checks (Biome)
echo "Running SDK checks..."
pnpm precommit
# precommit checks (Biome)
echo "Running SDK checks..."
pnpm check

echo "SDK checks completed..."
fi
# TODO enable after issues resolved
# CHECK_EXIT_CODE=$?

# if [ $CHECK_EXIT_CODE -ne 0 ]; then
# echo "SDK check failed with $CHECK_EXIT_CODE"
# exit $CHECK_EXIT_CODE
# fi

echo "SDK check completed..."

exit 0
14 changes: 10 additions & 4 deletions sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

## Overview

The Omni SDK is a TypeScript library for interfacing with Omni SolverNet.
The Omni SDK is a TypeScript library for interfacing with Omni SolverNet, your gateway to any transaction, on any chain.

## Roadmap

- [ ] Publish alpha package
- [ ] Consume SolverNet API
- [ ] Build package abstractions - `core` vs `react`
- [✅] Publish alpha package
- [✅] Consume SolverNet API
- [ ] Type improvements
- [ ] Add unit tests
- [ ] Add e2e tests
- [ ] Zod schema validation
- [ ] Write docs
- [ ] Build package abstractions - `core` and `react`
- [ ] Add examples
2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"build:esm": "tsc -p tsconfig.build.json",
"build:types": "tsc -p tsconfig.build.json",
"clean": "rm -rf dist tsconfig.tsbuildinfo",
"precommit": "biome check --write"
"check": "biome check --write"
},
"files": [
"dist/**",
Expand Down
Loading