From 0fd05c230933b0fa07446df276b2047af59efdbb Mon Sep 17 00:00:00 2001 From: Martin Minka Date: Sat, 29 Oct 2022 11:19:56 +0200 Subject: [PATCH 1/3] fix webpack 5 in Lerna --- webpack/webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index 691a5f0fc1a..5fb24daabdc 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -161,6 +161,10 @@ module.exports = { rules }, resolve: { + fallback: { + 'process/browser': require.resolve('process/browser'), + events: require.resolve('events/') + }, alias: { stream: 'stream-browserify', crypto: 'crypto-browserify', From e78a63f5d033b0ef04cd54f82c9f0f5071cdac19 Mon Sep 17 00:00:00 2001 From: Martin Minka Date: Sat, 29 Oct 2022 11:21:44 +0200 Subject: [PATCH 2/3] fix formatting of empty spaces --- lib/server/bootevent.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/server/bootevent.js b/lib/server/bootevent.js index 69824c0ffa2..013a9e57462 100644 --- a/lib/server/bootevent.js +++ b/lib/server/bootevent.js @@ -23,7 +23,7 @@ function boot (env, language) { ////////////////////////////////////////////////// // Check Node version. - // Latest Node LTS releases are recommended and supported. + // Latest Node LTS releases are recommended and supported. // Current Node releases MAY work, but are not recommended. Will be tested in CI // Older Node versions or Node versions with known security issues will not work. /////////////////////////////////////////////////// @@ -35,7 +35,7 @@ function boot (env, language) { var nodeVersion = process.version; const isLTS = process.release.lts ? true : false; - + if (isLTS && (semver.satisfies(nodeVersion, '^16.0.0') || semver.satisfies(nodeVersion, '^14.0.0'))) { //Latest Node 14 LTS and Node 16 LTS are recommended and supported. //Require at least Node 14 without known security issues @@ -267,7 +267,7 @@ function boot (env, language) { function setupListeners (ctx, next) { console.log('Executing setupListeners'); - + if (hasBootErrors(ctx)) { return next(); } From ed7fdf7c177a3ac04d3376aa74b80d6994ae6674 Mon Sep 17 00:00:00 2001 From: Martin Minka Date: Sat, 29 Oct 2022 11:22:28 +0200 Subject: [PATCH 3/3] fix don't print error about IMPORT_CONFIG if not defined --- lib/server/bootevent.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/server/bootevent.js b/lib/server/bootevent.js index 013a9e57462..39bc0569ebb 100644 --- a/lib/server/bootevent.js +++ b/lib/server/bootevent.js @@ -72,11 +72,15 @@ function boot (env, language) { var configURL = env.IMPORT_CONFIG || null; var url = require('url'); var href = null; - try { - href = url.parse(configURL).href; - } catch (e) { - console.error('Parsing config URL from IMPORT_CONFIG failed'); + + if (configURL) { + try { + href = url.parse(configURL).href; + } catch (e) { + console.error('Parsing config URL from IMPORT_CONFIG failed'); + } } + if(configURL && href) { var request = require('request'); console.log('Getting settings from', href);