Skip to content

Latest commit

 

History

History
129 lines (82 loc) · 3.49 KB

File metadata and controls

129 lines (82 loc) · 3.49 KB

Contributing to data-viz-wordpress

Thank you for your interest in contributing. This project is maintained by Development Gateway and welcomes contributions from the community.

Table of Contents


Development Setup

Prerequisites

  • Node.js 22+
  • pnpm 10+corepack enable && corepack prepare pnpm@latest --activate
  • Docker — for the full WordPress stack

Install dependencies

pnpm install

Build all packages and plugins

pnpm build

Run the full WordPress stack locally

docker compose up

Warning: The default docker-compose.yml uses placeholder passwords (wordpress, somewordpress). These are for local development only. Never use these defaults in a production or internet-facing deployment.

Environment variables

The block namespace and category are configured via constants exported from @devgateway/dvz-wp-commons:

  • BLOCKS_NS — WordPress block namespace (e.g. viz)
  • BLOCKS_CATEGORY — WordPress block category slug

When extending this project, import these constants rather than hardcoding strings:

import { BLOCKS_NS, BLOCKS_CATEGORY } from '@devgateway/dvz-wp-commons';

Branching Model

  • main is the stable branch and the base for all pull requests.
  • Create a feature branch off main for every change: task/short-description or fix/short-description.
  • Do not push directly to main.

Making Changes

  1. Fork the repository and create a branch off main.
  2. Make your changes and ensure all tests and linting pass.
  3. Run pnpm changeset to document your change (see Changesets).
  4. Open a pull request against main.

Code Style

This project uses @wordpress/scripts for linting and formatting.

# Lint JavaScript/TypeScript
pnpm lint

# Format code
pnpm format

Please ensure your changes pass linting before opening a PR.


Changesets (versioning)

This project uses Changesets for versioning and changelog generation.

After making any change that should appear in a changelog (features, fixes, breaking changes):

pnpm changeset

Follow the interactive prompts to select the affected packages and describe the change. Commit the generated changeset file alongside your code changes.

PRs without a changeset file will not trigger a version bump or changelog entry.


Opening a Pull Request

  • Target branch: main
  • At least one reviewer approval is required before merging.
  • All CI checks must pass.
  • Include a changeset file for any user-facing change.
  • Do not introduce hardcoded credentials, internal URLs, client-specific identifiers, or PII.
  • Ensure any new npm dependency has a GPL-compatible license (MIT, BSD, ISC, Apache-2.0, LGPL, or GPL).

License

By contributing to this project, you agree that your contributions will be licensed under the same license as the project: GPL-2.0-or-later.


Security

Please do not report security vulnerabilities through public GitHub issues. See SECURITY.md for the responsible disclosure process.