You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+32-22Lines changed: 32 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Contributing<!-- omit in TOC -->
1
+
# Contributing
2
2
3
3
First of all, thank you for contributing to Meilisearch! The goal of this document is to provide everything you need to know in order to contribute to Meilisearch and its different integrations.
4
4
@@ -26,13 +26,13 @@ First of all, thank you for contributing to Meilisearch! The goal of this docume
26
26
27
27
## Development Workflow
28
28
29
-
### Setup<!-- omit in TOC -->
29
+
### Setup
30
30
31
31
```bash
32
32
yarn --dev
33
33
```
34
34
35
-
### Tests and Linter<!-- omit in TOC -->
35
+
### Tests and Linter
36
36
37
37
Each PR should pass the tests and the linter to be accepted.
38
38
@@ -59,7 +59,26 @@ Example:
59
59
turbo run test --filter=@meilisearch/instant-meilisearch
60
60
```
61
61
62
-
### Playgrounds <!-- omit in TOC -->
62
+
### Versioning with Changesets
63
+
64
+
⚠️ This step is crucial to merge a PR containing impacting changes for the package(s)! ⚠️
65
+
66
+
💡 Example of PR that does [NOT require a changeset](https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md#not-every-change-requires-a-changeset): updating the README.md or changes in tests files.
67
+
68
+
We use [changesets](https://github.com/Noviny/changesets) to do versioning.
69
+
70
+
For each PR that changes something in the package(s), you need to [add a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) by running `yarn changeset`.
71
+
72
+
This command will run questions:
73
+
- select the packages concerned by the PR changes
74
+
- indicate how these changes impact the version (press enter to skip the question if you don't want to upgrade the `major` or the `minor`)
75
+
- Write a brief summary of the changes
76
+
77
+
Modification will be applied to the `.changesets` directory. These changes should added to your PR.
78
+
79
+
Before the release, the new files in `.changesets` will be automatically removed. See our [release process](release-on-github-and-npm).
All changes must be made in a branch and submitted as PR.
110
129
We do not enforce any branch naming style, but please use something descriptive of your changes.
111
130
112
-
### Git Commits<!-- omit in TOC -->
131
+
### Git Commits
113
132
114
133
As minimal requirements, your commit message should:
115
134
- be capitalized
@@ -119,19 +138,7 @@ As minimal requirements, your commit message should:
119
138
120
139
We don't follow any other convention, but if you want to use one, we recommend [this one](https://chris.beams.io/posts/git-commit/).
121
140
122
-
### Changesets <!-- omit in TOC -->
123
-
124
-
We use [changesets](https://github.com/Noviny/changesets) to do versioning. What that means is that you need to [add a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) by running `yarn changeset`. The changeset you create contains which packages should be bumped, their associated semver type and the changelogs.
125
-
126
-
127
-
> avant chaque release, les fichiers sont supprimés (voir process qui suit)
128
-
129
-
These changesets are added to the `.changesets` directory at the root of the repository, and should be added to your PR.
130
-
Before a release, these files are removed (see [process](#release-on-github-and-npm)).
131
-
132
-
Some changes do [not require a changeset](https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md#not-every-change-requires-a-changeset). For example changes that does not impact the packages, e.g. : Updating the README.md or changes in tests files.
133
-
134
-
### GitHub Pull Requests <!-- omit in TOC -->
141
+
### GitHub Pull Requests
135
142
136
143
Some notes on GitHub PRs:
137
144
@@ -145,7 +152,7 @@ Some notes on GitHub PRs:
145
152
146
153
Meilisearch tools follow the [Semantic Versioning Convention](https://semver.org/).
147
154
148
-
### Automation to Rebase and Merge the PRs<!-- omit in TOC -->
155
+
### Automation to Rebase and Merge the PRs
149
156
150
157
This project integrates a bot that helps us manage pull requests merging.<br>
151
158
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/resources/bors.md)._
@@ -154,15 +161,18 @@ _[Read more about this](https://github.com/meilisearch/integration-guides/blob/m
154
161
155
162
This repository uses the [changesets](https://github.com/Noviny/changesets) library to handle the version updates and the publishing on GitHub and `npm`.
156
163
157
-
When PRs are merged on `main`, they trigger the [`release` CI](./.github/workflows/publish.yml). This CI creates a PR titled `Version Packages` containing all the version updates and changelogs of the impacted packages. The PR updates the versions and the changelogs based on the `changesets` that were previously pushed on main (see [changeset section](#changesets)).
164
+
⚠️ Each PR merged on `main` involving a change in the package(s) should contain modifications in the `.changeset` folder. See [changeset section](#versioning-with-changesets).
158
165
159
-
To release on GitHub and `npm` you must merge the `Version packages` PR. This will trigger the publishing action and create the GitHub and `npm` releases for all affected packages.
166
+
Each merge on `main` triggers the [`release` CI](./.github/workflows/publish.yml) generating a PR titled `Version Packages`. This PR updates the versions and contains changelogs of the impacted packages based on the `yarn changesets` commands you ran on each PR.
167
+
168
+
To release on GitHub and `npm` you must merge this `Version packages` PR. This will trigger the publishing action and create the GitHub and `npm` releases for all affected packages.
160
169
161
170
See more in depth explaination on [versioning](https://github.com/changesets/changesets/blob/main/docs/command-line-options.md#version), [publishing](https://github.com/changesets/changesets/blob/main/docs/command-line-options.md#publish) and the [changesets github-action](https://github.com/changesets/action).
162
171
163
172
If you merged a beta branch, that was released, into main, you were probably in the `changesets`[pre-release](https://github.com/changesets/changesets/blob/main/docs/prereleases.md) mode (see section on [releasing a beta](#release-a-beta-version)). If the `pre.json` file is present in the `.changesets` folder, you need to exit that mode. This is possible by running `yarn changeset pre exit`. Once done, create a PR with the changes and merge it to main.
164
173
165
174
#### Codesandbox update
175
+
166
176
Once the version is available on npm, please update the instant-meilisearch version used in the different Code-Sandboxes we provide:
0 commit comments