Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webpack/webpack-dev-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4b7a8283f4901a1894bbc93b09d2dcab96ee514b
Choose a base ref
...
head repository: webpack/webpack-dev-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5aad1e72eee98f0947a85706b1256a3c7834b094
Choose a head ref
Loading
Showing 690 changed files with 95,451 additions and 24,246 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
web_modules
/client
/dist
!/test/client
coverage
node_modules
19 changes: 0 additions & 19 deletions .eslintrc

This file was deleted.

86 changes: 86 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
"use strict";

module.exports = {
extends: ["webpack", "prettier"],
parser: "@babel/eslint-parser",
parserOptions: {
sourceType: "script",
ecmaVersion: 2018,
},
reportUnusedDisableDirectives: true,
env: {
node: true,
es6: true,
},
rules: {
curly: "error",
"consistent-return": "off",
"no-param-reassign": "off",
"no-underscore-dangle": "off",
"prefer-destructuring": ["error", { object: false, array: false }],
"prefer-rest-params": "off",
strict: ["error", "safe"],
"global-require": "off",
"spaced-comment": [
"error",
"always",
{
line: {
exceptions: ["-", "+"],
markers: ["=", "!", "/"],
},
block: {
exceptions: ["-", "+"],
markers: ["=", "!"],
balanced: false,
},
},
],
},
overrides: [
{
files: ["client-src/**/*.js"],
excludedFiles: [
"client-src/webpack.config.js",
"client-src/modules/logger/SyncBailHookFake.js",
],
parserOptions: {
sourceType: "module",
allowImportExportEverywhere: true,
},
env: {
browser: true,
},
rules: {
"import/extensions": ["error", "always"],
},
},
{
files: ["test/**/*.js"],
rules: {
"no-console": "off",
},
},
{
files: [
"test/client/**/*.js",
"test/e2e/**/*.js",
"test/fixtures/**/*.js",
"test/server/liveReload-option.test.js",
],
env: {
browser: true,
node: true,
},
},
{
files: ["examples/**/*.js"],
env: {
browser: true,
},
rules: {
"no-console": "off",
},
},
],
};
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @evilebottnawi @michael-ciniawsky
* @alexander-akait @hiroppy @Loonride @snitin315 @anshumanv
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: webpack
14 changes: 6 additions & 8 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -6,12 +6,6 @@
General questions, how-to questions, and support requests will be closed.
-->

* Operating System:
* Node Version:
* NPM Version:
* webpack Version:
* webpack-dev-server Version:

<!--
Please place an x, no spaces, in all [ ] that apply
Please note that we are NOT accepting FEATURE requests at this time.
@@ -37,17 +31,21 @@
-->

```js
// webpack.config.js
// webpack.config.js
```

```js
// additional code, remove if not needed.
// additional code, remove if not needed.
```

### Please paste the results of `npx webpack-cli info` here, and mention other relevant information

### Expected Behavior

### Actual Behavior

### For Bugs; How can we reproduce the behavior?

<!-- See https://stackoverflow.com/help/minimal-reproducible-example for information on how to create good reproductions -->

### For Features; What is the motivation and/or use-case for the feature?
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: 🐛 Bug Report
about: Something went awry and you'd like to tell us about it.
---

<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

### Bug report

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

### Actual Behavior

<!-- Explain exactly how it behaves -->

### Expected Behavior

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

### How Do We 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 -->

### Please paste the results of `npx webpack-cli info` here, and mention other relevant information
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/DOCS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: 📚 Documentation
about: Are the docs lacking or missing something? Do they need some new 🔥 hotness? Tell us here.
---

<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

Documentation Is:

<!-- Please place an x (no spaces!) in all [ ] that apply -->

- [ ] Missing
- [ ] Needed
- [ ] Confusing
- [ ] Not Sure?

### Please Explain in Detail...

<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- https://github.com/webpack/webpack/discussions -->
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
<!-- https://gitter.im/webpack/webpack -->
<!-- Issues which contain questions or support requests will be closed. -->

### Your Proposal for Changes
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: ✨ Feature Request
about: Suggest an idea for this project
---

<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

### Feature Proposal

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

### Feature Use Case

### Please paste the results of `npx webpack-cli info` here, and mention other relevant information
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/MODIFICATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: 🔧 Modification Request
about: Would you like something work differently? Have an alternative approach? This is the template for you.
---

<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

### Modification Proposal

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

### Expected Behavior / Situation

### Actual Behavior / Situation

### Please paste the results of `npx webpack-cli info` here, and mention other relevant information
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: 🆘 Support, Help, and Advice
about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to https://github.com/webpack/webpack/discussions, StackOverflow or https://gitter.im/webpack/webpack.
---

Hey there! If you need support, help, or advice then this is not the place to ask.
Please visit [Discussions](https://github.com/webpack/webpack/discussions), [StackOverflow](https://stackoverflow.com/questions/tagged/webpack)
or [the Webpack Gitter](https://gitter.im/webpack/webpack) instead.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "04:00"
timezone: Europe/Berlin
open-pull-requests-limit: 10
versioning-strategy: lockfile-only
107 changes: 107 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: webpack-dev-server

on:
push:
branches:
- master
- next
- v4
pull_request:
branches:
- master
- next
- v4

jobs:
lint:
name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }}

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build types
run: npm run build:types

- name: Check types
run: if [ -n "$(git status types --porcelain)" ]; then echo "Missing types. Update types by running 'npm run build:types'"; exit 1; else echo "All types are valid"; fi

- name: Security audit
run: npm audit --production

- name: Check commit message
uses: wagoid/commitlint-github-action@v4

test:
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12.x, 14.x, 16.x, 17.x]
webpack-version: [latest]
include:
- node-version: 16.x
os: ubuntu-latest
webpack-version: 4

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Update package.json for webpack@4
if: matrix.webpack-version == '4'
run: echo "`jq '.scripts.build="npm run build:client"' package.json`" > package.json

- name: Install webpack ${{ matrix.webpack-version }}
if: matrix.webpack-version == '4'
run: npm i webpack@${{ matrix.webpack-version }} --save-dev --ignore-scripts

- name: Link webpack-dev-server
run: |
cp -R client tmp-client
npm link --ignore-scripts
npm link webpack-dev-server --ignore-scripts
rm -r client
cp -R tmp-client client
- name: Run tests for webpack version ${{ matrix.webpack-version }}
run: npm run test:coverage -- --ci

- name: Submit coverage data to codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
Loading