Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4 #2592

Merged
merged 74 commits into from
Nov 27, 2020
Merged

V4 #2592

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
711d7b5
chore(deps): upgrade chokidar (#2539)
knagaitsev Apr 27, 2020
fb79bb5
fix(run-open): introduce open instead of opn (#2532)
hiroppy Apr 27, 2020
77af842
chore(deps): upgrade some deps (#2542)
hiroppy Apr 29, 2020
45ae42c
chore(deps): update package-lock.json (#2551)
hiroppy Apr 30, 2020
f8fb283
BREAKING CHANGE(server): get rid of conditions of Node version (#2552)
hiroppy Apr 30, 2020
f526d0b
BREAKING CHANGE: remove inline and iframe/live mode (#2550)
knagaitsev May 1, 2020
cf7f95d
feat: switch default transportMode to ws (#2531)
knagaitsev May 4, 2020
7cd576a
BREAKING CHANGE(https): migrate ca, cert, pfx, key, pfx-passphrase, a…
hiroppy May 5, 2020
92c22f1
refactor: reorganize client directory (#2562)
knagaitsev May 6, 2020
caa03c1
fix(server): remove setup and rename before and after (#2570)
hiroppy May 7, 2020
58948b1
chore(deps): update deps (#2577)
hiroppy May 8, 2020
8775a07
chore(deps): security vulnerability in yargs-parser (#2581)
Ionaru May 8, 2020
ed9c4f7
refactor: move sock options into an object (#2593)
knagaitsev May 12, 2020
e826119
feat(client): add ws error logging (#2594)
knagaitsev May 12, 2020
9c56a5a
refactor(server): use this.options.xxx (#2558)
hiroppy May 12, 2020
9b56a4e
fix(client): remove exclude option from client's webpack.config.js (#…
hiroppy May 12, 2020
e94238b
chore: modify CONTRIBUTING.md (#2599)
evilebottnawi May 12, 2020
8235fd3
refactor: remove the `features` option (#2604)
evilebottnawi May 14, 2020
7fbc635
refactor: migrate on built-in logger (#2614)
evilebottnawi May 19, 2020
25cc479
fix: prefer the `hot` argument from CLI over the configuration (#2617)
evilebottnawi May 19, 2020
76bcd84
refactor: resolve todo (#2619)
evilebottnawi May 21, 2020
d9cd8e1
fix: disable socket injection when hot & liveReload are disabled (V4)…
EslamHiko May 22, 2020
37b0a9d
test(client): do mock window.location.reload and assign (#2635)
hiroppy Jun 3, 2020
cb80c00
chore(deps): update some deps (#2639)
hiroppy Jun 8, 2020
6e9890e
ci: uncomment audit (#2636)
hiroppy Jun 16, 2020
e4761bf
refactor(client): migrate client to built-in logger (#2631)
knagaitsev Jun 20, 2020
eb9c58d
chore(client): rename clientOptions to client (#2655)
knagaitsev Jun 24, 2020
8f6c8f4
chore: upgrade dev middleware (#2660)
knagaitsev Jul 2, 2020
6b667b4
refactor: remove socket option (#2669)
knagaitsev Jul 7, 2020
4cb26b1
refactor: rename CLI flags
rishabh3112 Jul 16, 2020
7ae9f13
chore(deps): update some deps (#2673)
hiroppy Jul 16, 2020
4d58284
chore(deps): update some deps (#2675)
hiroppy Jul 17, 2020
0bcd4e5
test(client): work on test instability (#2680)
knagaitsev Jul 21, 2020
022f3de
chore(eslint): use overwrite option (#2679)
hiroppy Jul 21, 2020
f27bbb1
Remove request cert in favor https options (#2618)
evilebottnawi Jul 21, 2020
861c294
refactor: `eslint` comments (#2681)
evilebottnawi Jul 22, 2020
0ac8713
chore(deps): update puppeteer
knagaitsev Jul 23, 2020
c616bb5
BREAKING CHANGES: handle publicPath correctly (#2671)
knagaitsev Jul 26, 2020
2bbd36f
chore(examples): fix util.js (#2686)
hiroppy Jul 27, 2020
7430067
chore(deps): update dependencies (#2694)
GChuf Aug 11, 2020
b825dd4
chore(deps): update dev deps (#2695)
GChuf Aug 11, 2020
a2907a8
feat(server): allow async bypass function for proxying (#2696)
gromo Aug 17, 2020
eb35371
chore(audit): remove production flag from azure-pipelines (#2708)
hiroppy Aug 17, 2020
c6d2c00
BREAKING CHANGES: create static option and remove replaced options (#…
knagaitsev Aug 18, 2020
154432e
ci: make use of github-actions (#2709)
hiroppy Aug 18, 2020
1105309
chore(renovate): update config (#2711)
hiroppy Aug 18, 2020
86140c5
feat(proxy): add arguments to proxyconfig (#2714)
hiroppy Aug 20, 2020
289a98f
BREAKING CHANGE: remove CLI default flag values for webpack-cli serve…
knagaitsev Aug 22, 2020
b45cdeb
fix(cli): fix certain flags for webpack-cli serve (#2722)
knagaitsev Aug 25, 2020
ab7f6dd
chore(options): change disableHostCheck and allowedHosts to firewall …
knagaitsev Aug 25, 2020
c7e53b0
Fix: ES5 client (#2658)
knagaitsev Aug 26, 2020
2090a41
fix: use find-cache-dir to temporarily store certificates (#2729)
wojtekmaj Sep 8, 2020
161e3d8
fix: re-throw error to kill server (#2630)
emilyrohrbough Sep 8, 2020
709ce16
test: add stat:verbose to cli's webpack config (#2735)
hiroppy Sep 12, 2020
8582dd5
chore(prettier): delete default options (#2733)
hiroppy Sep 13, 2020
9f1d02b
chore(readme): update 'create-react-app' url (#2738)
rahul3v Sep 14, 2020
5e90f25
chore: support webpack@5 (#2828)
ylemkimon Nov 16, 2020
19b793f
refactor: contentBase (static) logging (#2744)
ylemkimon Nov 16, 2020
0a6feac
test: fix jest usage and add retry (#2838)
ylemkimon Nov 17, 2020
6f5d0b6
fix: show detailed error in overlay for webpack 5 (#2811)
snitin315 Nov 17, 2020
21bc47a
fix(utils): use plugin to add entries for webpack@5 (#2839)
ylemkimon Nov 17, 2020
e6f91ad
test: add unit test for DevServerEntryPlugin (#2840)
ylemkimon Nov 17, 2020
6c2082f
test: fix flaky tests (#2842)
ylemkimon Nov 18, 2020
e647af4
fix: handle new `target` values
ylemkimon Nov 19, 2020
0541963
docs: update README and examples (#2848)
ylemkimon Nov 20, 2020
cf2847d
chore(deps): remove unused packages (#2846)
ylemkimon Nov 20, 2020
1aa0d2d
refactor: remove `socket` status and log `options.dev.publicPath` onl…
ylemkimon Nov 20, 2020
a16bbee
fix: use location.port as sock.port by default (#2850)
ylemkimon Nov 20, 2020
74e4297
test: use webpack5 and ModuleFederationPlugin (#2853)
shaodahong Nov 23, 2020
ccdce35
refactor: use webpack-cli@4 (#2845)
ylemkimon Nov 23, 2020
98c68bf
chore(deps): update all dependencies and use webpack 5 (#2858)
ylemkimon Nov 25, 2020
ecf2fe1
refactor: remove CLI progress and move progress option into client (#…
ylemkimon Nov 26, 2020
e80f12d
feat: use server address and fallback to 0.0.0.0 (location.hostname) …
ylemkimon Nov 27, 2020
47a0fe1
fix(client): use location protocol on ipv6 any (::) host (#2868)
ylemkimon Nov 27, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/client
!/test/client
coverage
client-src/live/web_modules/
node_modules
21 changes: 0 additions & 21 deletions .eslintrc

This file was deleted.

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

module.exports = {
extends: ['webpack', 'prettier'],
globals: {
document: true,
window: true,
},
parserOptions: {
sourceType: 'script',
ecmaVersion: 10,
},
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',
},
overrides: [
{
files: ['test/**/*.js'],
rules: {
'no-console': 'off',
},
},
{
files: ['examples/**/*.js'],
env: {
browser: true,
},
rules: {
'no-console': 'off',
},
},
],
};
98 changes: 98 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
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: [12.x]

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

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

- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.node-version }}

- name: Use latest NPM
run: sudo npm i -g npm

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Security audit
run: npm audit

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

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: [10.x, 12.x, 14.x]
webpack-version: [4, latest]

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

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Use latest NPM on ubuntu/macos
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: sudo npm i -g npm

- name: Use latest NPM on windows
if: matrix.os == 'windows-latest'
run: npm i -g npm

- name: Install dependencies
run: npm ci

- name: Install webpack ${{ matrix.webpack-version }}
run: npm i webpack@${{ matrix.webpack-version }}

- name: Link webpack-dev-server
run: |
npm link --ignore-scripts # do not build the client again
npm link webpack-dev-server

- 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@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ npm-debug.log
client
!/test/client
coverage
ssl/*.pem
node_modules
.vscode
yarn.lock
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/client
!/test/client
coverage
client-src/live/web_modules/
node_modules
CHANGELOG.md
6 changes: 2 additions & 4 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
'use strict';

module.exports = {
printWidth: 80,
tabWidth: 2,
singleQuote: true,
trailingComma: 'es5',
arrowParens: 'always',
overrides: [
{
files: '*.json',
Expand Down
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ Run the relevant [examples](https://github.com/webpack/webpack-dev-server/tree/m

2. Run `npm install` in the root `webpack-dev-server` folder.

3. Run `npm link && npm link webpack-dev-server` to link the current project to `node_modules`.

Once it is done, you can modify any file locally. In the `examples/` directory you'll find a lot of examples with instructions on how to run it. This can be very handy when testing if your code works.

If you are modifying a file in the `client/` directory, be sure to run `npm run prepublish` after it. This will recompile the files.
If you are modifying a file in the `client/` directory, be sure to run `npm run build:client` after it. This will recompile the files.

## Testing a Pull Request

Expand Down Expand Up @@ -64,4 +66,4 @@ Run `git config user.email` to see your Git email, and verify it with [your GitH

---

_Many thanks to [create-react-app](https://github.com/facebookincubator/create-react-app/blob/master/CONTRIBUTING.md) for the inspiration with this contributing guide_
_Many thanks to [create-react-app](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md) for the inspiration with this contributing guide_
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

[![npm][npm]][npm-url]
[![node][node]][node-url]
[![deps][deps]][deps-url]
[![tests][tests]][tests-url]
[![coverage][cover]][cover-url]
[![chat][chat]][chat-url]
Expand Down Expand Up @@ -52,14 +51,14 @@ There are two main, recommended methods of using the module:

### With the CLI

The easiest way to use it is with the CLI. In the directory where your
The easiest way to use it is with the [webpack CLI](https://webpack.js.org/api/cli/). In the directory where your
`webpack.config.js` is, run:

```console
node_modules/.bin/webpack-dev-server
node_modules/.bin/webpack serve
```

_**Note**: Many CLI options are available with `webpack-dev-server`. Explore this [link](https://webpack.js.org/configuration/dev-server/)._
_**Note**: Many CLI options are available with `webpack serve`. Explore this [link](https://webpack.js.org/configuration/dev-server/)._

### With NPM Scripts

Expand All @@ -69,7 +68,7 @@ script as such:

```json
"scripts": {
"start:dev": "webpack-dev-server"
"start:dev": "webpack serve"
}
```

Expand Down Expand Up @@ -144,10 +143,8 @@ This project is heavily inspired by [peerigon/nof5](https://github.com/peerigon/
[npm-url]: https://npmjs.com/package/webpack-dev-server
[node]: https://img.shields.io/node/v/webpack-dev-server.svg
[node-url]: https://nodejs.org
[deps]: https://david-dm.org/webpack/webpack-dev-server.svg
[deps-url]: https://david-dm.org/webpack/webpack-dev-server
[tests]: https://dev.azure.com/webpack/webpack-dev-server/_apis/build/status/webpack.webpack-dev-server?branchName=master
[tests-url]: https://dev.azure.com/webpack/webpack-dev-server/_build/latest?definitionId=7&branchName=master
[tests]: https://github.com/webpack/webpack-dev-server/workflows/webpack-dev-server/badge.svg
[tests-url]: https://github.com/webpack/webpack-dev-server/actions?query=workflow%3Awebpack-dev-server
[cover]: https://codecov.io/gh/webpack/webpack-dev-server/branch/master/graph/badge.svg
[cover-url]: https://codecov.io/gh/webpack/webpack-dev-server
[chat]: https://badges.gitter.im/webpack/webpack.svg
Expand Down
Loading