This project is a pnpm/Lerna workspace for PostgreSQL parser and deparser functionality. Follow these steps to get started with development.
- Node.js (v18 or higher recommended)
- pnpm package manager
- Install dependencies:
pnpm install- Build all packages:
pnpm buildThe project uses Jest for testing. Each package has its own test suite.
To run tests for a specific package, navigate to that package's directory and use the test:watch command:
cd packages/deparser
pnpm test:watchyou 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.
packages/deparser: SQL deparser implementationpackages/parser: SQL parser implementationpackages/types: TypeScript type definitionspackages/utils: Utility functions
packages/
├── deparser/ # SQL deparser implementation
├── parser/ # SQL parser implementation
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
- Make changes to the code
- Run tests in watch mode for the affected package
- Ensure all tests pass
- Commit your changes
pnpm build: Build all packagespnpm test: Run all testspnpm test:watch: Run tests in watch modepnpm lint: Run linterpnpm clean: Clean build artifacts
- 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