Skip to content

Commit 98c68bf

Browse files
authored
chore(deps): update all dependencies and use webpack 5 (#2858)
1 parent ccdce35 commit 98c68bf

File tree

19 files changed

+3217
-4342
lines changed

19 files changed

+3217
-4342
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686

8787
- name: Link webpack-dev-server
8888
run: |
89-
npm link
89+
npm link --ignore-scripts # do not build the client again
9090
npm link webpack-dev-server
9191
9292
- name: Run tests for webpack version ${{ matrix.webpack-version }}

client-src/clients/SockJSClient.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ const SockJS = require('sockjs-client/dist/sockjs');
44
const { log } = require('../default/utils/log');
55
const BaseClient = require('./BaseClient');
66

7-
module.exports = class SockJSClient extends BaseClient {
7+
module.exports = class SockJSClient extends (
8+
BaseClient
9+
) {
810
constructor(url) {
911
super();
1012
this.sock = new SockJS(url);

client-src/clients/WebsocketClient.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
const { log } = require('../default/utils/log');
66
const BaseClient = require('./BaseClient');
77

8-
module.exports = class WebsocketClient extends BaseClient {
8+
module.exports = class WebsocketClient extends (
9+
BaseClient
10+
) {
911
constructor(url) {
1012
super();
1113
this.client = new WebSocket(url.replace(/^http/, 'ws'));

client-src/default/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99
path: path.resolve(__dirname, '../../client/default'),
1010
filename: 'index.bundle.js',
1111
},
12+
target: ['web', 'es5'],
1213
module: {
1314
rules: [
1415
{

client-src/sockjs/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ module.exports = {
1111
library: 'SockJS',
1212
libraryTarget: 'umd',
1313
},
14+
target: ['web', 'es5'],
1415
};

client-src/transpiled-modules/webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
'use strict';
22

33
const path = require('path');
4-
const merge = require('webpack-merge');
4+
const { merge } = require('webpack-merge');
55

66
const base = {
77
mode: 'production',
88
output: {
99
path: path.resolve(__dirname, '../../client/transpiled-modules'),
1010
libraryTarget: 'commonjs2',
1111
},
12+
target: ['web', 'es5'],
1213
module: {
1314
rules: [
1415
{

lib/Server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const webpack = require('webpack');
1717
const webpackDevMiddleware = require('webpack-dev-middleware');
1818
const getFilenameFromUrl = require('webpack-dev-middleware/dist/utils/getFilenameFromUrl')
1919
.default;
20-
const validateOptions = require('schema-utils');
20+
const { validate } = require('schema-utils');
2121
const normalizeOptions = require('./utils/normalizeOptions');
2222
const updateCompiler = require('./utils/updateCompiler');
2323
const getCertificate = require('./utils/getCertificate');
@@ -39,7 +39,7 @@ if (!process.env.WEBPACK_DEV_SERVER) {
3939

4040
class Server {
4141
constructor(compiler, options = {}) {
42-
validateOptions(schema, options, 'webpack Dev Server');
42+
validate(schema, options, 'webpack Dev Server');
4343

4444
this.compiler = compiler;
4545
this.options = options;

lib/servers/SockJSServer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ const BaseServer = require('./BaseServer');
2626
};
2727
}
2828

29-
module.exports = class SockJSServer extends BaseServer {
29+
module.exports = class SockJSServer extends (
30+
BaseServer
31+
) {
3032
// options has: error (function), debug (function), server (http/s server), path (string)
3133
constructor(server) {
3234
super(server);

lib/servers/WebsocketServer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
const ws = require('ws');
77
const BaseServer = require('./BaseServer');
88

9-
module.exports = class WebsocketServer extends BaseServer {
9+
module.exports = class WebsocketServer extends (
10+
BaseServer
11+
) {
1012
constructor(server) {
1113
super(server);
1214

0 commit comments

Comments
 (0)