Skip to content

Commit a3a0537

Browse files
authored
fix: Bump runtime dependencies and upgrade ESLint to v10 (#9834)
- electron: 41.0.2 → 41.2.0 - eslint: ^9.39.2 → ^10.2.0 - axios: ^1.13.5 → ^1.15.0 - electron-context-menu: ^4.1.0 → ^4.1.2 - Added @eslint/js and globals as explicit devDependencies (required by ESLint 10) - Fixed no-useless-assignment lint errors in downloader.js and misc.js
1 parent 9a76ed8 commit a3a0537

File tree

5 files changed

+128
-259
lines changed

5 files changed

+128
-259
lines changed

runtime/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
},
1313
"packageManager": "yarn@4.9.2",
1414
"devDependencies": {
15-
"electron": "41.0.2",
16-
"eslint": "^9.39.2",
17-
"eslint-plugin-unused-imports": "^4.4.1"
15+
"@eslint/js": "^10.0.1",
16+
"electron": "41.2.0",
17+
"eslint": "^10.2.0",
18+
"eslint-plugin-unused-imports": "^4.4.1",
19+
"globals": "^17.4.0"
1820
},
1921
"dependencies": {
20-
"axios": "^1.13.5",
21-
"electron-context-menu": "^4.1.0",
22+
"axios": "^1.15.0",
23+
"electron-context-menu": "^4.1.2",
2224
"electron-store": "^11.0.2"
2325
}
2426
}

runtime/src/js/downloader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function updateProgress(callerWindow) {
4747
return;
4848
}
4949
setBadge(Object.keys(downloadQueue).length);
50-
let progress = 0;
50+
let progress;
5151
if(Object.values(downloadQueue).some((item) => item.total === null)) {
5252
// If any of the items in the queue does not have a total, we cannot calculate progress
5353
// so we return 2 to indicate that the progress is indeterminate.

runtime/src/js/misc.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,13 @@ const serverLogFile = path.join(getLocalAppDataPath(), 'pgadmin4.' + (new Date()
100100

101101
// This function is used to read the file and return the content
102102
export const readServerLog = () => {
103-
let data = null;
104-
105103
if (fs.existsSync(serverLogFile)) {
106-
data = fs.readFileSync(serverLogFile, 'utf8');
107-
} else {
108-
let errMsg = 'Unable to read file ' + serverLogFile + '.';
109-
console.warn(errMsg);
110-
return errMsg;
104+
return fs.readFileSync(serverLogFile, 'utf8');
111105
}
112106

113-
return data;
107+
let errMsg = 'Unable to read file ' + serverLogFile + '.';
108+
console.warn(errMsg);
109+
return errMsg;
114110
};
115111

116112
// This function is used to write the data into the log file

0 commit comments

Comments
 (0)