Releases: JCMais/node-libcurl
Releases · JCMais/node-libcurl
v5.0.2
v5.0.1
Fixed
- Building from source on macOS would not work properly.
v5.0.0
Breaking Change
- The prebuilt binary is now built with libcurl 8.17.0. Every breaking change introduced by libcurl 8 is also a breaking change for this version.
Version: libcurl/8.17.0 OpenSSL/3.5.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.1.1 libssh2/1.10.0 nghttp2/1.66.0 ngtcp2/1.17.0 nghttp3/1.12.0 OpenLDAP/2.6.9 Protocols: dict, file, ftp, ftps, gopher, gophers, http, https, imap, imaps, ldap, ldaps, mqtt, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp, ws, wss Features: AsynchDNS, IDN, IPv6, Largefile, NTLM, SSL, libz, brotli, TLS-SRP, HTTP2, UnixSockets, HTTPS-proxy, alt-svc - Minimum supported Electron version is now Electron v38.0.0 (moving forward prebuilt binaries will only be available for the latest 2 versions of Electron).
- Mininum supported libcurl version is now libcurl 7.81.0.
- Windows 32-bit support is now dropped.
- Minimum supported versions:
- Node.js >= v22.20.0 (which bundles OpenSSL 3.5.2).
- Electron >= v38.0.0.
- libcurl >= v7.81.0.
- Ubuntu >= v22.04.
- Alpine >= 3.21
- C++ compilers supporting c++20
- The
FileInfoobject properties are now all in lowercase, to follow the libcurl struct more closely. - Errors thrown by the addon are now instances of one of the following classes:
CurlEasyErrorCurlMultiErrorCurlSharedError
These classes extends theCurlErrorclass. Previously the addon used to throw only native Javascript errors, such asError,TypeError, etc.
The curly related errors also inherit from theCurlErrorclass, and do not have aisCurlErrorproperty anymore.
Any caught error thrown from user callbacks will be added as thecauseproperty of the error.
- Every Easy handle is now initialized with default CA certificates from Node.js's tls module, by using the result of the
getCACertificatesfunction. This is done usingCURLOPT_CAINFO_BLOB. This is a breaking change if you were passing custom CA certificates before usingCAINFO, asCURLOPT_CAINFO_BLOBtakes priority over it. If that is the case, you can avoid the default behavior by callingsetOpt("CAINFO_BLOB", null)on the Easy handle. The TLS certificate is loaded into memory only once for each JavaScript context. HSTSREADFUNCTIONcallback now receives an object with themaxHostLengthBytesproperty, which is the maximum length of the host name that can be returned by the callback.- The minimum macOS version is now Sonoma (13)
Curl.globalCleanupis a no-op now. The addon will automatically callcurl_global_cleanupwhen the process exits. This method will be removed in a future major version.Curl.globalInitis a no-op now. The addon will automatically callcurl_global_initwhen the process starts. This method will be removed in a future major version.
Fixed
CurlHttpVersion.V3not being set to the proper value (was not set to30)
Added
- Prebuilt binaries have HTTP/3 support enabled across all platforms. This is supported by licurl when building with OpenSSL >= 3.5 and nghttp3 >= 1.66. To use OpenSSL >= 3.5 a Node.js version >= 22.20.0 is required.
- The addon has been rewritten to use N-API, which will streamline the process of supporting newer Node.js versions in the future.
- The addon is now worker threads safe. See
examples/22-worker-threads.jsfor usage example. - Added native WebSocket support (requires libcurl >= 7.86.0):
Easy.wsRecv(buffer)- Receive WebSocket frames with metadataEasy.wsSend(buffer, flags, fragsize?)- Send WebSocket frames (text, binary, ping, pong, close)Easy.wsMeta()- Get WebSocket frame metadataCurlWsenum for WebSocket frame flags (Text, Binary, Close, Ping, Pong, Cont, Offset)CurlWsOptionsenum for WebSocket options (RawMode, NoAutoPong)CurlWsFrameinterface for frame metadata (age, flags, offset, bytesleft, len)- Support for
CONNECT_ONLYmode with value 2 for WebSocket connections - See
examples/21-websockets-native.jsfor usage example
- Added MIME API support for multipart form data (replaces deprecated HTTPPOST):
CurlMimeclass for creating multipart MIME structuresCurlMimePartclass for individual MIME partsCurlMimeOptenum for MIME options (FormEscape)- Added
CURLOPT_MIME_OPTIONSandCURLOPT_MIMEPOSToptions Easy.setMimePost(mime),Curl.setMimePost(mime), andcurlyMimePostalternatives for setting MIME data in a structured way.- See
examples/23-mime-post-easy.jsfor usage example
- Added SSH host key verification support (requires libcurl >= 7.84.0):
CURLOPT_SSH_HOSTKEYFUNCTIONcallback for custom host key verificationCURLOPT_SSH_HOST_PUBLIC_KEY_SHA256option for SHA256 fingerprint verificationCurlSshKeyTypeenum for SSH host key types (Unknown, Rsa, Dss, Ecdsa, Ed25519)CurlSshKeyMatchenum for SSH host key verification results (Ok, Mismatch)
- Added HTTP/2 stream priority support:
CURLOPT_STREAM_DEPENDS- Set stream dependencyCURLOPT_STREAM_DEPENDS_E- Set stream dependency (exclusive)CURLOPT_STREAM_WEIGHT- Set stream weight for resource allocation
- Added
CURLOPT_INTERLEAVEFUNCTIONcallback for handling RTSP interleaved data - Added new
Multi.performmethod for addingEasyinstances to aMultiinstance. This will eventually replace theMulti.addHandleandMulti.onMessagemethods, which are now deprecated. - Added the following new enums:
CurlFollowCurlMultiNetworkChangedCurlWsCurlWsOptions
- Added following enum members:
CurlWriteFunc.AbortCurlShareLock.DataShareCurlHttpVersion.V3OnlyCurlProxy.Https2CurlCode.CURLE_UNRECOVERABLE_POLLCurlCode.CURLE_TOO_LARGECurlCode.CURLE_ECH_REQUIREDCurlSslOpt.Earlydata
- Added support for the following extra easy options:
- https://curl.se/libcurl/c/CURLOPT_CA_CACHE_TIMEOUT.html
- https://curl.se/libcurl/c/CURLOPT_MAIL_RCPT_ALLOWFAILS.html
- https://curl.se/libcurl/c/CURLOPT_HAPROXY_CLIENT_IP.html
- https://curl.se/libcurl/c/CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.html
- https://curl.se/libcurl/c/CURLOPT_ECH.html
- https://curl.se/libcurl/c/CURLOPT_TCP_KEEPCNT.html
- https://curl.se/libcurl/c/CURLOPT_UPLOAD_FLAGS.html
- https://curl.se/libcurl/c/CURLOPT_SSL_SIGNATURE_ALGORITHMS.html
- Added following info options:
- https://curl.se/libcurl/c/CURLINFO_CONN_ID.html
- https://curl.se/libcurl/c/CURLINFO_XFER_ID.html
- https://curl.se/libcurl/c/CURLINFO_QUEUE_TIME_T.html
- https://curl.se/libcurl/c/CURLINFO_USED_PROXY.html
- https://curl.se/libcurl/c/CURLINFO_POSTTRANSFER_TIME_T.html
- https://curl.se/libcurl/c/CURLINFO_EARLYDATA_SENT_T.html
- https://curl.se/libcurl/c/CURLINFO_PROXYAUTH_USED.html
- https://curl.se/libcurl/c/CURLINFO_HTTPAUTH_USED.html
- Added the following multi options:
- Added
Curl.id,Easy.id,Multi.id, andShare.idproperties, which return the unique ID of each instance. The value is unique across threads. - There are build attestations for the prebuilt binaries now, which can be used to verify the authenticity of the binaries.
v5.0.0-4
5.0.0-4
v5.0.0-3
5.0.0-3
v5.0.0-2
v5.0.0-1
v5.0.0-0
pre-release with migration to n-api
v4.1.0
Fixed
- curly - use default content-type when there are no headers #410 by @liamdiprose
Added
- Added prebuilt binaries for Node.js 22, Electron 33, Electron 32, and Electron 31
Notes
Besides possible security patches, this will be the last minor release in the v4 series. For v5, I am currently planning to work on this:
- Migrate to N-API. This will allow us to support newer Node.js versions more easily.
- Drop support for Node.js < 22.
- Drop support for building with libcurl < 8.0.
- Drop x86 support.
- Support ES modules.