Skip to content

Commit e037a5f

Browse files
committed
Merge branch 'master' into marcusdarmstrong-external-module-fix
2 parents 058a5f4 + 6f90257 commit e037a5f

File tree

1,116 files changed

+20935
-12255
lines changed

Some content is hidden

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

1,116 files changed

+20935
-12255
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ root = true
22

33
[*]
44
indent_style = tab
5-
indent_size = 4
5+
indent_size = 2
66
charset = utf-8
77
trim_trailing_whitespace = true
88
insert_final_newline = true
9-
max_line_length = 233
9+
max_line_length = 80
1010

1111
[.prettierrc]
1212
indent_style = space

.eslintrc.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
root: true,
3-
plugins: ["prettier", "node"],
3+
plugins: ["prettier", "node", "jest"],
44
extends: ["eslint:recommended", "plugin:node/recommended", "plugin:prettier/recommended"],
55
env: {
66
node: true,
@@ -13,7 +13,6 @@ module.exports = {
1313
"prettier/prettier": "error",
1414
"no-undef": "error",
1515
"no-extra-semi": "error",
16-
"semi": "error",
1716
"no-template-curly-in-string": "error",
1817
"no-caller": "error",
1918
"no-control-regex": "off",
@@ -30,7 +29,20 @@ module.exports = {
3029
"no-loop-func": "warn",
3130
"indent": "off",
3231
"no-console": "off",
33-
"valid-jsdoc": "error",
32+
"valid-jsdoc": ["error", {
33+
"prefer": {
34+
"return": "returns",
35+
"memberof": "DONTUSE",
36+
"class": "DONTUSE",
37+
"inheritdoc": "DONTUSE",
38+
"description": "DONTUSE",
39+
"readonly": "DONTUSE"
40+
},
41+
"preferType": {
42+
"*": "any"
43+
},
44+
"requireReturnType": true
45+
}],
3446
"node/no-unsupported-features": "error",
3547
"node/no-deprecated-api": "error",
3648
"node/no-missing-import": "error",
@@ -56,7 +68,7 @@ module.exports = {
5668
{
5769
files: ["test/**/*.js"],
5870
env: {
59-
mocha: true,
71+
"jest/globals": true
6072
}
6173
}
6274
]

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
---
5+
6+
<!-- Please don't delete this template because we'll close your issue -->
7+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
8+
9+
# Bug report
10+
11+
<!-- Please ask questions on StackOverflow or the webpack Gitter. -->
12+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
13+
<!-- https://gitter.im/webpack/webpack -->
14+
<!-- Issues which contain questions or support requests will be closed. -->
15+
16+
**What is the current behavior?**
17+
18+
19+
**If the current behavior is a bug, please provide the steps to reproduce.**
20+
21+
22+
<!-- A great way to do this is to provide your configuration via a GitHub repository -->
23+
<!-- The most helpful is a minimal reproduction with instructions on how to reproduce -->
24+
<!-- Repositories with too many files or large `webpack.config.js` files are not suitable -->
25+
<!-- Please only add small code snippets directly into this issue -->
26+
<!-- https://gist.github.com is a good place for longer code snippets -->
27+
<!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead -->
28+
29+
**What is the expected behavior?**
30+
31+
32+
<!-- "It should work" is not a helpful explanation -->
33+
<!-- Explain exactly how it should behave -->
34+
35+
**Other relevant information:**
36+
webpack version:
37+
Node.js version:
38+
Operating System:
39+
Additional tools:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
<!-- Please don't delete this template or we'll close your issue -->
8+
9+
## Feature request
10+
11+
<!-- Issues which contain questions or support requests will be closed. -->
12+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
13+
<!-- Check if this feature need to be implemented in a plugin or loader instead -->
14+
<!-- If yes: file the issue on the plugin/loader repo -->
15+
<!-- Features related to the development server should be filed on this repo instead -->
16+
17+
**What is the expected behavior?**
18+
19+
20+
**What is motivation or use case for adding/changing the behavior?**
21+
22+
23+
**How should this be implemented in your opinion?**
24+
25+
26+
**Are you willing to work on this yourself?**
27+
yes

.github/ISSUE_TEMPLATE/Other.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: Other
3+
about: Something else
4+
5+
---
6+
7+
<!-- Bug reports and Feature requests must use other templates, or will be closed -->
8+
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). -->
9+
<!-- Issues which contain questions or support requests will be closed. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
2+
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
3+
<!-- Try to link to an open issue for more information. -->
4+
5+
6+
<!-- In addition to that please answer these questions: -->
27

38
**What kind of change does this PR introduce?**
49

@@ -8,17 +13,11 @@
813

914
<!-- Note that we won't merge your changes if you don't add tests -->
1015

11-
**If relevant, link to documentation update:**
12-
13-
<!-- Link PR from webpack/webpack.js.org here, or N/A -->
14-
15-
**Summary**
16-
17-
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
18-
<!-- Try to link to an open issue for more information. -->
19-
2016
**Does this PR introduce a breaking change?**
2117

2218
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->
2319

24-
**Other information**
20+
**What needs to be documented once your changes are merged?**
21+
22+
<!-- List all the information that needs to be added to the documentation after merge -->
23+
<!-- When your changes are merged you will be asked to contribute this to the documentation -->

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
*.log
1111
.idea
1212
.vscode
13+
.eslintcache
1314
package-lock.json

.prettierignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Ignore all paths.
2+
**/*.*
3+
4+
# Enable prettier for the following paths.
5+
!setup/**/*.js
6+
!lib/**/*.js
7+
!bin/*.js
8+
!hot/*.js
9+
!buildin/*.js
10+
!benchmark/**/*.js
11+
!test/*.js
12+
!test/**/webpack.config.js
13+
!examples/**/webpack.config.js
14+
!schemas/**/*.js
15+
!declarations.d.ts

.travis.yml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,56 @@ branches:
99

1010
cache:
1111
yarn: true
12+
directories:
13+
- ".jest-cache"
14+
- ".eslintcache"
15+
16+
stages:
17+
- basic
18+
- advanced
19+
- versions
1220

1321
matrix:
1422
include:
1523
- os: linux
16-
node_js: "8"
17-
env: NO_WATCH_TESTS=1 JOB_PART=lint
24+
node_js: "10"
25+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=basic
26+
stage: basic
1827
- os: linux
19-
node_js: "8"
20-
env: NO_WATCH_TESTS=1 JOB_PART=integration
28+
node_js: "10"
29+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=lint-unit
30+
stage: advanced
31+
- os: linux
32+
node_js: "10"
33+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
34+
stage: advanced
35+
- os: osx
36+
node_js: "10"
37+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
38+
stage: versions
2139
- os: linux
2240
node_js: "8"
23-
env: NO_WATCH_TESTS=1 JOB_PART=unit
41+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
42+
stage: versions
2443
- os: linux
2544
node_js: "6"
26-
env: NO_WATCH_TESTS=1 JOB_PART=integration
27-
- os: osx
28-
node_js: "8"
29-
env: NO_WATCH_TESTS=1 JOB_PART=integration
45+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
46+
stage: versions
47+
fast_finish: true
3048
allow_failures:
3149
- os: osx
32-
fast_finish: true
3350

3451
install:
3552
- yarn --frozen-lockfile
3653
- yarn link --frozen-lockfile || true
3754
- yarn link webpack --frozen-lockfile
3855

39-
script: npm run travis:$JOB_PART
56+
script: yarn travis:$JOB_PART
4057

4158
after_success:
4259
- cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose
43-
- bash <(curl -s https://codecov.io/bash) -F $JOB_PART
44-
- rm -rf ./coverage
60+
- bash <(curl -s https://codecov.io/bash) -F $JOB_PART -X gcov
61+
- rm -f .jest-cache/haste-map* .jest-cache/perf-cache*
4562

4663
notifications:
4764
slack:

CONTRIBUTING.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,23 @@ Most of the time, if webpack is not working correctly for you it is a simple con
1111

1212
If you are still having difficulty after looking over your configuration carefully, please post
1313
a question to [StackOverflow with the webpack tag](http://stackoverflow.com/tags/webpack). Questions
14-
that include your webpack.config.js and relevant files are more likely to receive responses.
14+
that include your webpack.config.js, relevant files, and the full error message are more likely to receive responses.
1515

1616
**If you have discovered a bug or have a feature suggestion, please [create an issue on GitHub](https://github.com/webpack/webpack/issues/new).**
1717

18+
Do you want to fix an issue? Look at the issues with a tag of [X5: work required (PR / Help Wanted)](https://github.com/webpack/webpack/labels/X5%3A%20work%20required%20%28PR%20%2F%20Help%20Wanted%29). Each issue should be tagged with a difficulty tag -
19+
20+
- D0: My First Commit (Contribution Difficulty)
21+
- D1: Easy (Contribution Difficulty)
22+
- D2: Medium (Contribution Difficulty)
23+
- D3: Hard (Contribution Difficulty)
24+
1825
## Contributing to the webpack ecosystem
1926

20-
If you have created your own loader/plugin please include it on the relevant
21-
documentation pages:
27+
If you have created your own loader/plugin please include it on the relevant documentation pages:
2228

23-
[List of loaders](https://webpack.js.org/loaders/) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#loaders)
24-
[List of plugins](https://webpack.js.org/plugins) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#webpack-plugins)
29+
- [List of loaders](https://webpack.js.org/loaders/) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#loaders)
30+
- [List of plugins](https://webpack.js.org/plugins) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#webpack-plugins)
2531

2632
## Setup
2733

@@ -43,7 +49,7 @@ Some things that will increase the chance that your pull request is accepted:
4349

4450
webpack is insanely feature rich and documentation is a huge time sink. We
4551
greatly appreciate any time spent fixing typos or clarifying sections in the
46-
documentation.
52+
documentation. [See a list of issues with the documentation tag.](https://github.com/webpack/webpack/labels/documentation)
4753

4854
## Discussions
4955

0 commit comments

Comments
 (0)