* Switch out needle with node-fetch
* Iterate
* Update asar package and switch to canonical name
* Use ts-node for scripts
* Iterate
* Update yarn.lock
* Use node:stream.promises
* Remove logfile
* Fix types
* Fix types
* Revert back to using libsqlcipher0 for Debian & Ubuntu packages of Element Desktop
Add option to static link for linux instead of forcing it
* Fix linux variants and add CI job
* Fix workflow syntax and add concurrency
* public all the things
* Improve hak & build ia32 again by default
* Test both x86_64 and i686 in CI
* Improve macOS job name
* Try other things
* Iterating this is no fun
* Attempt again
* pwsh is the default, use cmd
* Update the incantation for 2022
* Avoid warning multiple times
* Consolidate build tool setup
* Move default targets to electron-builder and fix warnings
* Convert hak to TypeScript
* Fix linter & remove stray log line
* Fix more linting errors
In one case by switching to import() and hence esnext
* Return type for getNodeModuleBin
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* More types
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Fact: 8 out of 10 native node module packages published to npm are broken.
Actual fact: npm has a library called pacote that handles resolving the
package specifier you put in your dependencies to files on disk, and it's
actually really nice.
Change hak to use that library so now it's much simpler, handles
versions correctly and supports git / github etc. urls so we can
specify dependencies from git when a package author only publishes
half of the package to npm.
This arranges the hak environment target info around target IDs that come from
the builder, which simplifies cross-compiling. The `target.js` module is a
generated copy of the builder's `target.ts`.
A bit hacky, but for now we paste in the JS generated version of the builder's
`target.ts` module. It's quite unlikely to change often, so this is perhaps
enough for now.
The hak environment's `target` is more like a runtime version, so this renames
to call it that, especially since we're about to add more traditional target
strings. `npm_config_target` remains, since that's what `npm` expects.
And also the package.json which, for reasons I'm not going to spend
the next two hours of my life wading through the electron-builder
source to discover, is no longer automatically included after adding
the files pattern. The node_modules folder is handled automatically
though, so is redundant.
Change the output directory structure so we have one directory with
all the built native modules under that we can just add to the files,
rather than having to add each one separately.
NB. electron-builder add its own filters to node_modules so that only
runtime (ie. not devDependencies) are copied. These seem to apply
even for manually specified path within node_modules. We can copy *to*
the node_modules directory, however...