UNPKG

6.18 kBMarkdownView Raw
1## Contributing in @webpack-contrib
2
3We'd always love contributions to further improve the webpack / webpack-contrib ecosystem!
4Here are the guidelines we'd like you to follow:
5
6* [Questions and Problems](#question)
7* [Issues and Bugs](#issue)
8* [Feature Requests](#feature)
9* [Pull Request Submission Guidelines](#submit-pr)
10* [Commit Message Conventions](#commit)
11
12### <a name="question"></a> Got a Question or Problem?
13
14Please submit support requests and questions to StackOverflow using the tag [[webpack]](http://stackoverflow.com/tags/webpack).
15StackOverflow is better suited for this kind of support though you may also inquire in [Webpack Gitter](https://gitter.im/webpack/webpack).
16The issue tracker is for bug reports and feature discussions.
17
18### <a name="issue"></a> Found an Issue or Bug?
19
20Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
21
22We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we ask that you to provide a minimal reproduction scenario (github repo or failing test case). Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like:
23
24- version of Webpack used
25- version of the loader / plugin you are creating a bug report for
26- the use-case that fails
27
28A minimal reproduce scenario allows us to quickly confirm a bug (or point out config problems) as well as confirm that we are fixing the right problem.
29
30We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
31
32Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
33
34### <a name="feature"></a> Feature Requests?
35
36You can *request* a new feature by creating an issue on Github.
37
38If you would like to *implement* a new feature, please submit an issue with a proposal for your work `first`, to be sure that particular makes sense for the project.
39
40### <a name="submit-pr"></a> Pull Request Submission Guidelines
41
42Before you submit your Pull Request (PR) consider the following guidelines:
43
44- Search Github for an open or closed PR that relates to your submission. You don't want to duplicate effort.
45- Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages.
46- Fill out our `Pull Request Template`. Your pull request will not be considered if it is ignored.
47- Please sign the `Contributor License Agreement (CLA)` when a pull request is opened. We cannot accept your pull request without this. Make sure you sign with the primary email address associated with your local / github account.
48
49### <a name="commit"></a> Webpack Contrib Commit Conventions
50
51Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
52format that includes a **type**, a **scope** and a **subject**:
53
54```
55<type>(<scope>): <subject>
56<BLANK LINE>
57<body>
58<BLANK LINE>
59<footer>
60```
61
62The **header** is mandatory and the **scope** of the header is optional.
63
64Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
65to read on GitHub as well as in various git tools.
66
67The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
68
69Examples:
70```
71docs(readme): update install instructions
72```
73```
74fix: refer to the `entrypoint` instead of the first `module`
75```
76
77#### Revert
78If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
79In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
80
81#### Type
82Must be one of the following:
83
84* **build**: Changes that affect the build system or external dependencies (example scopes: babel, npm)
85* **chore**: Changes that fall outside of build / docs that do not effect source code (example scopes: package, defaults)
86* **ci**: Changes to our CI configuration files and scripts (example scopes: circleci, travis)
87* **docs**: Documentation only changes (example scopes: readme, changelog)
88* **feat**: A new feature
89* **fix**: A bug fix
90* **perf**: A code change that improves performance
91* **refactor**: A code change that neither fixes a bug nor adds a feature
92* **revert**: Used when reverting a committed change
93* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
94* **test**: Addition of or updates to Jest tests
95
96#### Scope
97The scope is subjective & depends on the `type` see above. A good example would be a change to a particular class / module.
98
99#### Subject
100The subject contains a succinct description of the change:
101
102* use the imperative, present tense: "change" not "changed" nor "changes"
103* don't capitalize the first letter
104* no dot (.) at the end
105
106#### Body
107Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
108The body should include the motivation for the change and contrast this with previous behavior.
109
110#### Footer
111The footer should contain any information about **Breaking Changes** and is also the place to
112reference GitHub issues that this commit **Closes**.
113
114**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
115
116Example
117
118```
119BREAKING CHANGE: Updates to `Chunk.mapModules`.
120
121This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
122Migration: see webpack/webpack#5225
123
124```