Contributing
Thank you for your interest in contributing to dpkit! This document provides guidelines and instructions for contributing to this project.
Project Overview
Section titled “Project Overview”Project is a monorepo with the following packages:
@dpkit/core
: Core metadata functionality@dpkit/file
: File-related functionality@dpkit/table
: Table-related functionality@dpkit/cli
: Command-line interface for running tasks@dpkit/<name>
: Domain-specific functionalitydpkit
: All-in-one package that re-exports all functionality
Development Environment
Section titled “Development Environment”Prerequisites
Section titled “Prerequisites”- Node.js: v24.0.0 or higher
- PNPM: v10.0.0 or higher
-
Clone the repository
Terminal window git clone https://github.com/yourusername/dpkit.ts.git dpkitcd dpkit -
Install dependencies
Terminal window pnpm install
Development Workflow
Section titled “Development Workflow”Code Style and Quality
Section titled “Code Style and Quality”We use Biome for linting and formatting, and TypeScript for type checking:
-
Lint: Check for code issues
Terminal window pnpm run lint -
Format: Auto-fix formatting issues
Terminal window pnpm run format -
Type Check: Verify TypeScript types
Terminal window pnpm run type -
Comprehensive Check: Run lint and type checking
Terminal window pnpm run check
Testing
Section titled “Testing”Tests are located in __spec__
directories and use Vitest:
-
Run All Tests: (includes linting and type checking)
Terminal window pnpm test -
Run Tests Only: (without linting/type checking)
Terminal window pnpm run spec -
Run a Specific Test:
Terminal window pnpm exec vitest run core/actions/__spec__/findTask.ts
Dependencies
Section titled “Dependencies”Update all dependencies to their latest versions:
pnpm run bump
Code Style Guidelines
Section titled “Code Style Guidelines”- Use TypeScript with strict type checking
- Follow ES modules pattern (
import
/export
) - Tests should be placed in
__spec__
directories - Use semicolons as needed (not required everywhere)
- Use arrow function parentheses as needed (omitted for single parameters)
Making Changes to the Meta-Package
Section titled “Making Changes to the Meta-Package”When adding new functionality:
- Add it to the appropriate package first (
core
,cli
, orcron
) - Ensure it’s properly exported from that package
- No additional work is needed for the meta-package as it automatically re-exports everything
Submitting Changes
Section titled “Submitting Changes”- Create a feature branch (
git checkout -b feature/your-feature
) - Make your changes with appropriate tests
- Ensure the code passes all checks:
pnpm test
- Commit your changes with a descriptive message
- Submit a pull request
License
Section titled “License”By contributing to dpkit, you agree that your contributions will be licensed under the project’s license.
Thank you for your contribution!