Skip to content

Latest commit

 

History

History
114 lines (81 loc) · 6.42 KB

CONTRIBUTING.md

File metadata and controls

114 lines (81 loc) · 6.42 KB

Contributing

Contributions to react-querybuilder and associated packages are more than welcome!

First contribution? Learn how to contribute to an open source project on GitHub (free course).

Project setup

This project requires Bun.

  1. Fork and clone this repository.
  2. Run bun install to install dependencies.
  3. Build the packages with bun run build.
  4. Create a branch for your PR with git checkout -b your-branch-name.

Testing changes

To serve a hot-module-reloading (HMR) demo page locally, run bun start.

Your IDE should check for TypeScript and lint problems as you code, but to check manually run bun typecheck and/or bun lint.

Testing compatibility packages

Each compatibility package has its own start:*, build:*, and typecheck:* scripts.

Package Start script Build script Typecheck script
All packages N/A bun run build bun typecheck
react-querybuilder bun start bun build:rqb bun typecheck:rqb
@react-querybuilder/antd bun start:antd bun build:antd bun typecheck:antd
@react-querybuilder/bootstrap bun start:bootstrap bun build:bootstrap bun typecheck:bootstrap
@react-querybuilder/bulma bun start:bulma bun build:bulma bun typecheck:bulma
@react-querybuilder/chakra bun start:chakra bun build:chakra bun typecheck:chakra
@react-querybuilder/dnd bun start:dnd bun build:dnd bun typecheck:dnd
@react-querybuilder/fluent bun start:fluent bun build:fluent bun typecheck:fluent
@react-querybuilder/mantine bun start:mantine bun build:mantine bun typecheck:mantine
@react-querybuilder/material bun start:material bun build:material bun typecheck:material
@react-querybuilder/native bun start:native bun build:native bun typecheck:native
@react-querybuilder/tremor bun start:tremor bun build:tremor bun typecheck:tremor

To locally serve the documentation website, run bun web. (To skip regeneration of the TypeDoc API docs, run bun web:skiptypedoc.)

The website demo uses the static build of each package and therefore does not support HMR except for the website code itself. To update the website after making changes to one of the packages, run the package's build:* script. The change will be detected and the website will be reloaded automatically.

Proposing changes

Before submitting a pull request, please do the following:

  • Discuss the change you wish to make by creating a new issue, creating a discussion topic, or chatting with us on Discord.
  • Run bun checkall to make sure CI will run successfully.
  • If adding a new feature, add corresponding tests (we maintain 100% coverage).
  • If changing behavior or adding a feature, update the documentation. You may need to update both the current (aka "next") docs and the latest versioned docs.
  • If your editor doesn't automatically format code with Prettier when saving changes, run bun pretty-print.
  • When addressing a bug, refer to an existing GitHub issue or provide a reproducible example. Any interactive demo or minimal repository is fine, including CodeSandbox or StackBlitz. You can use the CI base, the basic example (JS version), or any of the other examples as a starter template.

Generated files

Some files committed to this repository are generated by scripts and should not be modified by hand. If you modify any of the following source files, regenerate the dependent files before committing your changes.

CEL and SQL parsers

Run bun generate-parsers.

Source file Generated file
cel.jison celParser.js
sql.jison sqlParser.js

Examples

Run bun generate-examples.

Sources:

Generated folders:

(The dependencies and Prettier configs of other examples will be updated, but they will not be completely regenerated like the ones listed above.)