Skip to content

Commit d1bbfc9

Browse files
authored
Initial commit
0 parents  commit d1bbfc9

29 files changed

+6491
-0
lines changed

.github/workflows/assign.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# .github/workflows/take.yml
2+
name: Assign issue to contributor
3+
on:
4+
issue_comment:
5+
6+
jobs:
7+
assign:
8+
name: Take an issue
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
steps:
13+
- name: take the issue
14+
uses: bdougie/take-action@main
15+
with:
16+
message: Thanks for taking this issue! Let us know if you have any questions!
17+
trigger: .take
18+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/autofix.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: autofix.ci
2+
on:
3+
pull_request:
4+
push:
5+
branches: main
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
autofix:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
node-version: [20.x]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 9.8.0
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: "pnpm"
31+
32+
- name: Format files
33+
run: |
34+
pnpm install --dev --frozen-lockfile
35+
pnpm test:format
36+
37+
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Changeset - Release and Publish
2+
on:
3+
push:
4+
branches: main
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
id-token: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 15
15+
strategy:
16+
matrix:
17+
node-version: [20.x]
18+
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
with:
23+
# This makes Actions fetch all Git history so that Changesets
24+
# can generate changelogs with the correct commits.
25+
fetch-depth: 0
26+
27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: 9.8.0
31+
32+
- name: Setup Node.js 20.x
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
cache: "pnpm"
37+
38+
- name: Install dependencies and build
39+
run: |
40+
pnpm install --frozen-lockfile
41+
pnpm build
42+
43+
- name: Create Release Pull Request or Publish to npm
44+
uses: changesets/action@v1
45+
with:
46+
commit: "ci: update package version"
47+
title: "ci: update package version"
48+
publish: pnpm release
49+
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4+
#
5+
# Source repository: https://github.com/actions/dependency-review-action
6+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7+
name: "Dependency Review"
8+
on: [pull_request]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: "Checkout Repository"
18+
uses: actions/checkout@v4
19+
- name: "Dependency Review"
20+
uses: actions/dependency-review-action@v3

.github/workflows/label-issues.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Label issues
2+
on:
3+
issues:
4+
types:
5+
- reopened
6+
- opened
7+
jobs:
8+
label_issues:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
steps:
13+
- uses: actions/github-script@v6
14+
with:
15+
script: |
16+
github.rest.issues.addLabels({
17+
issue_number: context.issue.number,
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
labels: ["triage"]
21+
})

.github/workflows/lint-and-type.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint and Type
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: [20.x]
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 9.8.0
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: "pnpm"
31+
32+
- name: Install dependencies and run tests
33+
run: |
34+
pnpm install --frozen-lockfile
35+
pnpm test:check-types
36+
pnpm test:lint

.github/workflows/size-limit.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Size Limit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: [20.x]
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 9.8.0
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: "pnpm"
31+
32+
- name: Install dependencies and run size limit check
33+
run: |
34+
pnpm install --frozen-lockfile
35+
pnpm test:size

.github/workflows/stale.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2+
#
3+
# You can adjust the behavior by modifying this file.
4+
# For more information, see:
5+
# https://github.com/actions/stale
6+
name: Mark stale issues and pull requests
7+
8+
on:
9+
schedule:
10+
- cron: "32 17 * * *"
11+
12+
jobs:
13+
stale:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
issues: write
17+
pull-requests: write
18+
19+
steps:
20+
- uses: actions/stale@v5
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
stale-issue-message: "Stale issue message"
24+
stale-pr-message: "Stale pull request message"
25+
stale-issue-label: "no-issue-activity"
26+
stale-pr-label: "no-pr-activity"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test - Release and Publish
2+
on:
3+
pull_request:
4+
push:
5+
branches: main
6+
tags: ["!**"]
7+
8+
9+
concurrency: ${{ github.workflow }}-${{ github.ref }}
10+
11+
jobs:
12+
test-release:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 15
15+
strategy:
16+
matrix:
17+
node-version: [20.x]
18+
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 9.8.0
27+
28+
- name: Setup Node.js 20.x
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
cache: "pnpm"
33+
34+
- name: Install dependencies and build
35+
run: |
36+
pnpm install --frozen-lockfile
37+
pnpm build
38+
39+
- name: Deploy and test release via pkg.pr.new
40+
run: pnpm test:release
41+
42+

.github/workflows/triage.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "Assign issues with .take"
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
- edited
8+
9+
jobs:
10+
take-issue:
11+
name: Disable take issue
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
steps:
15+
- name: take an issue
16+
uses: bdougie/take-action@main
17+
with:
18+
issueCurrentlyAssignedMessage: Thanks for being interested in this issue. It looks like this ticket is already assigned to someone else.
19+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
node_modules
3+
.eslintcache
4+
*.tsbuildinfo
5+
eslint-typegen.d.ts

.prettierignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dist
2+
pnpm-lock.yaml
3+
package.json
4+
eslint-typegen.d.ts
5+
*.md
6+
*.tsbuildinfo
7+
.next

.prettierrc.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 107,
3+
"singleQuote": false,
4+
"tabWidth": 3,
5+
"trailingComma": "es5",
6+
"useTabs": true
7+
}

.vscode/extensions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint", // ESLint
4+
"esbenp.prettier-vscode", // Prettier - Code formatter
5+
"kravets.vscode-publint", // PubLint
6+
"usernamehw.errorlens" // Error Lens
7+
]
8+
}

.vscode/settings.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"typescript.tsdk": "node_modules\\typescript\\lib",
3+
4+
// For consistent formating across machines
5+
"editor.defaultFormatter": "esbenp.prettier-vscode",
6+
"editor.formatOnSave": true,
7+
"editor.tabSize": 3,
8+
"editor.indentSize": "tabSize",
9+
"editor.detectIndentation": false,
10+
"editor.insertSpaces": false,
11+
12+
// Optional
13+
"editor.codeActionsOnSave": {
14+
"source.addMissingImports": "never",
15+
"source.organizeImports.biome": "explicit"
16+
}
17+
}

0 commit comments

Comments
 (0)