Skip to content

Package @reatom/_media/contributing

[!NOTE] We prefer English language for all communication.

Creating an issue

Before creating an issue please ensure that the problem is not already reported.

If you want to report a bug, create a reproduction using StackBlitz or CodeSandbox. If you want to request a feature, add motivation section and some usage examples.

Sending a Pull Request

[!TODO] Update requirements for development

  1. fork and clone the repository
  2. create a development branch from v1000
  3. install dependencies from the root of the repo (Node 24.2.0 and pnpm@10.25.0 are recommended):
    Terminal window
    pnpm install
    Note: this command installs dependencies for all packages, but only builds @reatom/core.
  4. build the package you are editing from the root of the repo:
    Terminal window
    pnpm --filter <PACKAGE_NAME> run build
    Replace <PACKAGE_NAME> with the relevant package name like @reatom/react
  5. make changes and commit them
  6. upload feature branch and create a Pull Request to merge changes to v1000
  7. link your PR to the issue using a closing keyword or provide changes description with motivation and explanation in the comment (example: fix #74)
  8. wait until a team member responds

Creating a package

The goal of Reatom ecosystem is to provide adapters for Web APIs and popular npm modules. Therefore, the process of creating a new package is almost identical to editing an existing one (Sending a Pull Request), but you should also create the package using an interactive script ran in the repository root:

Terminal window
pnpm run package-generator

Add needed dependencies by running pnpm install in the repository root. To add a dependency to a specific package, use pnpm --filter <PACKAGE_NAME> add <LIBRARY> or update the package’s package.json and then run pnpm install from the repository root. If you’re making an adapter for a particular npm library (like @reatom/react for React), add the library as a peer dependency using pnpm --filter <PACKAGE_NAME> add --save-peer <LIBRARY>.

Coding guide

  • bug fixes should also add tests that reproduce the addressed bug
  • all new features should be tested and documented
  • use // @ts-ignore if you’re not sure why an error appears or you think it’s acceptable to suppress it temporarily. Use // @ts-expect-error if you’re certain the error is a false positive and you want TypeScript to expect it.

Commit messages

Commit messages should follow the Conventional Commits specification:

<type>[optional scope]: <description>

Allowed <type>

  • chore: any repository maintainance changes
  • feat: code change that adds a new feature
  • fix: bug fix
  • perf: code change that improves performance
  • refactor: code change that is neither a feature addition nor a bug fix nor a performance improvement
  • docs: documentation only changes
  • ci: a change made to CI configurations and scripts
  • style: cosmetic code change
  • test: change that only adds or corrects tests
  • revert: change that reverts previous commits

Allowed <scope>

Package directory name. Eg: /packages/react is scoped as react.

<description> rules

  • should be written in English
  • should be in imperative mood (like change instead changed or changes)
  • should not be capitalized
  • should not have period (.) at the end

Commit message examples

docs: fix typo in react
fix(core): add check for atoms with equal ids