Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Revert "update deps and formaitng, switch to electron-builder-config.ts"
Browse files Browse the repository at this point in the history
This reverts commit 243d229.
  • Loading branch information
Lunarequest committed Apr 30, 2024
1 parent 90b5c14 commit 74ef07f
Show file tree
Hide file tree
Showing 190 changed files with 546 additions and 788 deletions.
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11
3.12
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/depd-npm-2.0.0-b6c51a4b43-c0c8ff3607.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/glob-npm-8.1.0-65f64af8b1-9aab1c75eb.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/has-npm-1.0.3-b7f00631c1-a449f3185b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ip-npm-2.0.0-204facb3cc-1270b11e53.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/keyv-npm-4.5.2-78a8ba8062-fbe6068cb4.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ms-npm-2.1.3-81ff3cfac1-aa92de6080.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/nopt-npm-6.0.0-5ea8050815-3c1128e07c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/sax-npm-1.2.4-178f05f12f-09b79ff6dc.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/tar-npm-6.1.15-44c3e71720-4848b92da8.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
14 changes: 1 addition & 13 deletions app/main/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* eslint no-unused-vars: [ "error", { "argsIgnorePattern": "^_" } ] */
import {
app,
BrowserWindow,
Expand Down Expand Up @@ -183,19 +184,6 @@ function createWindow(

win.webContents.removeAllListeners("did-finish-load");
win.webContents.once("did-finish-load", () => {
const date = new Date();
const currentYear = date.getFullYear();
const startDate = new Date(currentYear, 10, 13);
const endDate = new Date(currentYear, 10, 19);

if (date >= startDate && date <= endDate) {
console.log(NOTIFICATION_BODY);
new Notification({
title: NOTIFICATION_TITLE,
body: NOTIFICATION_BODY,
}).show();
}

// avoid race condition
if (DEBUG) {
win.webContents.openDevTools();
Expand Down
17 changes: 10 additions & 7 deletions electron-builder-config.ts → electron-builder-config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import path from "node:path";
import builder from "electron-builder";
import { flipFuses, FuseVersion, FuseV1Options } from "@electron/fuses";
const path = require("node:path");
const builder = require("electron-builder");
const { flipFuses, FuseVersion, FuseV1Options } = require("@electron/fuses");

const config: builder.Configuration = {
/** @type electron-builder.Configuration */
const config = {
appId: "io.github.lunarequest.NightPDF",
productName: "NightPDF",
files: [
Expand Down Expand Up @@ -118,7 +119,8 @@ const config: builder.Configuration = {
dmg: {
sign: false,
},
afterPack: async (context: builder.AfterPackContext) => {
/** @param {builder.AfterPackContext} context */
afterPack: async (context) => {
await addElectronFuses(context);
},
};
Expand All @@ -128,7 +130,8 @@ if (process.env.OUTPUTDIR === "1") {
config.linux.target = ["dir"];
}
}
async function addElectronFuses(context: builder.AfterPackContext) {
/** @param {builder.AfterPackContext} context */
async function addElectronFuses(context) {
const {
appOutDir,
packager: { appInfo },
Expand Down Expand Up @@ -160,4 +163,4 @@ async function addElectronFuses(context: builder.AfterPackContext) {
});
}

export default config;
module.exports = config;
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"typecheck": "tsc --noEmit",
"build": "rimraf out && tsx ./build.mts",
"dev": "yarn typecheck && yarn build && DEBUG=1 electron .",
"dist": "NODE_ENV='production' NODE_OPTIONS='--max-old-space-size=4096' yarn build && NODE_ENV='production' NODE_OPTIONS='--max-old-space-size=4096' electron-builder --config electron-builder-config.ts",
"dist": "NODE_ENV='production' NODE_OPTIONS='--max-old-space-size=4096' yarn build && NODE_ENV='production' NODE_OPTIONS='--max-old-space-size=4096' electron-builder --config electron-builder-config.js",
"lint": "biome check .",
"format": "biome format . --write",
"ci": "yarn typecheck && biome ci .",
"ci": "biome ci .",
"pre-commit": "yarn ci",
"postinstall": "husky install",
"prepack": "pinst --disable",
Expand Down Expand Up @@ -53,12 +53,12 @@
"typescript": "^5.4.5"
},
"dependencies": {
"electron-log": "^5.1.2",
"electron-store": "^8.2.0",
"electron-log": "^5.1.1",
"electron-store": "^8.1.0",
"electron-tabs": "^1.0.4",
"electron-updater": "6.2.1",
"electron-updater": "6.1.9",
"json-schema-typed": "8.0.1",
"nouislider": "^15.7.1",
"yargs": "^17.7.2"
}
}
}
Loading

0 comments on commit 74ef07f

Please sign in to comment.