deps: bump node-libcurl to latest prerelease version #2150
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is related to the following issue:
#997
And should unblock this:
#1847
Some code is based on the previous PR: #1528
Some notes:
Prebuilt binary
node-libcurl
has been providing prebuilt binaries for Electron, however the current non-prerelease version,2.1.1
, does not provide binaries for Electronv3
. I've added it back starting with2.1.2-1
.Right now Insomnia is not using the prebuilt binaries, because the project uses
electron-rebuild
and it does not supportnode-pre-gyp
, I've opened an issue there about adding support: electron/rebuild#367If support is not added the prebuilt binaries can still be used by changing the
bootstrap
script on the rootpackage.json
to the following:And removing the
electron-rebuild
call from theinsomnia-app
bootstrap
script.This would simplify Insomnia build as there would be no need to build the native dependencies from source anymore. For the scripts used to build libcurl and their dependencies for
node-libcurl
itself, see this directory: https://github.com/JCMais/node-libcurl/tree/develop/scripts/ciIf Insomnia still needs to have control over the libcurl build, those environment variables:
insomnia/.github/workflows/release-core.yml
Line 49 in 8162772
insomnia/.github/workflows/release-designer.yml
Line 49 in 8162772
Must be changed to
npm_config_curl_static_build: true
, which is the environment variable that would cause the following gyp variable to becometrue
: https://github.com/JCMais/node-libcurl/blob/9aa421d2f39306a6e42afe84afe528164edd44c3/binding.gyp#L11Curl.getVersionInfoString
Curl
class now has a new static methodgetVersionInfoString
, which returns more information thangetVersion
, it should be almost identical to the output ofcurl -V
:getVersion
:getVersionInfoString
:Just to not introduce that many changes, I've kept the current implementation of the wrapper to use
getVersion
.Test
actuallySend() › sends a generic request
This test was missing the
HTTPAUTH
option before, don't know why.Uncommited files not ignored
After running the project those files were generated:
And they are not on
.gitignore
list, should they be added?