Skip to content

Commit 8360f91

Browse files
committed
Initial commit
0 parents  commit 8360f91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+5663
-0
lines changed

Diff for: .github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://help.github.com/en/articles/about-code-owners#codeowners-file-location
2+
* @Adrianmjim

Diff for: .github/cover.png

290 KB
Loading

Diff for: .github/renovate.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:base",
5+
":pinAllExceptPeerDependencies",
6+
":disableRateLimiting"
7+
],
8+
"schedule": [
9+
"at any time"
10+
],
11+
"packageRules": [
12+
{
13+
"matchPackagePatterns": ["*"],
14+
"matchUpdateTypes": ["patch", "minor"],
15+
"groupName": "All non-major dependencies",
16+
"groupSlug": "all-non-major-dependencies",
17+
"automerge": true,
18+
"labels": ["dependencies"]
19+
},
20+
{
21+
"matchPackagePatterns": ["*"],
22+
"matchUpdateTypes": ["major"],
23+
"groupName": "All major dependencies",
24+
"groupSlug": "all-major-dependencies",
25+
"labels": ["dependencies", "breaking"]
26+
}
27+
]
28+
}

Diff for: .github/workflows/cd.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CD
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- main
9+
10+
jobs:
11+
create-repository-release:
12+
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref , 'release/')
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Get Version
19+
id: version
20+
env:
21+
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
22+
run: echo "VERSION=${BRANCH_NAME:8}" >> $GITHUB_OUTPUT
23+
24+
- name: Create repository release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
27+
run: gh release create ${{ steps.version.outputs.VERSION }} --generate-notes
28+
29+
30+
publish-packages:
31+
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref , 'release/')
32+
runs-on: ubuntu-latest
33+
34+
strategy:
35+
matrix:
36+
node-version: [20.x]
37+
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- name: Setup PNPM
42+
uses: pnpm/[email protected]
43+
with:
44+
version: latest
45+
46+
- name: Setup Node
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: ${{ matrix.node-version }}
50+
cache: 'pnpm'
51+
cache-dependency-path: package.json
52+
registry-url: 'https://registry.npmjs.org'
53+
54+
- name: Install dependencies
55+
run: pnpm install
56+
57+
- name: Build
58+
run: pnpm build
59+
60+
- name: Publish package
61+
run: pnpm publish:package
62+
env:
63+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Diff for: .github/workflows/ci.yml

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [20.x]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup PNPM
20+
uses: pnpm/[email protected]
21+
with:
22+
version: latest
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'pnpm'
29+
cache-dependency-path: package.json
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Build
35+
run: pnpm build
36+
37+
format:
38+
runs-on: ubuntu-latest
39+
40+
strategy:
41+
matrix:
42+
node-version: [20.x]
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- name: Setup PNPM
48+
uses: pnpm/[email protected]
49+
with:
50+
version: latest
51+
52+
- name: Setup Node
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: ${{ matrix.node-version }}
56+
cache: 'pnpm'
57+
cache-dependency-path: package.json
58+
59+
- name: Install dependencies
60+
run: pnpm install
61+
62+
- name: Check Format
63+
run: pnpm format:check
64+
65+
lint:
66+
runs-on: ubuntu-latest
67+
68+
strategy:
69+
matrix:
70+
node-version: [20.x]
71+
72+
steps:
73+
- uses: actions/checkout@v4
74+
75+
- name: Setup PNPM
76+
uses: pnpm/[email protected]
77+
with:
78+
version: latest
79+
80+
- name: Setup Node
81+
uses: actions/setup-node@v4
82+
with:
83+
node-version: ${{ matrix.node-version }}
84+
cache: 'pnpm'
85+
cache-dependency-path: package.json
86+
87+
- name: Install dependencies
88+
run: pnpm install
89+
90+
- name: Check Linter
91+
run: pnpm lint
92+
93+
test:
94+
runs-on: ubuntu-latest
95+
96+
strategy:
97+
matrix:
98+
node-version: [20.x]
99+
100+
steps:
101+
- uses: actions/checkout@v4
102+
103+
- name: Setup PNPM
104+
uses: pnpm/[email protected]
105+
with:
106+
version: latest
107+
108+
- name: Setup Node
109+
uses: actions/setup-node@v4
110+
with:
111+
node-version: ${{ matrix.node-version }}
112+
cache: 'pnpm'
113+
cache-dependency-path: package.json
114+
115+
- name: Install dependencies
116+
run: pnpm install
117+
118+
- name: Check Tests
119+
run: pnpm test:coverage
120+
121+
- name: Upload coverage to Codecov
122+
uses: codecov/codecov-action@v4
123+
with:
124+
token: ${{ secrets.CODECOV_TOKEN }}

Diff for: .github/workflows/codecov_test.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [20.x]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup PNPM
20+
uses: pnpm/[email protected]
21+
with:
22+
version: latest
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'pnpm'
29+
cache-dependency-path: package.json
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Build
35+
run: pnpm build
36+
37+
- name: Check Tests
38+
run: pnpm test:coverage
39+
40+
- name: Upload coverage to Codecov
41+
uses: codecov/codecov-action@v4
42+
with:
43+
token: ${{ secrets.CODECOV_TOKEN }}

Diff for: .github/workflows/create_release.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Create release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
create-release:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [20.x]
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
token: ${{ secrets.GIT_TOKEN }}
18+
19+
- name: Setup PNPM
20+
uses: pnpm/[email protected]
21+
with:
22+
version: latest
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'pnpm'
29+
cache-dependency-path: package.json
30+
31+
- name: Install standard-version
32+
run : pnpm i -g standard-version
33+
34+
- name: Config git
35+
run: |
36+
git config --global user.email "${{ github.event.sender.email }}"
37+
git config --global user.name "${{ github.event.sender.login }}"
38+
39+
- name: Apply standard-version
40+
run: standard-version -t "" --no-verify
41+
42+
- name: Get new version
43+
id: version
44+
run: echo "VERSION=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
45+
46+
- name: Commit release
47+
run: |
48+
git checkout -b release/${{ steps.version.outputs.VERSION }}
49+
git push origin release/${{ steps.version.outputs.VERSION }}
50+
git push --tags
51+
52+
- name: Create release PR
53+
env:
54+
GH_TOKEN: ${{ secrets.GIT_TOKEN }}
55+
run: |
56+
gh pr create \
57+
--title "chore(release): ${{ steps.version.outputs.VERSION }}" \
58+
--body "chore(release): ${{ steps.version.outputs.VERSION }}" \
59+
--base main \
60+
--head release/${{ steps.version.outputs.VERSION }} \
61+
--label release

Diff for: .github/workflows/remove_unnecessary_tag.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Remove unnecessary tag
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- main
9+
10+
jobs:
11+
remove-unnecessary-tag:
12+
if: github.event.pull_request.merged == false && startsWith(github.event.pull_request.head.ref , 'release/')
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Get Version
19+
id: version
20+
env:
21+
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
22+
run: echo "VERSION=${BRANCH_NAME:8}" >> $GITHUB_OUTPUT
23+
24+
- name: Remove unnecessary tag
25+
run: git push --delete origin ${{ steps.version.outputs.VERSION }}

Diff for: .gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Typescript compiled files
2+
/lib/**
3+
4+
# node modules
5+
/node_modules/
6+
7+
# test coverage reports
8+
/coverage
9+
10+
# env file
11+
.env
12+
13+
tsconfig.tsbuildinfo

Diff for: .lintstagedrc.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"*.js": [
3+
"prettier --write"
4+
],
5+
"*.ts": [
6+
"prettier --write",
7+
"eslint"
8+
]
9+
}

0 commit comments

Comments
 (0)