Skip to content

Commit b7fa65b

Browse files
authored
Initial commit
0 parents  commit b7fa65b

25 files changed

+9757
-0
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 2
11+
indent_style = space
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
[*.{md,snap}]
16+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
eslint.config.mjs linguist-vendored

.github/renovate.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["github>2bad/renovate-config:default"]
4+
}

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'docs/**'
7+
- '*.md'
8+
9+
jobs:
10+
build:
11+
name: build on node@${{ matrix.node-version }}
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version:
17+
- 22
18+
- 24
19+
20+
steps:
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
22+
with:
23+
persist-credentials: false
24+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
28+
- run: npm ci
29+
- run: npm run check
30+
- run: npm run build

.github/workflows/codeql.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CodeQL
2+
3+
on:
4+
schedule:
5+
- cron: 0 4 * * 1
6+
7+
jobs:
8+
analyze:
9+
name: Analyze
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
actions: read
14+
contents: read
15+
security-events: write
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
language:
21+
- javascript-typescript
22+
23+
steps:
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
25+
with:
26+
persist-credentials: false
27+
28+
# Initializes the CodeQL tools for scanning.
29+
- uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3
30+
with:
31+
languages: ${{ matrix.language }}
32+
queries: security-extended,security-and-quality
33+
34+
- uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
name: publish
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
id-token: write
15+
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
18+
with:
19+
persist-credentials: false
20+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
21+
with:
22+
node-version-file: package.json
23+
registry-url: https://registry.npmjs.org
24+
25+
- run: npm ci
26+
- run: npm publish --provenance --access public
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'docs/**'
7+
- '*.md'
8+
# schedule:
9+
# - cron: 0 20 * * *
10+
11+
jobs:
12+
test:
13+
name: test on ${{ matrix.os-release }} node@${{ matrix.node-version }}
14+
runs-on: ${{ matrix.os-release }}
15+
16+
strategy:
17+
matrix:
18+
node-version:
19+
- 22
20+
- 24
21+
os-release:
22+
- ubuntu-latest
23+
- windows-latest
24+
25+
steps:
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
27+
with:
28+
persist-credentials: false
29+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
33+
- run: npm ci
34+
- run: npm run test
35+
36+
coverage:
37+
name: collect coverage
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
41+
with:
42+
persist-credentials: false
43+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
44+
with:
45+
node-version-file: package.json
46+
47+
- run: npm ci
48+
49+
- run: npm run test:unit
50+
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5
51+
with:
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
flags: unit
54+
55+
# - run: rm -rf coverage
56+
57+
# - run: npm run test:integration
58+
# - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
59+
# with:
60+
# token: ${{ secrets.CODECOV_TOKEN }}
61+
# flags: integration

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Windows
2+
Thumbs.db
3+
Desktop.ini
4+
$RECYCLE.BIN/
5+
6+
## OS X
7+
.DS_Store
8+
.AppleDouble
9+
.LSOverride
10+
Icon
11+
._*
12+
.Spotlight-V100
13+
.Trashes
14+
15+
## Editors and IDE
16+
*.sublime*
17+
*.code-workspace
18+
19+
## Node.js
20+
lib-cov
21+
*.seed
22+
*.log
23+
*.csv
24+
*.dat
25+
*.out
26+
*.pid
27+
*.gz
28+
*.swp
29+
pids
30+
logs
31+
results
32+
tmp
33+
node_modules
34+
npm-debug.log
35+
36+
## Build
37+
build
38+
39+
## Coverage reports
40+
coverage
41+
42+
## API keys and secrets
43+
.env

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact=true

.swcrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "https://json.schemastore.org/swcrc",
3+
"test": ".*\\.ts$",
4+
"exclude": [".*\\.test.ts$"],
5+
"jsc": {
6+
"parser": {
7+
"syntax": "typescript",
8+
"decorators": true
9+
},
10+
"target": "es2022",
11+
"baseUrl": "./source",
12+
"paths": {
13+
"~/*": ["./*"]
14+
}
15+
},
16+
"module": {
17+
"type": "es6"
18+
}
19+
}

0 commit comments

Comments
 (0)