Skip to content

Commit 2b70c15

Browse files
committed
Ready to open-source
0 parents  commit 2b70c15

490 files changed

Lines changed: 79800 additions & 0 deletions

File tree

Some content is hidden

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

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/copilot-instructions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Guidance
2+
3+
Write tests and type tests using Vitest. Use `test`, not `it` when doing so.
4+
5+
Use the .js extension when importing other files from this project.
6+
7+
When writing tests, be exhaustive. Cover all cases.

.github/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
open-pull-requests-limit: 25
6+
schedule:
7+
interval: "daily"
8+
groups:
9+
prod:
10+
dependency-type: "production"
11+
patterns:
12+
- "*"
13+
dev:
14+
dependency-type: "development"
15+
patterns:
16+
- "*"
17+
- package-ecosystem: "github-actions"
18+
directory: "/"
19+
open-pull-requests-limit: 25
20+
schedule:
21+
interval: "daily"
22+
groups:
23+
prod:
24+
dependency-type: "production"
25+
patterns:
26+
- "*"
27+
dev:
28+
dependency-type: "development"
29+
patterns:
30+
- "*"

.github/workflows/ci.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: CI
2+
env:
3+
DO_NOT_TRACK: 1
4+
5+
on:
6+
push:
7+
branches: [main]
8+
paths:
9+
- "packages/**"
10+
pull_request:
11+
branches: [main]
12+
paths:
13+
- "packages/**"
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
services:
19+
postgres:
20+
image: postgres:latest
21+
env:
22+
POSTGRES_USER: orm
23+
POSTGRES_PASSWORD: password
24+
POSTGRES_DB: orm
25+
ports:
26+
- 54321:5432
27+
options: >-
28+
--health-cmd pg_isready
29+
--health-interval 10s
30+
--health-timeout 5s
31+
--health-retries 5
32+
33+
steps:
34+
- uses: actions/checkout@v5
35+
36+
- name: Install pnpm
37+
uses: pnpm/action-setup@v4
38+
with:
39+
run_install: false
40+
41+
- name: Setup Node.js
42+
uses: actions/setup-node@v5
43+
with:
44+
node-version-file: ".tool-versions"
45+
cache: "pnpm"
46+
47+
- name: Get pnpm store directory
48+
shell: bash
49+
run: |
50+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
51+
52+
- name: Install dependencies
53+
run: pnpm install --frozen-lockfile
54+
55+
- name: Run tests
56+
run: pnpm test
57+
58+
- name: Check formatting
59+
run: pnpm format:check
60+
61+
- name: Lint
62+
run: pnpm lint
63+
64+
- name: Check dependencies are in sync
65+
run: pnpm syncpack:check
66+
67+
- name: Check types
68+
run: pnpm typecheck
69+
70+
- name: Upload coverage reports
71+
if: github.actor != 'dependabot[bot]'
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: coverage-reports
75+
path: |
76+
packages/*/coverage
77+
retention-days: 7
78+
79+
- name: Extract coverage percentage
80+
id: coverage
81+
if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'
82+
shell: bash
83+
run: |
84+
echo "coverage<<EOF" >> $GITHUB_OUTPUT
85+
for d in packages/*/coverage/coverage-summary.json; do
86+
pkg=$(echo $d | cut -d'/' -f2)
87+
pct=$(jq -r '.total.lines.pct' $d)
88+
echo "* $pkg: ${pct}%" >> $GITHUB_OUTPUT
89+
done
90+
echo "EOF" >> $GITHUB_OUTPUT
91+
92+
- name: Find Comment
93+
uses: peter-evans/find-comment@v4
94+
if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'
95+
id: find-comment
96+
with:
97+
issue-number: ${{ github.event.pull_request.number }}
98+
comment-author: "github-actions[bot]"
99+
body-includes: "Coverage Report"
100+
101+
- name: Create or Update Comment
102+
uses: peter-evans/create-or-update-comment@v5
103+
if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'
104+
with:
105+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
106+
issue-number: ${{ github.event.pull_request.number }}
107+
body: |
108+
### Coverage Report
109+
${{ steps.coverage.outputs.coverage }}
110+
edit-mode: replace

.github/workflows/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Dependabot
2+
on:
3+
workflow_dispatch: {}
4+
schedule:
5+
# random MM to avoid a load spike on GitHub Actions at 00:00
6+
- cron: 34 * * * *
7+
permissions:
8+
contents: write
9+
statuses: read
10+
checks: read
11+
jobs:
12+
merge_prs:
13+
name: "Merge PRs > 1 week old"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v5
18+
- name: Merge PRs
19+
run: |
20+
set -e
21+
# Merge the first Dependabot PR that was created more than a week ago and has all checks passing.
22+
# We only merge one because we'll need to rebase after its merged, so we run this scheduled
23+
# action once every hour.
24+
for pr in `gh pr list --json number,author,createdAt --search "created:<=$(date -d "2 days ago" +"%Y-%m-%d") author:app/dependabot status:success" --jq '.[].number' | head -n 1`; do
25+
if [ -n "$pr" ]; then
26+
gh pr merge --squash "$pr"
27+
fi
28+
done
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# Dependencies
4+
node_modules
5+
.pnp
6+
.pnp.js
7+
8+
# Local env files
9+
.env.local
10+
.env.development.local
11+
.env.test.local
12+
.env.production.local
13+
14+
# Testing
15+
coverage
16+
17+
# Turbo
18+
.turbo
19+
20+
# Vercel
21+
.vercel
22+
23+
# Build Outputs
24+
.next/
25+
out/
26+
build
27+
dist
28+
29+
30+
# Debug
31+
npm-debug.log*
32+
yarn-debug.log*
33+
yarn-error.log*
34+
35+
# Misc
36+
.DS_Store
37+
*.pem
38+
39+
tsconfig.vitest-temp.json
40+
*.tsbuildinfo
41+
.scannerwork
42+
vitest.config.ts.timestamp*

.npmrc

Whitespace-only changes.

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.hbs
2+
*.mdx
3+
*.md
4+
build
5+
tsconfig.vitest-temp.json
6+
coverage

.prettierrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 160,
3+
"tabWidth": 4,
4+
"trailingComma": "all",
5+
"singleQuote": false,
6+
"semi": true,
7+
"importOrder": ["^(?!^@casekit/|^~|^#|^[.])", "^@casekit/.*$", "^[~#.].*$"],
8+
"importOrderSeparation": true,
9+
"importOrderSortSpecifiers": true,
10+
"plugins": ["@trivago/prettier-plugin-sort-imports"]
11+
}

0 commit comments

Comments
 (0)