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

app: Dependency updates #2142

Merged
merged 26 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
427de32
app: Bump mkdirp 3.0.1 from 1.0.4
illume Jul 6, 2024
e6860cf
app: Bump tar from 6.1.13 to 7.4.0
illume Jul 6, 2024
c17e76a
app: Remove unused @types/semver
illume Jul 15, 2024
3fd716a
app: Bump dotenv 16.0.1 to 16.4.5
illume Jul 15, 2024
e5e5e50
app: frontend: Add app/tsconfig.json to formatted file list
illume Jul 15, 2024
964dab3
app: Bump jest from 27.4.7 to 29.7.0
illume Jul 15, 2024
5d3f380
app: Remove open dep, use builtin openExternal
illume Jul 15, 2024
7f236f9
app: Bump yargs 16.2.0 to 17.7.2
illume Jul 15, 2024
1223f3b
app: Bump i18next to 23.12.1 and i18next-fs-backend to 2.3.1
illume Jul 15, 2024
b0b26cc
app: Bump i18next-parser 7.7.0 to 9.0.0
illume Jul 15, 2024
1f9b506
app: Remove electron-log dependency
illume Jul 15, 2024
67eaf78
app: Bump electron 30.0.6 to 31.2.0
illume Jul 15, 2024
59db438
app: Remove fs-extra dependency
illume Jul 15, 2024
bb02be8
app: Bump electron-wix-msi 4.0.0 to 5.1.3
illume Jul 15, 2024
6548e0c
app: Bump @electron/notarize 2.1.0 to 2.3.2
illume Jul 15, 2024
3b8d4a1
app: Bump @babel/* deps
illume Jul 15, 2024
e4f66d1
app: Bump typescript 4.5.5 to 5.5.3
illume Jul 15, 2024
f99233e
app: tsconfig: Bump target from "es6" to "2023"
illume Jul 15, 2024
4a12e82
app: Remove regenerator-runtime dependency
illume Jul 15, 2024
27c96b9
app: Bump octokit 2.1.0 to 4.0.2
illume Jul 15, 2024
caee63b
app/scripts/push-release-assets: Update for new octokit
illume Jul 15, 2024
f85b127
app: winget-create: Remove node-fetch import
illume Jul 15, 2024
ac24703
plugins: plugin-management: Remove node-fetch import
illume Jul 15, 2024
c39196d
app: Add node and npm minimum requirements
illume Jul 18, 2024
59844c9
app: Fix babelrc to target node 20
illume Jul 18, 2024
855c279
app: Add plugin-management and convert to ts
illume Jul 18, 2024
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
11 changes: 9 additions & 2 deletions app/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"presets": ["@babel/preset-env", "@babel/preset-typescript"],
"plugins": []
"presets": [
["@babel/preset-env", {
"targets": {
"node": "20"
}
}],
"@babel/preset-typescript"
],
"plugins": []
}
3 changes: 2 additions & 1 deletion app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
/electron/i18n-helper.js
/electron/preload.js
/electron/windowSize.js
electron/windowSize.test.js
/electron/plugin-management.js
electron/windowSize.test.js
34 changes: 14 additions & 20 deletions app/electron/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime';
import { ChildProcessWithoutNullStreams, execSync, spawn } from 'child_process';
import { randomBytes } from 'crypto';
import dotenv from 'dotenv';
Expand All @@ -14,18 +13,16 @@ import {
shell,
} from 'electron';
import { IpcMainEvent, MenuItemConstructorOptions } from 'electron/main';
import log from 'electron-log';
import find_process from 'find-process';
import fs from 'fs';
import { spawnSync } from 'node:child_process';
import fs from 'node:fs';
import { userInfo } from 'node:os';
import open from 'open';
import { platform } from 'os';
import path from 'path';
import url from 'url';
import yargs from 'yargs';
import PluginManager from '../../plugins/headlamp-plugin/plugin-management/plugin-management';
import i18n from './i18next.config';
import { PluginManager } from './plugin-management';
import windowSize from './windowSize';

dotenv.config({ path: path.join(process.resourcesPath, '.env') });
Expand Down Expand Up @@ -522,12 +519,12 @@ let serverProcessQuit: boolean;

function quitServerProcess() {
if ((!serverProcess || serverProcessQuit) && process.platform !== 'win32') {
log.error('server process already not running');
console.error('server process already not running');
return;
}

intentionalQuit = true;
log.info('stopping server process...');
console.info('stopping server process...');

if (!serverProcess) {
return;
Expand Down Expand Up @@ -939,8 +936,7 @@ function killProcess(pid: number) {
}

function startElecron() {
log.transports.file.level = 'info';
log.info('App starting...');
console.info('App starting...');

let appVersion: string;
if (isDev && process.env.HEADLAMP_APP_VERSION) {
Expand Down Expand Up @@ -1246,13 +1242,13 @@ function startElecron() {
}

if (disableGPU) {
log.info('Disabling GPU hardware acceleration. Reason: related flag is set.');
console.info('Disabling GPU hardware acceleration. Reason: related flag is set.');
} else if (
disableGPU === undefined &&
process.platform === 'linux' &&
['arm', 'arm64'].includes(process.arch)
) {
log.info(
consolg.info(
'Disabling GPU hardware acceleration. Reason: known graphical issues in Linux on ARM (use --disable-gpu=false to force it if needed).'
);
disableGPU = true;
Expand Down Expand Up @@ -1287,27 +1283,27 @@ app.on('quit', quitServerProcess);
*/
function attachServerEventHandlers(serverProcess: ChildProcessWithoutNullStreams) {
serverProcess.on('error', err => {
log.error(`server process failed to start: ${err}`);
console.error(`server process failed to start: ${err}`);
});
serverProcess.stdout.on('data', data => {
log.info(`server process stdout: ${data}`);
console.info(`server process stdout: ${data}`);
});
serverProcess.stderr.on('data', data => {
const sterrMessage = `server process stderr: ${data}`;
if (data && data.indexOf && data.indexOf('Requesting') !== -1) {
// The server prints out urls it's getting, which aren't errors.
log.info(sterrMessage);
console.info(sterrMessage);
} else {
log.error(sterrMessage);
console.error(sterrMessage);
}
});
serverProcess.on('close', (code, signal) => {
const closeMessage = `server process process exited with code:${code} signal:${signal}`;
if (!intentionalQuit) {
// @todo: message mainWindow, or loadURL to an error url?
log.error(closeMessage);
console.error(closeMessage);
} else {
log.info(closeMessage);
console.info(closeMessage);
}
serverProcessQuit = true;
});
Expand All @@ -1316,9 +1312,7 @@ function attachServerEventHandlers(serverProcess: ChildProcessWithoutNullStreams
if (isHeadlessMode) {
serverProcess = startServer(['-html-static-dir', path.join(process.resourcesPath, './frontend')]);
attachServerEventHandlers(serverProcess);
(async () => {
await open(`http://localhost:${defaultPort}`);
})();
shell.openExternal(`http://localhost:${defaultPort}`);
} else {
startElecron();
}
Loading
Loading