Copium for old Node 18

c228de06a810d1c0ab7294e29cbf2df7ab6bd14d

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -1Showing whitespace changes
src/server-main.js+4 -1
@@ -14,7 +14,6 @@ import multer from 'multer';
14import responseTime from 'response-time';14import responseTime from 'response-time';
15import helmet from 'helmet';15import helmet from 'helmet';
16import bodyParser from 'body-parser';16import bodyParser from 'body-parser';
17import open, { apps } from 'open';
1817
19// local library imports18// local library imports
20import './fetch-patch.js';19import './fetch-patch.js';
@@ -329,6 +328,10 @@ async function postSetupTasks(result) {
329328
330 if (cliArgs.browserLaunchEnabled) {329 if (cliArgs.browserLaunchEnabled) {
331 try {330 try {
331 // TODO: This should be converted to a regular import when support for Node 18 is dropped
332 const openModule = await import('open');
333 const { default: open, apps } = openModule;
334
332 function getBrowsers() {335 function getBrowsers() {
333 const isAndroid = process.platform === 'android';336 const isAndroid = process.platform === 'android';
334 if (isAndroid) {337 if (isAndroid) {