Change node version
Is it possible to manually edit which version of node I'd use? If I use the command -t node-latest-win-x64 it downloads node 9.2.1 but the latest version is 9.5.0. Is there a possibility that I manually edit which version it downloads from https://nodejs.org/download/release/latest/ or do you need to update pkg itself
+1
+1
+1. I am interested how to do it.
+1. This is particularly important when there is a security fix released in a new version of Node.js and we want to update asap.
Thanks.
Hello @igorklopov , can you help us to reference the very latest version of Node.js to build up the packages? What are the steps? Thank you.
In case people are not aware, this is caused by a fundamental architecture decision of pkg.
pkg delegates the downloading/building of Node binaries to pkg-fetch, which pulls the closest matched runtimes from pkg-fetch releases and not from an official Node.js source.
This means that pkg-fetch will have to be updated with a new release before new versions of Node are available, and it means that users of pkg will have to trust the Node runtimes uploaded by zeit.
@igorklopov please correct me if I'm wrong. I'm investigating the use of pkg for use in our internal CI, and this is kind of a deal breaker.
Looking a little further, if you choose to build Node from source, you can bypass the whole trust issue, as pkg-fetch will grab the source from the Node GitHub repo, but it still maps to a predefined list of Node versions. Which means you’ll need to wait on an update to pkg-fetch before you can get newer versions of Node.
It would be nice If we could provide an exact semver and grab the runtimes from Node’s own site.
@denistn Agreed! This is critical to have for security.
Looks like pkg-fetch was built mainly for use in pkg. What may be the reason to maintain node binaries separately ? Is the binary maintained by pkg-fetch different from the official node binaries in some way ?
I am also interested to have a workaround to build node binaries from specified source versions for use in pkg.
@adamkl is right. with pkg we can't expose this option as we build node from source and modify it with patches. either you can build your own node or use what pkg provides. we are working on making upgrades more frequent and easier