Thank you for your interest in contributing to the Universal Data Layer project! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to abide by our code of conduct: be respectful, inclusive, and constructive in all interactions.
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected vs actual behavior
- Your environment (Node version, OS, etc.)
- Any relevant logs or error messages
Feature requests are welcome! Please provide:
- A clear use case for the feature
- How it aligns with the project's goals
- Any implementation ideas you might have
- Examples from other projects (if applicable)
Please read our Pull Request Guidelines for detailed requirements and standards.
Quick overview:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Ensure all tests pass (
npm run test) - Run linting and type checks (
npm run lintandnpm run typecheck) - Add a changeset (
npm run changeset) - Commit your changes with Conventional Commits
- Push to your fork
- Open a Pull Request using our template
See the Development Guide for detailed setup instructions.
Quick start:
git clone https://github.com/dawidurbanski/universal-data-layer.git
cd universal-data-layer
npm install
npm run build
npm run dev- Check if an issue exists for your planned work
- If not, create one to discuss the change
- Wait for maintainer feedback before starting major work
This project uses automated tooling to ensure code quality:
- Prettier for code formatting
- ESLint for code quality
- TypeScript for type safety
Run these before committing:
npm run lint # Check for issues
npm run fix # Auto-fix issuesThis project uses Conventional Commits for automated versioning and changelog generation.
Format: <type>(<scope>): <description>
Types:
feat:New features (triggers MINOR version bump)fix:Bug fixes (triggers PATCH version bump)docs:Documentation changesstyle:Code style changes (formatting, etc.)refactor:Code refactoringperf:Performance improvementstest:Test additions or changesbuild:Build system changesci:CI configuration changeschore:Other changesrevert:Revert previous commits
Scopes: core, contentful, shopify, okendo, cache, types, docs, deps, release, config
Breaking Changes: Add BREAKING CHANGE: in the commit body for MAJOR version bumps.
Examples:
feat(core): add plugin discovery mechanism
fix(contentful): resolve caching issue with preview mode
docs(api): update GraphQL schema documentation
feat(shopify): add webhook handling support
BREAKING CHANGE: Plugin interface now requires version property
Before submitting a PR:
- Ensure all packages build:
npm run build - Run linting:
npm run lint - Run type checking:
npm run typecheck - Run tests with coverage:
npm run test:coverage - Ensure coverage meets 90% threshold
- Add tests for new functionality
Please follow our comprehensive Pull Request Guidelines which cover all requirements in detail.
Key steps:
- Add a changeset for your changes:
npm run changeset - Update documentation for any API changes
- Ensure your PR description clearly describes the problem and solution
- Link any related issues
- Ensure all CI checks pass (tests, linting, type checking)
- Use the PR template to confirm all requirements are met
- Request review from maintainers
- Be responsive to feedback
Note: Every PR that changes functionality must include a changeset. The changeset will be used to generate changelogs and determine version bumps.
universal-data-layer/
├── packages/ # Package workspaces
│ ├── core/ # Core library
│ └── contentful/ # Contentful plugin
├── docs/ # Documentation
└── package.json # Root configuration
Each package is independent but shares configuration:
# Work on a specific package
cd packages/core
npm run dev
# Or from root, affecting all packages
npm run build
npm run lintThis project uses automated releases with semantic versioning. When your PR is merged to main:
- CI/CD pipeline runs tests and checks
- If changesets exist, a "Version Packages" PR is created automatically
- Merging the Version PR triggers npm publishing
- All packages are versioned and released together
For detailed information, see the Release Documentation.
- Create a new package in
packages/ - Follow the plugin interface (to be documented)
- Add documentation in the package README
- Update the main README with your plugin
Example structure:
packages/my-plugin/
├── src/
│ └── index.ts
├── package.json
├── tsconfig.json
└── README.md
- Update relevant documentation with your changes
- Add JSDoc comments for public APIs
- Include examples in documentation
- Keep README files up to date
Feel free to:
- Open an issue for questions
- Start a discussion in GitHub Discussions
- Contact maintainers directly
By contributing, you agree that your contributions will be licensed under the MIT License.
Contributors will be recognized in:
- The project README
- Release notes for their contributions
- GitHub's contributor graph
Thank you for contributing to Universal Data Layer!