Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit 687f422

Browse files
shellscapejoshwiens
authored andcommitted
refactor(defaults): update to latest webpack-defaults (#268)
BREAKING CHANGE: Enforces `engines` of `"node": ">=6.9.0 < 7.0.0 || >= 8.9.0`
1 parent f7f6d6c commit 687f422

27 files changed

+5893
-1676
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"useBuiltIns": true,
77
"targets": {
8-
"node": "4.3"
8+
"node": "6.9.0"
99
},
1010
"exclude": [
1111
"transform-async-to-generator",

.circleci/config.yml

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
unit_tests: &unit_tests
2+
steps:
3+
- checkout
4+
- restore_cache:
5+
key: dependency-cache-{{ checksum "package-lock.json" }}
6+
- run:
7+
name: NPM Rebuild
8+
command: npm install
9+
- run:
10+
name: Run unit tests.
11+
command: npm run ci:test
12+
canary_tests: &canary_tests
13+
steps:
14+
- checkout
15+
- restore_cache:
16+
key: dependency-cache-{{ checksum "package-lock.json" }}
17+
- run:
18+
name: NPM Rebuild
19+
command: npm install
20+
- run:
21+
name: Install Webpack Canary
22+
command: npm i --no-save webpack@next
23+
- run:
24+
name: Run unit tests.
25+
command: if [[ $(compver --name webpack --gte next --lt latest) < 1 ]] ; then printf "Next is older than Latest - Skipping Canary Suite"; else npm run ci:test ; fi
26+
27+
version: 2
28+
jobs:
29+
dependency_cache:
30+
docker:
31+
- image: webpackcontrib/circleci-node-base:latest
32+
steps:
33+
- checkout
34+
- restore_cache:
35+
key: dependency-cache-{{ checksum "package-lock.json" }}
36+
- run:
37+
name: Install Dependencies
38+
command: npm install
39+
- save_cache:
40+
key: dependency-cache-{{ checksum "package-lock.json" }}
41+
paths:
42+
- ./node_modules
43+
44+
node8-latest:
45+
docker:
46+
- image: webpackcontrib/circleci-node8:latest
47+
steps:
48+
- checkout
49+
- restore_cache:
50+
key: dependency-cache-{{ checksum "package-lock.json" }}
51+
- run:
52+
name: NPM Rebuild
53+
command: npm install
54+
- run:
55+
name: Run unit tests.
56+
command: npm run ci:coverage
57+
- run:
58+
name: Submit coverage data to codecov.
59+
command: bash <(curl -s https://codecov.io/bash)
60+
when: on_success
61+
node6-latest:
62+
docker:
63+
- image: webpackcontrib/circleci-node6:latest
64+
<<: *unit_tests
65+
node9-latest:
66+
docker:
67+
- image: webpackcontrib/circleci-node9:latest
68+
<<: *unit_tests
69+
node8-canary:
70+
docker:
71+
- image: webpackcontrib/circleci-node8:latest
72+
<<: *canary_tests
73+
analysis:
74+
docker:
75+
- image: webpackcontrib/circleci-node-base:latest
76+
steps:
77+
- checkout
78+
- restore_cache:
79+
key: dependency-cache-{{ checksum "package-lock.json" }}
80+
- run:
81+
name: NPM Rebuild
82+
command: npm install
83+
- run:
84+
name: Run linting.
85+
command: npm run lint
86+
- run:
87+
name: Run NSP Security Check.
88+
command: npm run security
89+
- run:
90+
name: Validate Commit Messages
91+
command: npm run ci:lint:commits
92+
publish:
93+
docker:
94+
- image: webpackcontrib/circleci-node-base:latest
95+
steps:
96+
- checkout
97+
- restore_cache:
98+
key: dependency-cache-{{ checksum "package-lock.json" }}
99+
- run:
100+
name: NPM Rebuild
101+
command: npm install
102+
# - run:
103+
# name: Validate Commit Messages
104+
# command: npm run release:validate
105+
- run:
106+
name: Publish to NPM
107+
command: printf "noop running conventional-github-releaser"
108+
109+
version: 2.0
110+
workflows:
111+
version: 2
112+
validate-publish:
113+
jobs:
114+
- dependency_cache
115+
- node6-latest:
116+
requires:
117+
- dependency_cache
118+
filters:
119+
tags:
120+
only: /.*/
121+
- analysis:
122+
requires:
123+
- dependency_cache
124+
filters:
125+
tags:
126+
only: /.*/
127+
- node8-latest:
128+
requires:
129+
- analysis
130+
- node6-latest
131+
filters:
132+
tags:
133+
only: /.*/
134+
- node9-latest:
135+
requires:
136+
- analysis
137+
- node6-latest
138+
filters:
139+
tags:
140+
only: /.*/
141+
- node8-canary:
142+
requires:
143+
- analysis
144+
- node6-latest
145+
filters:
146+
tags:
147+
only: /.*/
148+
- publish:
149+
requires:
150+
- node8-latest
151+
- node8-canary
152+
- node9-latest
153+
filters:
154+
branches:
155+
only:
156+
- master

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ end_of_line = lf
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11-
[.md]
11+
[*.md]
1212
insert_final_newline = false
1313
trim_trailing_whitespace = false

.eslintrc

-6
This file was deleted.

.eslintrc.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
root: true,
3+
plugins: ['prettier'],
4+
extends: ['@webpack-contrib/eslint-config-webpack'],
5+
rules: {
6+
'prettier/prettier': [
7+
'error',
8+
{ singleQuote: true, trailingComma: 'es5', arrowParens: 'always' },
9+
],
10+
},
11+
};

.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

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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+
docs(readme): update install instructions
72+
```
73+
```
74+
fix: refer to the `entrypoint` instead of the first `module`
75+
```
76+
77+
#### Revert
78+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
79+
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
80+
81+
#### Type
82+
Must 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
97+
The scope is subjective & depends on the `type` see above. A good example would be a change to a particular class / module.
98+
99+
#### Subject
100+
The 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
107+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
108+
The body should include the motivation for the change and contrast this with previous behavior.
109+
110+
#### Footer
111+
The footer should contain any information about **Breaking Changes** and is also the place to
112+
reference 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+
116+
Example
117+
118+
```
119+
BREAKING CHANGE: Updates to `Chunk.mapModules`.
120+
121+
This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
122+
Migration: see webpack/webpack#5225
123+
124+
```

.github/ISSUE_TEMPLATE.md

+62-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,65 @@
11
<!--
2-
1. Check the version of package you are using. If it's not the newest version, update and try again (see changelog while updating!).
3-
2. If the issue is still there, write a minimal project showing the problem and expected output.
4-
3. Link to the project and mention Node version and OS in your report.
2+
Issues are so 🔥
53
6-
**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**
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+
👉🏽 Need support, advice, or help? Don't open an issue!
9+
Head to StackOverflow or https://gitter.im/webpack/webpack.
10+
-->
11+
12+
* Operating System:
13+
* Node Version:
14+
* NPM Version:
15+
* webpack Version:
16+
* file-loader Version:
17+
18+
<!-- Please place an x (no spaces!) in all [ ] that apply -->
19+
20+
This issue is for a:
21+
22+
- [ ] **bug**
23+
- [ ] **feature** request
24+
- [ ] **modification** request
25+
26+
### Code
27+
28+
##### CLI Command
29+
30+
```bash
31+
# paste the CLI command you're using. if this isn't applicable, it's safe to remove.
32+
$ {the command}
33+
```
34+
35+
##### webpack.config.js
36+
37+
```js
38+
// If your bitchin' code blocks are over 20 lines, please paste a link to a gist
39+
// (https://gist.github.com).
40+
```
41+
42+
```js
43+
// additional code, HEY YO remove this block if you don't need it
44+
```
45+
46+
### Expected Behavior
47+
48+
<!-- Remove this section if not reporting a bug or modification request. -->
49+
50+
### Actual Behavior
51+
52+
<!-- Remove this section if not reporting a bug or modification request. -->
53+
54+
### How Do We Reproduce?
55+
56+
<!--
57+
Remove this section if not reporting a bug.
58+
59+
If your webpack config is over 50 lines long, please provide a URL to a repo
60+
for your beefy 🍖 app that we can use to reproduce.
761
-->
62+
63+
### New Feature Use Case
64+
65+
<!-- Remove this section if not requesting a feature -->

0 commit comments

Comments
 (0)