Skip to content

Commit 72fb7fe

Browse files
committed
feat: upgrade everything and add tests
1 parent f9f5201 commit 72fb7fe

21 files changed

+9849
-6599
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ root = true
22

33
[*]
44
indent_style = space
5-
indent_size = 4
5+
indent_size = 2
66
charset = utf-8
77
trim_trailing_whitespace = true
88
insert_final_newline = true

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package.json
2+
tsconfig.*
3+
commitlint.config.js

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": ["@djthoms/eslint-config", "@djthoms/eslint-config/typescript", "@djthoms/eslint-config/vitest"],
3+
"parserOptions": {
4+
"project": "./tsconfig.json"
5+
}
6+
}

.github/workflows/on_push.yml

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

.github/workflows/on_release.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
name: Release
22
on:
3-
release:
4-
types: [released]
3+
push:
4+
branches:
5+
- main
56
jobs:
6-
publish:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v1
10-
- uses: actions/setup-node@v1
11-
with:
12-
node-version: 12
13-
registry-url: https://registry.npmjs.org/
14-
- name: npm install
15-
run: |
16-
npm i
17-
npm run build
18-
- name: publish
19-
run: npm publish pkg/
20-
env:
21-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
7+
release:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
- uses: pnpm/action-setup@v2
14+
with:
15+
version: 8
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 20
20+
cache: pnpm
21+
- name: Install dependencies
22+
run: pnpm install --frozen-lockfile
23+
- name: Release
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
run: pnpm semantic-release

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no -- commitlint --edit "${1}"

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm lint-staged

.lintstagedrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"*.{ts,tsx,js,json}": [
3+
"prettier --write",
4+
"eslint --fix"
5+
],
6+
"*.{md,yml,yaml}": "prettier --write"
7+
}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enable-pre-post-scripts=true

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@djthoms/prettier-config"

0 commit comments

Comments
 (0)