Development Guide
November 23, 2025 · View on GitHub
This project is a pnpm/Lerna workspace for PostgreSQL parser and deparser functionality. Follow these steps to get started with development.
Prerequisites
- Node.js (v18 or higher recommended)
- pnpm package manager
Initial Setup
- Install dependencies:
pnpm install
- Build all packages:
pnpm build
Running Tests
The project uses Jest for testing. Each package has its own test suite.
Running Tests for a Specific Package
To run tests for a specific package, navigate to that package's directory and use the test:watch command:
cd packages/deparser
pnpm test:watch
you can also run pnpm test if you don't need to watch.
This will start Jest in watch mode, which will automatically re-run tests when files change.
Available Packages
packages/deparser: SQL deparser implementationpackages/parser: SQL parser implementationpackages/types: TypeScript type definitionspackages/utils: Utility functions
Project Structure
packages/
├── deparser/ # SQL deparser implementation
├── parser/ # SQL parser implementation
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
Development Workflow
- Make changes to the code
- Run tests in watch mode for the affected package
- Ensure all tests pass
- Commit your changes
Common Commands
pnpm build: Build all packagespnpm test: Run all testspnpm test:watch: Run tests in watch modepnpm lint: Run linterpnpm clean: Clean build artifacts
Notes
- The project uses Lerna for managing multiple packages in a monorepo
- Each package can be developed and tested independently
- Changes to shared packages (types, utils) may require rebuilding dependent packages