Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/lint_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v4
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 7 additions & 15 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Use Latest Corepack
run: |
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
npm install -g corepack@latest
echo "After : corepack version => $(corepack --version)"
corepack enable

- uses: actions/setup-node@v4
- uses: pnpm/setup@v3
with:
cache: "yarn"
node-version-file: ".nvmrc"
cache: true
require-lockfile: true

- name: Perform checks
run: |
yarn install --immutable
yarn typecheck:ci
yarn lint:ci
yarn prettier:ci
pnpm typecheck:ci
pnpm lint:ci
pnpm prettier:ci
37 changes: 18 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,39 @@ jobs:
issues: write # semantic-release comments
pull-requests: write # semantic-release comments
id-token: write # OIDC for npm trusted publishing + provenance
deployments: write # cloudflare/pages-action
deployments: write # cloudflare/wrangler-action

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Use Latest Corepack
run: |
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
npm install -g corepack@latest
echo "After : corepack version => $(corepack --version)"
corepack enable

- uses: actions/setup-node@v4
- uses: pnpm/setup@v3
with:
# npm docs recommend never using dependency caching in release
# builds (cache poisoning risk in privileged workflows)
node-version-file: ".nvmrc"
cache: true
require-lockfile: true

# No lint or prettier here since they were supposed to run on PR action
- name: Build
run: |
yarn install --immutable
yarn build
run: pnpm build

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v6
with:
extra_plugins: "@semantic-release/exec"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT }}
projectName: ${{ secrets.CF_PROJECT_NAME }}
directory: public
command: pages deploy public --project-name=${{ secrets.CF_PROJECT_NAME }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

- uses: mfinelli/cloudflare-pages-cleanup@v1
with:
cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT }}
cloudflare_api_token: ${{ secrets.CLOUDFLARE_TOKEN }}
project: ${{ secrets.CF_PROJECT_NAME }}
min-to-keep: 0
max-to-keep: 0
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

.eslintcache
.eslint.local.json
.yarn/install-state.gz
.vscode/mise-tools/
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit $1
pnpm exec commitlint --edit "$1"
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
pnpm exec lint-staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
pnpm-lock.yaml
13 changes: 12 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/exec",
{
"publishCmd": "pnpm publish --no-git-checks --access public --tag ${nextRelease.channel || 'latest'}"
}
],
[
"@semantic-release/github",
{
Expand Down
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
"license": "MIT",
"scripts": {
"compile": "tsdown",
"dev": "tsdown && yarn generate-configs:ts",
"dev": "tsdown && pnpm generate-configs:ts",
"clean": "rm -rf ./dist",
"build": "yarn compile && yarn generate-configs:ts",
"generate-configs:ts": "npx ts-node scripts/generate-configs.ts",
"fetch-old-borrowers:ts": "npx ts-node scripts/fetch-merge-old-borrowers.ts",
"fetch-old-accounts:ts": "npx ts-node scripts/fetch-old-accounts-from-borrowers.ts",
"prepare": "husky install",
"build": "pnpm compile && pnpm generate-configs:ts",
"generate-configs:ts": "ts-node scripts/generate-configs.ts",
"fetch-old-borrowers:ts": "ts-node scripts/fetch-merge-old-borrowers.ts",
"fetch-old-accounts:ts": "ts-node scripts/fetch-old-accounts-from-borrowers.ts",
"prepare": "husky",
"prettier": "prettier --write .",
"prettier:ci": "npx prettier --check .",
"prettier:ci": "prettier --check .",
"lint": "eslint . --ext .tsx,.ts --fix",
"lint:ci": "eslint . --ext .tsx,.ts",
"typecheck:ci": "tsc --noEmit"
Expand All @@ -71,15 +71,17 @@
"@commitlint/config-conventional": "^19.6.0",
"@gearbox-protocol/eslint-config": "^2.0.0-next.2",
"@gearbox-protocol/prettier-config": "^2.0.0",
"@types/node": "^24.13.6",
"@types/react": "^19.2.7",
"eslint": "^8.57.1",
"husky": "^8.0.1",
"husky": "^9.1.7",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"react": "^19.2.1",
"ts-node": "^10.9.2",
"tsdown": "^0.22.14",
"typescript": "5.0.4"
"typescript": "5.0.4",
"wrangler": "^4.136.3"
},
"prettier": "@gearbox-protocol/prettier-config",
"lint-staged": {
Expand All @@ -89,5 +91,5 @@
],
"*.{json,md}": "prettier --write"
},
"packageManager": "yarn@4.9.2"
"packageManager": "pnpm@12.6.0"
}
Loading
Loading