Skip to content

Commit

Permalink
chore: pkg hygiene
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Dec 14, 2024
1 parent ea6d11c commit 2e097af
Show file tree
Hide file tree
Showing 4 changed files with 1,633 additions and 27 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,24 @@ jobs:
name: Verify
uses: ./.github/workflows/verify.yml
secrets: inherit

size:
name: Size
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Report bundle size
uses: andresz1/size-limit-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
package_manager: pnpm

28 changes: 27 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,30 @@ jobs:
with:
commit_message: 'chore: format'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'

build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Build
run: pnpm build

- name: Check build
run: pnpm check:build

- name: Check for unused files, dependencies, and exports
run: pnpm knip --production

- name: Check size
run: pnpm size
16 changes: 15 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"changeset:publish": "pnpm changeset:prepublish && changeset publish",
"changeset:version": "changeset version && pnpm format",
"check": "biome check . --fix --unsafe",
"check:build": "tsx ./scripts/prepublish.ts && publint --strict ./src && attw --pack ./src --profile esm-only",
"check:repo": "sherif",
"check:size": "size-limit",
"check:types": "tsc --noEmit",
"clean": "rm -rf src/_dist src/Chains src/Porto src/wagmi ./tsconfig.build.tsbuildinfo src/tsconfig.build.tsbuildinfo",
"deps": "pnpx taze -r",
Expand All @@ -23,16 +25,20 @@
"prepare": "pnpm simple-git-hooks"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@biomejs/biome": "^1.8.3",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.7",
"@size-limit/preset-big-lib": "^11.1.6",
"@tanstack/react-query": "catalog:",
"@types/node": "^22.5.4",
"@types/react": "catalog:",
"@wagmi/cli": "^2.1.18",
"knip": "^5.30.6",
"publint": "^0.2.12",
"sherif": "^0.11.0",
"simple-git-hooks": "^2.11.1",
"size-limit": "^11.1.6",
"tsx": "^4.17.0",
"typescript": "catalog:",
"viem": "catalog:",
Expand All @@ -53,5 +59,13 @@
"entry": ["index.ts!"]
}
}
}
},
"size-limit": [
{
"name": "import * from 'ox'",
"path": "./src/_dist/index.js",
"import": "*",
"limit": "54 kB"
}
]
}
Loading

0 comments on commit 2e097af

Please sign in to comment.