Modernize download and bundle scripts#217
Conversation
|
There's a follow-up piece to fix up some of the deps declarations (many of them should just be dev deps instead of direct deps), which should significantly help the install footprint of this module :) |
Looking at the graph, I can only agree. Especially when you now that typescript is used only as a typechecker, i.e. we do not even use it to compile the final JS file. Thanks a lot for this first PR already, looking forward for the next one ^^ |
|
Any updates on being able to merge this? I have a branch ready for the follow-up I mentioned but it's stacked on this branch and GitHub doesn't seem to allow stacking PRs coming from a fork 😅 Can do the work to isolate it if preferable. |
|
Thank you for the ping, I was waiting for other reviewers input but looks like it is not coming, so I will merge this to unblock you, and they can always comment in the aftermath. |
I don't think this gets things any closer to Windows support. From what I gather, there would need to be a couple of updates to these scripts, mainly:
Can definitely look into getting that working when I find time though! I do have a Windows machine to work with and like the person who created the issue, my main interest in libzim was exploring usage for it in an Electron-based application 😄 |
Updates the download and bundle scripts to make use of Node built-ins instead of various dependencies. These changes are based on my own experience with modernizing Node code, as well as knowledge obtained through efforts like https://e18e.dev/ (especially https://e18e.dev/docs/replacements/).
Behavior and outputs should generally stay the same. The only notable difference will be slightly more verbose logs due to the usage of absolute paths instead of relative paths. I also made sure to check that the used built-in APIs align with the supported versions stated in the package.json (
>=22 <27)