electron / osx-sign

Codesign Electron macOS apps
BSD 2-Clause "Simplified" License
565 stars 96 forks source link

refactor: rewrite in API compatible typescript #250

Closed MarshallOfSound closed 2 years ago

MarshallOfSound commented 2 years ago

This rewrites the osx-sign module into typescript whilst maintaining API compatibility. Once we have this foundation it will be much easier to make the breaking API changes required to bring osx-sign in line with the requirements of modern Electron apps.

There are a lot of changes that need to be made based on learnings from the last few years with the desired end state being an electron-osx-sign that does Just Work ™️ on the latest macOS and latest Electron without any user intervention or configuration.

This will still be a breaking change because we bumped node version requirements from 4 to 12

malept commented 2 years ago

I will try to get a review of this code in this week, but in the meantime:

Over a year ago I made similar changes (except for the TypeScript conversion) but I didn't file a PR mostly because I wasn't confident that I didn't break something due to the lack of tests. Here's the branch: malept/refactor/modernize

Of note, I got rid of Bluebird and possibly got rid of flatList (because it was unused?)

MarshallOfSound commented 2 years ago

@malept This PR also removes bluebird, I just forgot to remove it from "dependencies" 😆

flatList is still used in a bunch of places. I could replace with .flat and a nullish value removed but the helper works and doesn't hurt anyone to exist at the moment. I've got quite a few more refactored planend after this that will result in a major API change. So I'm not concerned with changing node version requirements changing. This is just a modernization with the same public facing API. The next step will be to change some internals and some of the public facing API too