Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

refactor: update to svelte 5#172

Merged
Adamcake merged 10 commits intoAdamcake:masterfrom
natural-stupidity:master
Sep 28, 2025
Merged

refactor: update to svelte 5#172
Adamcake merged 10 commits intoAdamcake:masterfrom
natural-stupidity:master

Conversation

@natural-stupidity
Copy link
Copy Markdown
Contributor

@natural-stupidity natural-stupidity commented Sep 13, 2025

Ref: #85

Note: I'm pretty new to svelte-5 and I'm still figuring stuff out.
It goes without saying - please call me out if I messed anything up. Feedback is really appreciated.
I'll probably edit this PR (and this description) as I go along.

Changes Made

  • Removed .vscode folders and added them to .gitignore files
  • Updated to svelte-5 and other libraries as well
  • Moved svelte modals to Modals folder in components
  • Renamed some util files for consistency

@Adamcake
Copy link
Copy Markdown
Owner

The dist directory being committed is intentional, please don't remove it. Building with bun with all these various dependencies, in a source-based build system like flatpak which doesn't allow internet access after setup, is a big and unnecessary headache.

@natural-stupidity natural-stupidity marked this pull request as ready for review September 20, 2025 19:11
@Adamcake
Copy link
Copy Markdown
Owner

Okay, doesn't work for me I'm afraid. If I'm not logged in to any account then it's fine, but after logging in, or after re-opening the launcher while logged in, I get this:

TypeError: Illegal constructor
    at cl (Dropdown.svelte:37:9)
    at j (TopBar.svelte:58:6)
    at if.js:113:45
    at Hs (runtime.js:292:16)
    at en (runtime.js:472:18)
    at lt (effects.js:126:4)
    at $e (effects.js:389:9)
    at h (if.js:113:32)
    at c (if.js:48:3)
    at TopBar.svelte:57:28

Dropdown.svelte:37 is the </script> tag, so I guess it's complaining about the internal construction of this Dropdown type, but it doesn't seem to give any more specific info than that.

@Adamcake
Copy link
Copy Markdown
Owner

Adamcake commented Sep 22, 2025

That was after running bun run minify by the way, it looks like the one you've committed is a dev build? But just mentioning that in case it's relevant.

@natural-stupidity
Copy link
Copy Markdown
Contributor Author

TypeError: Illegal constructor

Ah, sorry about that. It should be fixed now, but definitely let me know if you run into anything else

@Adamcake
Copy link
Copy Markdown
Owner

Thanks - looks about right now. I only noticed one odd detail, which is, when adding a new plugin in the RS3 plugin menu, the drop-down list of plugins doesn't update anymore until the menu is closed and re-opened. The new plugin becomes the active one, as expected, but it's not available in the drop-down list.

I can't immediately see why that is, as the only change you made to that drop-down was on:change -> onchange. Unless there's something preventing it from being subscribed to changes in bolt.pluginConfig now?

In case you need plugins for testing, here are a few URLs you can enter in the "add from URL" box.
https://raw.githubusercontent.com/Adamcake/bolt-alerts/refs/heads/master/meta.json
https://raw.githubusercontent.com/Adamcake/bolt-devplugin/refs/heads/master/meta.json
https://codeberg.org/JasperSurmont/bolt-xptracker/raw/branch/master/meta.json

@natural-stupidity
Copy link
Copy Markdown
Contributor Author

natural-stupidity commented Sep 24, 2025

Should be updated now to refresh after importing or adding plugins.

I ran into an issue with the "Browse config" button in the plugin modal. Whenever I click it, I get a file / folder not found error. I tested it on the flatpak version too, and the button doesn't seem to do anything on my end.

@Adamcake
Copy link
Copy Markdown
Owner

From memory, I don't think that a plugin would have a config directory until the first time it's launched, or possibly even until it attempts to save a config file, so I wouldn't worry about that.

@Adamcake
Copy link
Copy Markdown
Owner

Okay, one last thing before I'll merge this. After your version bumps, eslint (script: bun run lint) is now printing a compatibility warning. So does that need to be bumped as well?


WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.7.4 <5.5.0

YOUR TYPESCRIPT VERSION: 5.9.2

Please only submit bug reports when using the officially supported version.

=============```

@natural-stupidity
Copy link
Copy Markdown
Contributor Author

So does that need to be bumped as well?

Yeah, I saw that earlier, but neglected to update, so I went back and did it (00dd370). The only thing I had to change was an eslint rule about ignoring unused variables in catch blocks. It should be good now

@Adamcake Adamcake merged commit 9ecb562 into Adamcake:master Sep 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants