Skip to content

Latest commit

 

History

History
139 lines (88 loc) · 3.6 KB

File metadata and controls

139 lines (88 loc) · 3.6 KB

Contributing

Getting Started

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

First, create a fork of the modernweb-dev/rocket repository using the Fork button on GitHub.

Clone the upstream repository onto your computer.

git clone git@github.com:modernweb-dev/rocket.git

Once cloning is complete, change directory to the repository.

cd rocket

Now add your fork as a remote (replacing YOUR_USERNAME with your GitHub username).

git remote add fork git@github.com:<YOUR_USERNAME>/rocket.git

Create a new local branch.

git checkout -b my-awesome-fix

Preparing Your Local Environment for Development

Rocket requires Node.js 22 or newer. After cloning the repository, install the locked dependencies.

npm ci

To run the documentation site locally:

npm start

Making Your Changes

Make your changes in a focused branch. For code changes, keep tests close to the source file they cover.

Type Checking

Run the TypeScript build before opening a pull request:

npm run types

Running Tests

Run the Node test suite from the repository root:

npm test

Linting and Formatting

Check linting and formatting before opening a pull request:

npm run lint

To apply automatic fixes:

npm run format

Creating a Changeset

If you made changes for which you want to trigger a release, you need to create a changeset. This documents your intent to release, and allows you to specify a message that will be put into the changelog.

More information on changesets

Run

npm run changeset

Use the menu to select the package and release type. For the release type, we follow Semantic Versioning, so please take a look if you're unfamiliar.

In short:

  • A documentation change or similar chore usually does not require a release
  • A bugfix requires a patch
  • A new feature (feat) requires a minor
  • A breaking change requires a major

Exceptions:

  • For alpha (<1.0.0), bugfixes and feats are both patches, and breaking changes are allowed as minors.
  • For release-candidate and other special cases, other rules may follow.

Dependency and Lockfile Policy

Use npm and keep package-lock.json committed. When package.json changes, update the lockfile in the same pull request. Do not switch package managers or add a second lockfile.

Dependency changes should be intentional and explained in the pull request. Prefer existing dependencies and platform APIs before adding new runtime dependencies. Pull requests that change dependencies are expected to pass dependency review in GitHub Actions.

Security Reports

Please report suspected vulnerabilities through the process in SECURITY.md. Do not open a public issue for an active vulnerability.

Committing Your Changes

Commit messages must follow the conventional commit format using a short lowercase scope for the area you changed. For example:

fix(hydration): handle idle callback fallback

Create a Pull Request

Now it's time to push your branch that contains your committed changes to your fork.

git push -u fork my-awesome-fix

After a successful push, if you visit your fork on GitHub, you should see a button that will allow you to create a Pull Request from your forked branch, to our main branch.