From cdaaceade75efa25d0ebdda410eb6e85fd6706bf Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Tue, 11 Feb 2025 21:53:37 +1100 Subject: [PATCH 1/2] fix: vite hanging after completing builds --- lib/closePlugin.ts | 25 +++++++++++++++++++++++++ vite.config.ts | 8 +++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 lib/closePlugin.ts diff --git a/lib/closePlugin.ts b/lib/closePlugin.ts new file mode 100644 index 00000000..fe864ae2 --- /dev/null +++ b/lib/closePlugin.ts @@ -0,0 +1,25 @@ +// ref: https://stackoverflow.com/a/76920975 +import type { Plugin } from 'vite'; + +export default function ClosePlugin(): Plugin { + return { + name: 'ClosePlugin', // required, will show up in warnings and errors + + // use this to catch errors when building + buildEnd(error) { + if(error) { + console.error('Error bundling') + console.error(error) + process.exit(1) + } else { + console.log('Build ended') + } + }, + + // use this to catch the end of a build without errors + closeBundle() { + console.log('Bundle closed') + process.exit(0) + }, + } +} diff --git a/vite.config.ts b/vite.config.ts index 85657276..51bc6f77 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,6 +4,7 @@ import { join, resolve } from 'path'; import { updateManifestPlugin } from './lib/patchPackage'; import { base64Loader } from './lib/base64loader'; import type { BuildTarget } from './lib/types'; +import ClosePlugin from './lib/closePlugin'; import react from '@vitejs/plugin-react'; import million from "million/compiler"; @@ -25,7 +26,7 @@ const targets: BuildTarget[] = [ const mode = process.env.MODE || 'chrome'; -export default defineConfig({ +export default defineConfig(({ command }) => ({ plugins: [ base64Loader, react(), @@ -38,7 +39,8 @@ export default defineConfig({ manifest: targets.find(t => t.browser === mode.toLowerCase())?.manifest ?? chrome.manifest, browser: mode.toLowerCase() === "firefox" ? "firefox" : "chrome" }), - updateManifestPlugin() + updateManifestPlugin(), + ...(command === 'build' ? [ClosePlugin()] : []) ], root: resolve(__dirname, './src'), resolve: { @@ -78,4 +80,4 @@ export default defineConfig({ } } } -}); \ No newline at end of file +})); \ No newline at end of file From 178c4fdef4fac0fec0f5cf74064d192a23f0af57 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Tue, 11 Feb 2025 22:02:01 +1100 Subject: [PATCH 2/2] feat: update changelog --- src/SEQTA.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/SEQTA.ts b/src/SEQTA.ts index 027e6d87..bd0df772 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -164,6 +164,17 @@ export function OpenWhatsNewPopup() { let text = stringToHTML( /* html */ `
+ +

3.4.4 - Bug Fixes and Improvements

+
  • Removed broken gradients on the backgrounds of certain buttons
  • +
  • Fixed timetable quickbar arrow receiving the wrong colour
  • +
  • Auto-applied selected theme after saving in theme creator
  • +
  • Fixed a bug where timetable was clipped at certain times
  • +
  • Improved spacing of the message editor buttons
  • +
  • Added HEX colour input to the theme creator
  • +
  • Fixed theme application in the creator
  • +
  • Performance improvements
  • +
  • Other minor bug fixes
  • 3.4.3 - Minor Bug Fixes

  • Fixed a bug where timetable colours couldn't be changed