Skip to content

Commit 8e9c183

Browse files
chore: update defaults and refactor tests (#230)
BREAKING CHANGE: minimum require `Node.js` version is `10.13`, minimum require `webpack` version is `4`
1 parent 0c3a597 commit 8e9c183

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+20419
-315
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# editorconfig.org
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/coverage
2+
/dist
3+
/node_modules
4+
/test/fixtures

.eslintrc.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@webpack-contrib/eslint-config-webpack', 'prettier'],
4+
};

.gitattributes

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
* text=auto
1+
* text=auto
2+
bin/* eol=lf
3+
yarn.lock -diff
4+
package-lock.json -diff

.github/CODEOWNERS

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# These are the default owners for everything in
2+
# webpack-contrib
3+
@webpack-contrib/org-maintainers
4+
5+
# Add repository specific users / groups
6+
# below here for libs that are not maintained by the org.

.github/CONTRIBUTING.md

+160
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Contributing in @webpack-contrib
2+
3+
We'd always love contributions to further improve the webpack / webpack-contrib ecosystem!
4+
Here 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+
14+
Please submit support requests and questions to StackOverflow using the tag [[webpack]](http://stackoverflow.com/tags/webpack).
15+
StackOverflow is better suited for this kind of support though you may also inquire in [Webpack Gitter](https://gitter.im/webpack/webpack).
16+
The issue tracker is for bug reports and feature discussions.
17+
18+
## <a name="issue"></a> Found an Issue or Bug?
19+
20+
Before 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+
22+
We 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+
28+
A 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+
30+
We 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+
32+
Unfortunately, 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+
36+
You can _request_ a new feature by creating an issue on Github.
37+
38+
If 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+
42+
Before 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+
51+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
52+
format 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+
62+
The **header** is mandatory and the **scope** of the header is optional.
63+
64+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
65+
to read on GitHub as well as in various git tools.
66+
67+
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
68+
69+
Examples:
70+
71+
```
72+
docs(readme): update install instructions
73+
```
74+
75+
```
76+
fix: refer to the `entrypoint` instead of the first `module`
77+
```
78+
79+
### Revert
80+
81+
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit.
82+
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
83+
84+
### Type
85+
86+
Must be one of the following:
87+
88+
- **build**: Changes that affect the build system or external dependencies (example scopes: babel, npm)
89+
- **chore**: Changes that fall outside of build / docs that do not effect source code (example scopes: package, defaults)
90+
- **ci**: Changes to our CI configuration files and scripts (example scopes: circleci, travis)
91+
- **docs**: Documentation only changes (example scopes: readme, changelog)
92+
- **feat**: A new feature
93+
- **fix**: A bug fix
94+
- **perf**: A code change that improves performance
95+
- **refactor**: A code change that neither fixes a bug nor adds a feature
96+
- **revert**: Used when reverting a committed change
97+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
98+
- **test**: Addition of or updates to Jest tests
99+
100+
### Scope
101+
102+
The scope is subjective & depends on the `type` see above. A good example would be a change to a particular class / module.
103+
104+
### Subject
105+
106+
The subject contains a succinct description of the change:
107+
108+
- use the imperative, present tense: "change" not "changed" nor "changes"
109+
- don't capitalize the first letter
110+
- no dot (.) at the end
111+
112+
### Body
113+
114+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
115+
The body should include the motivation for the change and contrast this with previous behavior.
116+
117+
### Footer
118+
119+
The footer should contain any information about **Breaking Changes** and is also the place to
120+
reference GitHub issues that this commit **Closes**.
121+
122+
**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.
123+
124+
Example
125+
126+
```
127+
BREAKING CHANGE: Updates to `Chunk.mapModules`.
128+
129+
This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
130+
Migration: see webpack/webpack#5225
131+
132+
```
133+
134+
## Testing Your Pull Request
135+
136+
You may have the need to test your changes in a real-world project or dependent
137+
module. Thankfully, Github provides a means to do this. Add a dependency to the
138+
`package.json` for such a project as follows:
139+
140+
```json
141+
{
142+
"devDependencies": {
143+
"stylus-loader": "webpack-contrib/stylus-loader#{id}/head"
144+
}
145+
}
146+
```
147+
148+
Where `{id}` is the # ID of your Pull Request.
149+
150+
## Contributor License Agreement
151+
152+
When submitting your contribution, a CLA (Contributor License Agreement) bot will come by to verify that you signed the [CLA](https://cla.js.foundation/webpack-contrib/stylus-loader).
153+
If it is your first time, it will link you to the right place to sign it.
154+
However, if you have committed your contributions using an email that is not the same as your email used on GitHub, the CLA bot can't accept your contribution.
155+
156+
Run `git config user.email` to see your Git email, and verify it with [your GitHub email](https://github.com/settings/emails).
157+
158+
## Thanks
159+
160+
For your interest, time, understanding, and for following this simple guide.

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
open_collective: webpack

.github/ISSUE_TEMPLATE.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
👉🏽 Need support, advice, or help? Don't open an issue!
3+
Head to StackOverflow or https://gitter.im/webpack/webpack.
4+
5+
Hey there!
6+
7+
You arrived at this template because you felt none of the other options
8+
matched the kind of issue you'd like to report. Please use this opportunity to
9+
tell us about your particular type of issue so we can try to accomodate
10+
similar issues in the future.
11+
12+
PLEASE do note, if you're using this to report an issue already covered by the
13+
existing template types, your issue may be closed as invalid. Our issue
14+
templates contain fields that help us help you, and without that important
15+
info, we might as well be ice-skating uphill, carrying a wooly mammoth.
16+
-->

.github/ISSUE_TEMPLATE/BUG.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: Something went awry and you'd like to tell us about it.
4+
---
5+
6+
<!--
7+
Issues are so 🔥
8+
9+
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
10+
of Github will appear and pile-drive the close button from a great height
11+
while making animal noises.
12+
13+
👉🏽 Need support, advice, or help? Don't open an issue!
14+
Head to StackOverflow or https://gitter.im/webpack/webpack.
15+
-->
16+
17+
- Operating System:
18+
- Node Version:
19+
- NPM Version:
20+
- webpack Version:
21+
- stylus-loader Version:
22+
23+
### Expected Behavior
24+
25+
<!-- Remove this section if not reporting a bug or modification request. -->
26+
27+
### Actual Behavior
28+
29+
<!-- Remove this section if not reporting a bug or modification request. -->
30+
31+
### Code
32+
33+
```js
34+
// webpack.config.js
35+
// If your code blocks are over 20 lines, please paste a link to a gist
36+
// (https://gist.github.com).
37+
```
38+
39+
```js
40+
// additional code, HEY YO remove this block if you don't need it
41+
```
42+
43+
### How Do We Reproduce?
44+
45+
<!--
46+
Remove this section if not reporting a bug.
47+
48+
If your webpack config is over 50 lines long, please provide a URL to a repo
49+
for your beefy 🍖 app that we can use to reproduce.
50+
-->

.github/ISSUE_TEMPLATE/DOCS.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: 📚 Documentation
3+
about: Are the docs lacking or missing something? Do they need some new 🔥 hotness? Tell us here.
4+
---
5+
6+
<!--
7+
Issues are so 🔥
8+
9+
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
10+
of Github will appear and pile-drive the close button from a great height
11+
while making animal noises.
12+
13+
👉🏽 Need support, advice, or help? Don't open an issue!
14+
Head to StackOverflow or https://gitter.im/webpack/webpack.
15+
-->
16+
17+
Documentation Is:
18+
19+
<!-- Please place an x (no spaces!) in all [ ] that apply -->
20+
21+
- [ ] Missing
22+
- [ ] Needed
23+
- [ ] Confusing
24+
- [ ] Not Sure?
25+
26+
### Please Explain in Detail...
27+
28+
### Your Proposal for Changes

.github/ISSUE_TEMPLATE/FEATURE.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: ✨ Feature Request
3+
about: Suggest an idea for this project
4+
---
5+
6+
<!--
7+
Issues are so 🔥
8+
9+
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
10+
of Github will appear and pile-drive the close button from a great height
11+
while making animal noises.
12+
13+
👉🏽 Need support, advice, or help? Don't open an issue!
14+
Head to StackOverflow or https://gitter.im/webpack/webpack.
15+
-->
16+
17+
- Operating System:
18+
- Node Version:
19+
- NPM Version:
20+
- webpack Version:
21+
- stylus-loader Version:
22+
23+
### Feature Proposal
24+
25+
### Feature Use Case
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: 🔧 Modification Request
3+
about: Would you like something work differently? Have an alternative approach? This is the template for you.
4+
---
5+
6+
<!--
7+
Issues are so 🔥
8+
9+
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
10+
of Github will appear and pile-drive the close button from a great height
11+
while making animal noises.
12+
13+
👉🏽 Need support, advice, or help? Don't open an issue!
14+
Head to StackOverflow or https://gitter.im/webpack/webpack.
15+
-->
16+
17+
- Operating System:
18+
- Node Version:
19+
- NPM Version:
20+
- webpack Version:
21+
- stylus-loader Version:
22+
23+
### Expected Behavior / Situation
24+
25+
### Actual Behavior / Situation
26+
27+
### Modification Proposal

.github/ISSUE_TEMPLATE/SUPPORT.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: 🆘 Support, Help, and Advice
3+
about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to StackOverflow or https://gitter.im/webpack/webpack.
4+
---
5+
6+
Hey there! If you need support, help, or advice then this is not the place to ask.
7+
Please visit [StackOverflow](https://stackoverflow.com/questions/tagged/webpack)
8+
or [the Webpack Gitter](https://gitter.im/webpack/webpack) instead.

.github/PULL_REQUEST_TEMPLATE.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!--
2+
HOLY CRAP a Pull Request. We ❤️ those!
3+
4+
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
5+
of Github will appear and pile-drive the close button from a great height
6+
while making animal noises.
7+
8+
Please place an x (no spaces!) in all [ ] that apply
9+
-->
10+
11+
This PR contains a:
12+
13+
- [ ] **bugfix**
14+
- [ ] new **feature**
15+
- [ ] **code refactor**
16+
- [ ] **test update** <!-- if bug or feature is checked, this should be too -->
17+
- [ ] **typo fix**
18+
- [ ] **metadata update**
19+
20+
### Motivation / Use-Case
21+
22+
<!--
23+
Please explain the motivation or use-case for your change.
24+
What existing problem does the PR solve?
25+
If this PR addresses an issue, please link to the issue.
26+
-->
27+
28+
### Breaking Changes
29+
30+
<!--
31+
If this PR introduces a breaking change, please describe the impact and a
32+
migration path for existing applications.
33+
-->
34+
35+
### Additional Info

0 commit comments

Comments
 (0)