Skip to content

Commit 385d573

Browse files
feat: mega commit with initial build out and repo setup
1 parent 784f453 commit 385d573

40 files changed

Lines changed: 7139 additions & 2 deletions

.changeset/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changesets
2+
3+
This directory is used by [Changesets](https://github.com/changesets/changesets) to manage package versioning and changelog generation.
4+
5+
## How to use
6+
7+
When you make changes to a package, run:
8+
9+
```bash
10+
pnpm changeset
11+
```
12+
13+
This will prompt you to:
14+
15+
1. Select which packages have changed
16+
2. Specify the version bump type (major, minor, patch)
17+
3. Write a summary of the changes
18+
19+
The changeset will be stored in this directory and used when releasing packages.

.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.0.0/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.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+
groups:
9+
production-dependencies:
10+
dependency-type: 'production'
11+
development-dependencies:
12+
dependency-type: 'development'

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [18.x, 20.x]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: pnpm/action-setup@v4
24+
with:
25+
version: 10
26+
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'pnpm'
32+
33+
- name: Install dependencies
34+
run: pnpm install --frozen-lockfile
35+
36+
- name: Typecheck
37+
run: pnpm typecheck
38+
39+
- name: Lint
40+
run: pnpm lint
41+
42+
- name: Build
43+
run: pnpm build
44+
45+
- name: Test
46+
run: pnpm test

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v4
17+
18+
- uses: pnpm/action-setup@v4
19+
with:
20+
version: 10
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: 'pnpm'
27+
28+
- name: Install Dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Build
32+
run: pnpm build
33+
34+
- name: Create Release Pull Request or Publish to npm
35+
id: changesets
36+
uses: changesets/action@v1
37+
with:
38+
publish: pnpm release
39+
commit: 'chore: release packages'
40+
title: 'chore: release packages'
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Dependencies
2+
node_modules/
3+
.pnpm-store/
4+
.pnpm-debug.log
5+
6+
# Build output
7+
dist/
8+
*.tsbuildinfo
9+
.turbo
10+
11+
# Tests
12+
coverage/
13+
14+
# IDE
15+
.vscode/
16+
.idea/
17+
*.swp
18+
*.swo
19+
*~
20+
21+
# OS
22+
.DS_Store
23+
Thumbs.db
24+
25+
# Environment
26+
.env
27+
.env.local
28+
.env.*.local
29+
30+
# Logs
31+
*.log
32+
npm-debug.log*
33+
yarn-debug.log*
34+
yarn-error.log*
35+
pnpm-debug.log*
36+
37+
# Changesets
38+
.changeset/*.md
39+
!.changeset/README.md

.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Use pnpm for package management
2+
engine-strict=true
3+
4+
# Faster installs
5+
auto-install-peers=true

.nvmrc

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

.prettierrc

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

CONTRIBUTING.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Contributing to Mizzle ORM
2+
3+
Thank you for your interest in contributing to Mizzle ORM!
4+
5+
## Development Setup
6+
7+
1. Fork and clone the repository
8+
2. Install dependencies:
9+
```bash
10+
pnpm install
11+
```
12+
3. Build the project:
13+
```bash
14+
pnpm build
15+
```
16+
4. Run tests:
17+
```bash
18+
pnpm test
19+
```
20+
21+
## Project Structure
22+
23+
This is a monorepo managed with pnpm workspaces and Turborepo:
24+
25+
```
26+
mizzle-orm/
27+
├── packages/
28+
│ └── mizzle-orm/ # Core ORM package
29+
├── .changeset/ # Changesets for versioning
30+
├── .github/ # GitHub Actions workflows
31+
└── turbo.json # Turborepo configuration
32+
```
33+
34+
## Making Changes
35+
36+
1. Create a new branch:
37+
38+
```bash
39+
git checkout -b feature/your-feature-name
40+
```
41+
42+
2. Make your changes in the appropriate package
43+
44+
3. Add tests for your changes
45+
46+
4. Run the test suite:
47+
48+
```bash
49+
pnpm test
50+
```
51+
52+
5. Create a changeset:
53+
54+
```bash
55+
pnpm changeset
56+
```
57+
58+
6. Commit your changes following [Conventional Commits](https://www.conventionalcommits.org/):
59+
60+
```
61+
feat: add new feature
62+
fix: fix bug
63+
docs: update documentation
64+
chore: update dependencies
65+
```
66+
67+
7. Push and create a pull request
68+
69+
## Code Style
70+
71+
- We use Prettier for code formatting
72+
- We use ESLint for linting
73+
- Run `pnpm format` before committing
74+
75+
## Testing
76+
77+
- Write tests for all new features
78+
- Ensure all tests pass before submitting a PR
79+
- Aim for high test coverage
80+
81+
## Pull Request Process
82+
83+
1. Ensure your PR has a clear description of the changes
84+
2. Link any related issues
85+
3. Ensure all CI checks pass
86+
4. Request review from maintainers
87+
5. Address any feedback
88+
89+
## Release Process
90+
91+
Releases are automated using Changesets:
92+
93+
1. Changesets are created during development
94+
2. On merge to main, a release PR is automatically created
95+
3. Merging the release PR publishes to npm
96+
97+
## Questions?
98+
99+
Feel free to open an issue for any questions or concerns!

0 commit comments

Comments
 (0)