Skip to content

Commit b8731e7

Browse files
committed
initial commit
1 parent 02f8bc5 commit b8731e7

File tree

17 files changed

+4481
-0
lines changed

17 files changed

+4481
-0
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_size = 2
6+
indent_style = space
7+
trim_trailing_whitespace = true

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: 43081j

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: '/'
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
versioning-strategy: increase
9+
- package-ecosystem: 'github-actions'
10+
directory: '/'
11+
schedule:
12+
interval: weekly

.github/workflows/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [18.x, 20.x, 22.x]
14+
fail-fast: false
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Use Node v${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Install Dependencies
23+
run: npm ci
24+
- name: Lint
25+
run: npm run lint
26+
- name: Test
27+
run: npm run test

.github/workflows/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish Release (npm)
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
- name: Setup Node
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
- name: Install Dependencies
18+
run: npm ci
19+
- name: Lint
20+
run: npm run lint
21+
- name: Build
22+
run: npm run build
23+
- name: Test
24+
run: npm test
25+
26+
publish-npm:
27+
needs: build
28+
runs-on: ubuntu-latest
29+
permissions:
30+
id-token: write
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: 22.x
38+
registry-url: 'https://registry.npmjs.org'
39+
cache: 'npm'
40+
- run: npm ci
41+
- run: npm run build
42+
- run: npm version ${TAG_NAME} --git-tag-version=false
43+
env:
44+
TAG_NAME: ${{ github.ref_name }}
45+
- run: npm publish --provenance --access public --tag next
46+
if: "github.event.release.prerelease"
47+
- run: npm publish --provenance --access public
48+
if: "!github.event.release.prerelease"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/lib

.prettierrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"bracketSpacing": false,
3+
"printWidth": 80,
4+
"semi": true,
5+
"singleQuote": true,
6+
"tabWidth": 2,
7+
"trailingComma": "none",
8+
"useTabs": false,
9+
"arrowParens": "always"
10+
}

eslint.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import eslintjs from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import {defineConfig} from 'eslint/config';
4+
5+
export default defineConfig([
6+
{
7+
files: ['src/**/*.ts', 'test/**/*.ts'],
8+
plugins: {
9+
eslint: eslintjs,
10+
typescript: tseslint
11+
},
12+
languageOptions: {
13+
globals: {
14+
process: 'readonly',
15+
console: 'readonly'
16+
}
17+
},
18+
extends: [
19+
tseslint.configs.strict,
20+
eslintjs.configs.recommended
21+
]
22+
},
23+
]);

0 commit comments

Comments
 (0)