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
Typescript rewrite #22
Conversation
Go fully typed, and get rid of mutable things. In particular - turn the provider from a class into a object, - pass all things as parameters, - evaluate settings on the fly, - mutate no globals other than the registered provider. Search prefix is gone; I have no use for it, and figured it wasn't worth porting over.
gnome-extensions pack automatically builds the schema
Note that there are still a few todos, so this PR is preliminary. Sorry, forgot to open it as a draft. |
Awesome - I have added you as a collaborator on this repo. It is of course up to you whether you want to use your fork or this, but I am still keeping in touch with what is going on here, and will be happy to look through PRs. |
@Jomik Thanks a lot for inviting me :) I'll use this repo then, and delete my fork once this PR is merged. For the time being I'll continue making PRs, and won't push to I'm not sure we can push to Gnome Extensions from CI; the new |
GitHub actions can run pretty much any docker container, so if there is a way to publish using something in a new gnome, then we should be able to spin up a recent GNOME instance. |
That's the only thing I tested with, and I'm not sure how far back ES6 support really goes.
First things first, I think this PR is ready for review. I bumped them minimum shell version to 3.34 (most recent release), because that's what I tested with on Arch. I guess it also works with earlier versions (I'd bet 3.32 at least), but this pull request uses ES6 features (e.g. arrow functions, which I'd not like to miss to be honest 😇 ) and I'm not sure how far back ES6 actually goes in terms of GJS.
I don't think there is, at least not with the standard tools. Perhaps there's some 3rd party solution, but I don't think so. I guess we've got to ask the Gnome shell maintainers about this one, but if there's no solution it could be years until one exists 🤷♂️ I can setup a Github workflow for type checking, linting and format checking; I did that for my other Gnome shell extension, so I can just copy the file over :) |
I asked about publishing from command line or CI in https://gitlab.gnome.org/GNOME/gnome-shell/issues/1922. Let's see what answer we'll get. |
Reduces nesting :)
LGTM |
Thanks 🙏. I’ll merge this PR then? Concerning publishing, looks like there is really no way to publish from CLI. |
Yes merge :D |
Alright I’ll see if I can do that! |
A second PR, which essentially amounts to a rewrite in Typescript, which adds strong typing, linting with eslint, and uses close to no mutable state. It also prepares for reading VSCode settings asynchronously, to avoid blocking the entire shell of file system access is slow.
It also removes a few features which I don't use personally and didn't consider worth porting:
code
executable anymore.I'm sorry for throwing such a big chance at you, but since you said in the other PR that you don't really maintain this anymore, I wanted to pick it up in a way that I can maintain it myself now.
I'm totally fine if you don't want merge it; as said, I don't really need it published and can just keep using my own fork :) However, my offer stands to take this extension over, and continue to maintain it :)