Skip to content

Commit

Permalink
docs(*): update CONTRIBUTING.md (#7165)
Browse files Browse the repository at this point in the history
* docs(*): update CONTRIBUTING.md

* docs(*): remove types as commit type
  • Loading branch information
manudeli committed Mar 25, 2024
1 parent c4729df commit b48d71e
Showing 1 changed file with 67 additions and 21 deletions.
88 changes: 67 additions & 21 deletions CONTRIBUTING.md
Expand Up @@ -17,21 +17,60 @@ If you are here to suggest a feature, first create an issue if it does not alrea
If you have been assigned to fix an issue or develop a new feature, please follow these steps to get started:

- Fork this repository.
- Install dependencies by running `$ pnpm install`.
- We use [pnpm](https://pnpm.io/) v8 for package management (run `corepack enable && corepack prepare` in case of pnpm-related issues).
- We use [nvm](https://github.com/nvm-sh/nvm) to manage node versions - please make sure to use the version mentioned in `.nvmrc` (run `nvm use`).
- Build all packages using `pnpm build:all`.
- Run development server using `pnpm run watch`.
- Install dependencies

```bash
pnpm install
```

- We use [pnpm](https://pnpm.io/) v8 for package management (run in case of pnpm-related issues).

```bash
corepack enable && corepack prepare
```

- We use [nvm](https://github.com/nvm-sh/nvm) to manage node versions - please make sure to use the version mentioned in `.nvmrc`

```bash
nvm use
```

- Build all packages.

```bash
pnpm build:all
```

- Run development server.

```bash
pnpm run watch
```

- Implement your changes and tests to files in the `src/` directory and corresponding test files.
- Document your changes in the appropriate doc page.
- Git stage your required changes and commit (see below commit guidelines).
- Submit PR for review.

### Running examples

- Make sure you've installed the dependencies by running `$ pnpm install` in the repo's root directory.
- If you want to run the example against your local changes, run `pnpm run watch` in the repo's root directory. Otherwise, it will be run against the latest TanStack Query release.
- Run `pnpm run dev` in the selected examples' directory.
- Make sure you've installed the dependencies in the repo's root directory.

```bash
pnpm install
```

- If you want to run the example against your local changes, run below in the repo's root directory. Otherwise, it will be run against the latest TanStack Query release.

```bash
pnpm run watch
```

- Run below in the selected examples' directory.

```bash
pnpm run dev
```

#### Note on `examples/react-native`

Expand All @@ -47,8 +86,17 @@ You can use Gitpod (An Online Open Source VS Code like IDE which is free for Ope

- clone the `TanStack/query` repo.
- install all the dependencies in `/` and `/docs`.
- run `npm start` in the root(`/`) to Auto-build files.
- run `npm run dev` in `/docs`.
- run below in the root(`/`) to Auto-build files.

```bash
npm start
```

- run below in `/docs`.

```bash
npm run dev
```

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/TanStack/query)

Expand All @@ -63,7 +111,7 @@ We have very precise rules over how our git commit messages can be formatted. Th
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:

```
```text
<type>(<scope>): <subject>
<BLANK LINE>
<body>
Expand All @@ -82,17 +130,15 @@ Must be one of the following:
- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
semicolons, etc.)
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing or correcting existing tests
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
generation
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation

### Scope

The scope could be anything specifying place of the commit change. For example `useQuery`, `useMutation` etc...
The scope could be anything specifying place of the commit change. For example `query-core`, `react-query` etc...

You can use `*` when the change affects more than a single scope.

Expand All @@ -118,11 +164,11 @@ The footer should contain any information about **Breaking Changes** and is also

Here is an example of the release type that will be done based on a commit messages:

| Commit message | Release type |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |
| Commit message | Release type |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| fix(pencil): stop graphite breaking when too much pressure applied | Patch Release |
| feat(pencil): add `graphiteWidth` option | ~~Minor~~ Feature Release |
| perf(pencil): remove `graphiteWidth` option<br/><br/>BREAKING CHANGE: The `graphiteWidth` option has been removed.<br/>The default graphite width of 10mm is always used for performance reasons. | ~~Major~~ Breaking Release |

### Revert

Expand Down

0 comments on commit b48d71e

Please sign in to comment.