Skip to content

Commit

Permalink
Merge branch 'master' into marcusdarmstrong-external-module-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Oct 17, 2018
2 parents 5853ec5 + 2228daf commit 7bc5c98
Show file tree
Hide file tree
Showing 517 changed files with 18,311 additions and 8,081 deletions.
4 changes: 0 additions & 4 deletions .editorconfig
Expand Up @@ -8,10 +8,6 @@ trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 80

[.prettierrc]
indent_style = space
indent_size = 2

[*.{yml,yaml,json}]
indent_style = space
indent_size = 2
Expand Down
51 changes: 31 additions & 20 deletions .eslintrc.js
@@ -1,7 +1,11 @@
module.exports = {
root: true,
plugins: ["prettier", "node", "jest"],
extends: ["eslint:recommended", "plugin:node/recommended", "plugin:prettier/recommended"],
extends: [
"eslint:recommended",
"plugin:node/recommended",
"plugin:prettier/recommended"
],
env: {
node: true,
es6: true
Expand All @@ -16,33 +20,37 @@ module.exports = {
"no-template-curly-in-string": "error",
"no-caller": "error",
"no-control-regex": "off",
"yoda": "error",
"eqeqeq": "error",
yoda: "error",
eqeqeq: "error",
"global-require": "off",
"brace-style": "error",
"brace-style": "off",
"eol-last": "error",
"no-extra-bind": "warn",
"no-process-exit": "warn",
"no-use-before-define": "off",
"no-unused-vars": ["error", { args: "none" }],
"no-unsafe-negation": "error",
"no-loop-func": "warn",
"indent": "off",
indent: "off",
"no-console": "off",
"valid-jsdoc": ["error", {
"prefer": {
"return": "returns",
"memberof": "DONTUSE",
"class": "DONTUSE",
"inheritdoc": "DONTUSE",
"description": "DONTUSE",
"readonly": "DONTUSE"
},
"preferType": {
"*": "any"
},
"requireReturnType": true
}],
"valid-jsdoc": [
"error",
{
prefer: {
return: "returns",
prop: "property",
memberof: "DONTUSE",
class: "DONTUSE",
inheritdoc: "DONTUSE",
description: "DONTUSE",
readonly: "DONTUSE"
},
preferType: {
"*": "any"
},
requireReturnType: true
}
],
"node/no-unsupported-features": "error",
"node/no-deprecated-api": "error",
"node/no-missing-import": "error",
Expand All @@ -59,7 +67,7 @@ module.exports = {
browser: true
},
globals: {
Promise: false,
Promise: false
},
parserOptions: {
ecmaVersion: 5
Expand All @@ -69,6 +77,9 @@ module.exports = {
files: ["test/**/*.js"],
env: {
"jest/globals": true
},
globals: {
nsObj: false
}
}
]
Expand Down
78 changes: 39 additions & 39 deletions .github/ISSUE_TEMPLATE/Bug_report.md
@@ -1,39 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
---

<!-- Please don't delete this template because we'll close your issue -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

# Bug report

<!-- Please ask questions on StackOverflow or the webpack Gitter. -->
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
<!-- https://gitter.im/webpack/webpack -->
<!-- Issues which contain questions or support requests will be closed. -->

**What is the current behavior?**


**If the current behavior is a bug, please provide the steps to reproduce.**


<!-- A great way to do this is to provide your configuration via a GitHub repository -->
<!-- The most helpful is a minimal reproduction with instructions on how to reproduce -->
<!-- Repositories with too many files or large `webpack.config.js` files are not suitable -->
<!-- Please only add small code snippets directly into this issue -->
<!-- https://gist.github.com is a good place for longer code snippets -->
<!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead -->

**What is the expected behavior?**


<!-- "It should work" is not a helpful explanation -->
<!-- Explain exactly how it should behave -->

**Other relevant information:**
webpack version:
Node.js version:
Operating System:
Additional tools:
---
name: Bug report
about: Create a report to help us improve
---

<!-- Please don't delete this template because we'll close your issue -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

# Bug report

<!-- Please ask questions on StackOverflow or the webpack Gitter. -->
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
<!-- https://gitter.im/webpack/webpack -->
<!-- Issues which contain questions or support requests will be closed. -->

**What is the current behavior?**


**If the current behavior is a bug, please provide the steps to reproduce.**


<!-- A great way to do this is to provide your configuration via a GitHub repository -->
<!-- The most helpful is a minimal reproduction with instructions on how to reproduce -->
<!-- Repositories with too many files or large `webpack.config.js` files are not suitable -->
<!-- Please only add small code snippets directly into this issue -->
<!-- https://gist.github.com is a good place for longer code snippets -->
<!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead -->

**What is the expected behavior?**


<!-- "It should work" is not a helpful explanation -->
<!-- Explain exactly how it should behave -->

**Other relevant information:**
webpack version:
Node.js version:
Operating System:
Additional tools:
54 changes: 27 additions & 27 deletions .github/ISSUE_TEMPLATE/Feature_request.md
@@ -1,27 +1,27 @@
---
name: Feature request
about: Suggest an idea for this project

---

<!-- Please don't delete this template or we'll close your issue -->

## Feature request

<!-- Issues which contain questions or support requests will be closed. -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
<!-- Check if this feature need to be implemented in a plugin or loader instead -->
<!-- If yes: file the issue on the plugin/loader repo -->
<!-- Features related to the development server should be filed on this repo instead -->

**What is the expected behavior?**


**What is motivation or use case for adding/changing the behavior?**


**How should this be implemented in your opinion?**


**Are you willing to work on this yourself?**
yes
---
name: Feature request
about: Suggest an idea for this project

---

<!-- Please don't delete this template or we'll close your issue -->

## Feature request

<!-- Issues which contain questions or support requests will be closed. -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
<!-- Check if this feature need to be implemented in a plugin or loader instead -->
<!-- If yes: file the issue on the plugin/loader repo -->
<!-- Features related to the development server should be filed on this repo instead -->

**What is the expected behavior?**


**What is motivation or use case for adding/changing the behavior?**


**How should this be implemented in your opinion?**


**Are you willing to work on this yourself?**
yes
18 changes: 9 additions & 9 deletions .github/ISSUE_TEMPLATE/Other.md
@@ -1,9 +1,9 @@
---
name: Other
about: Something else

---

<!-- Bug reports and Feature requests must use other templates, or will be closed -->
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). -->
<!-- Issues which contain questions or support requests will be closed. -->
---
name: Other
about: Something else

---

<!-- Bug reports and Feature requests must use other templates, or will be closed -->
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). -->
<!-- Issues which contain questions or support requests will be closed. -->
17 changes: 5 additions & 12 deletions .prettierignore
@@ -1,15 +1,8 @@
# Ignore all paths.
**/*.*

# Enable prettier for the following paths.
!setup/**/*.js
!lib/**/*.js
!bin/*.js
!hot/*.js
!buildin/*.js
!benchmark/**/*.js
# Ignore test fixtures
test
!test/*.js
!test/**/webpack.config.js

# Ignore example fixtures
examples
!examples/**/webpack.config.js
!schemas/**/*.js
!declarations.d.ts
10 changes: 9 additions & 1 deletion .prettierrc.js
@@ -1,5 +1,13 @@
module.exports = {
printWidth: 80,
useTabs: true,
tabWidth: 2
tabWidth: 2,
overrides: [
{
files: "*.json",
options: {
useTabs: false
}
}
]
};
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -7,7 +7,7 @@ work is not in vain.

## Issues

Most of the time, if webpack is not working correctly for you it is a simple configuration issue.
Most of the time, if webpack is not working correctly for you, it is a simple configuration issue.

If you are still having difficulty after looking over your configuration carefully, please post
a question to [StackOverflow with the webpack tag](http://stackoverflow.com/tags/webpack). Questions
Expand Down Expand Up @@ -35,11 +35,11 @@ If you have created your own loader/plugin please include it on the relevant doc

## Submitting Changes

After getting some feedback, push to your fork and submit a pull request. We
After getting some feedbacks, push to your fork and submit a pull request. We
may suggest some changes or improvements or alternatives, but for small changes
your pull request should be accepted quickly.

Some things that will increase the chance that your pull request is accepted:
Something that will increase the chance that your pull request is accepted:

* [Write tests](./test/README.md)
* Follow the existing coding style
Expand Down
18 changes: 13 additions & 5 deletions README.md
Expand Up @@ -11,10 +11,14 @@
[![deps][deps]][deps-url]
[![tests][tests]][tests-url]
[![builds][builds]][builds-url]
[![builds2][builds2]][builds2-url]
[![coverage][cover]][cover-url]
[![licenses][licenses]][licenses-url]

<br>
<a href="https://dependabot.com/compatibility-score.html?dependency-name=webpack&package-manager=npm_and_yarn&new-version=latest">
<img src="https://api.dependabot.com/badges/compatibility_score?dependency-name=webpack&package-manager=npm_and_yarn&version-scheme=semver&target-version=latest">
</a>
<a href="https://npmcharts.com/compare/webpack?minimal=true">
<img src="https://img.shields.io/npm/dm/webpack.svg">
</a>
Expand Down Expand Up @@ -55,8 +59,6 @@ yarn add webpack --dev

<h2 align="center">Introduction</h2>

> This README reflects webpack v2.x and v3.x. The webpack v1.x documentation has been deprecated and deleted.
webpack is a bundler for modules. The main purpose is to bundle JavaScript
files for usage in a browser, yet it is also capable of transforming, bundling,
or packaging just about any resource or asset.
Expand Down Expand Up @@ -89,16 +91,19 @@ within webpack itself use this plugin interface. This makes webpack very

|Name|Status|Install Size|Description|
|:--:|:----:|:----------:|:----------|
|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extracts Text (CSS) from your bundles into a separate file (app.bundle.css)|
|[mini-css-extract-plugin][mini-css]|![mini-css-npm]|![mini-css-size]|Extracts CSS into separate files. It creates a CSS file per JS file which contains CSS.|
|[compression-webpack-plugin][compression]|![compression-npm]|![compression-size]|Prepares compressed versions of assets to serve them with Content-Encoding|
|[i18n-webpack-plugin][i18n]|![i18n-npm]|![i18n-size]|Adds i18n support to your bundles|
|[html-webpack-plugin][html-plugin]|![html-plugin-npm]|![html-plugin-size]| Simplifies creation of HTML files (`index.html`) to serve your bundles|

|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extract text from a bundle, or bundles, into a separate file|

[common-npm]: https://img.shields.io/npm/v/webpack.svg
[extract]: https://github.com/webpack/extract-text-webpack-plugin
[extract-npm]: https://img.shields.io/npm/v/extract-text-webpack-plugin.svg
[extract-size]: https://packagephobia.now.sh/badge?p=extract-text-webpack-plugin
[mini-css]: https://github.com/webpack-contrib/mini-css-extract-plugin
[mini-css-npm]: https://img.shields.io/npm/v/mini-css-extract-plugin.svg
[mini-css-size]: https://packagephobia.now.sh/badge?p=mini-css-extract-plugin
[component]: https://github.com/webpack/component-webpack-plugin
[component-npm]: https://img.shields.io/npm/v/component-webpack-plugin.svg
[component-size]: https://packagephobia.now.sh/badge?p=component-webpack-plugin
Expand Down Expand Up @@ -217,7 +222,7 @@ or are automatically applied via regex from your webpack configuration.
|<a href="https://github.com/webpack/style-loader">`<style>`</a>|![style-npm]|![style-size]|Add exports of a module as style to DOM|
|<a href="https://github.com/webpack/css-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/css-3.svg"></a>|![css-npm]|![css-size]|Loads CSS file with resolved imports and returns CSS code|
|<a href="https://github.com/webpack/less-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/less-63.svg"></a>|![less-npm]|![less-size]|Loads and compiles a LESS file|
|<a href="https://github.com/jtangelder/sass-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/sass-1.svg"></a>|![sass-npm]|![sass-size]|Loads and compiles a SASS/SCSS file|
|<a href="https://github.com/jtangelder/sass-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/sass-1.svg"></a>|![sass-npm]|![sass-size]|Loads and compiles a Sass/SCSS file|
|<a href="https://github.com/shama/stylus-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/stylus.svg"></a>|![stylus-npm]|![stylus-size]|Loads and compiles a Stylus file|
|<a href="https://github.com/postcss/postcss-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/postcss.svg"></a>|![postcss-npm]|![postcss-size]|Loads and transforms a CSS/SSS file using [PostCSS](http://postcss.org)|

Expand Down Expand Up @@ -748,6 +753,9 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
[builds-url]: https://ci.appveyor.com/project/sokra/webpack/branch/master
[builds]: https://ci.appveyor.com/api/projects/status/github/webpack/webpack?svg=true

[builds2]: https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack
[builds2-url]: https://dev.azure.com/webpack/webpack/_build/latest?definitionId=3

[licenses-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack?ref=badge_shield
[licenses]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack.svg?type=shield

Expand Down
8 changes: 7 additions & 1 deletion _SETUP.md
Expand Up @@ -27,7 +27,7 @@ yarn link webpack
yarn test
```

### To run only intergration tests use
### To run only integration tests use

```bash
yarn test:integration
Expand All @@ -51,6 +51,12 @@ or in watch mode
yarn test:unit --watch
```

### To update Jest snapshots use

```bash
yarn test:update-snapshots
```

### To run code formatter (prettier) run

```bash
Expand Down

0 comments on commit 7bc5c98

Please sign in to comment.