Thank you for your interest in contributing to zodown! This guide will help you get started.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/zodown.git cd zodown - Install dependencies:
pnpm install
- Create a branch:
git checkout -b feature/your-feature-name
# Run tests in watch mode
pnpm test
# Run tests once
pnpm test:run
# Build the package
pnpm build
# Check types
pnpm typecheck
# Format code
pnpm format
# Run linter
pnpm lintAll new features should include tests. We use Vitest for testing:
import { describe, it, expect } from 'vitest'
import { zodown } from '../src/zodown'
describe('New Feature', () => {
it('should work correctly', () => {
const schema = z.string()
const v3 = zodown(schema)
expect(v3.parse('test')).toBe('test')
})
})- Add type mapping in
DowngradeTypeinsrc/zodown.ts - Add conversion logic in the
downgrade()function - Add comprehensive tests in
tests/zodown.test.ts - Update README if needed
- Use 2 spaces for indentation
- No semicolons
- Single quotes for strings
- Run
pnpm formatbefore committing
Follow conventional commits:
feat:for new featuresfix:for bug fixesdocs:for documentationtest:for testsrefactor:for refactoringchore:for maintenance
- Ensure all tests pass:
pnpm test:run - Update documentation if needed
- Create a pull request with a clear description
- Wait for review
Feel free to open an issue for any questions or discussions!