Skip to content

chore(deps): update all dependencies and use webpack 5 #2858

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

Merged
merged 4 commits into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:

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

- name: Run tests for webpack version ${{ matrix.webpack-version }}
Expand Down
4 changes: 3 additions & 1 deletion client-src/clients/SockJSClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ const SockJS = require('sockjs-client/dist/sockjs');
const { log } = require('../default/utils/log');
const BaseClient = require('./BaseClient');

module.exports = class SockJSClient extends BaseClient {
module.exports = class SockJSClient extends (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause by editor format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks, weird for this to extra brackets, maybe fix by prettier/prettier#9744

issue link prettier/prettier#9341 (comment)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is not important for this pr

BaseClient
) {
constructor(url) {
super();
this.sock = new SockJS(url);
Expand Down
4 changes: 3 additions & 1 deletion client-src/clients/WebsocketClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
const { log } = require('../default/utils/log');
const BaseClient = require('./BaseClient');

module.exports = class WebsocketClient extends BaseClient {
module.exports = class WebsocketClient extends (
BaseClient
) {
constructor(url) {
super();
this.client = new WebSocket(url.replace(/^http/, 'ws'));
Expand Down
1 change: 1 addition & 0 deletions client-src/default/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
path: path.resolve(__dirname, '../../client/default'),
filename: 'index.bundle.js',
},
target: ['web', 'es5'],
module: {
rules: [
{
Expand Down
1 change: 1 addition & 0 deletions client-src/sockjs/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ module.exports = {
library: 'SockJS',
libraryTarget: 'umd',
},
target: ['web', 'es5'],
};
3 changes: 2 additions & 1 deletion client-src/transpiled-modules/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
'use strict';

const path = require('path');
const merge = require('webpack-merge');
const { merge } = require('webpack-merge');

const base = {
mode: 'production',
output: {
path: path.resolve(__dirname, '../../client/transpiled-modules'),
libraryTarget: 'commonjs2',
},
target: ['web', 'es5'],
module: {
rules: [
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const webpack = require('webpack');
const webpackDevMiddleware = require('webpack-dev-middleware');
const getFilenameFromUrl = require('webpack-dev-middleware/dist/utils/getFilenameFromUrl')
.default;
const validateOptions = require('schema-utils');
const { validate } = require('schema-utils');
const normalizeOptions = require('./utils/normalizeOptions');
const updateCompiler = require('./utils/updateCompiler');
const getCertificate = require('./utils/getCertificate');
Expand All @@ -39,7 +39,7 @@ if (!process.env.WEBPACK_DEV_SERVER) {

class Server {
constructor(compiler, options = {}) {
validateOptions(schema, options, 'webpack Dev Server');
validate(schema, options, 'webpack Dev Server');

this.compiler = compiler;
this.options = options;
Expand Down
4 changes: 3 additions & 1 deletion lib/servers/SockJSServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const BaseServer = require('./BaseServer');
};
}

module.exports = class SockJSServer extends BaseServer {
module.exports = class SockJSServer extends (
BaseServer
) {
// options has: error (function), debug (function), server (http/s server), path (string)
constructor(server) {
super(server);
Expand Down
4 changes: 3 additions & 1 deletion lib/servers/WebsocketServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
const ws = require('ws');
const BaseServer = require('./BaseServer');

module.exports = class WebsocketServer extends BaseServer {
module.exports = class WebsocketServer extends (
BaseServer
) {
constructor(server) {
super(server);

Expand Down
Loading