Skip to content

Latest commit

 

History

History
577 lines (500 loc) · 37.2 KB

File metadata and controls

577 lines (500 loc) · 37.2 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Breaking Change

Fixed

Added

Changed

5.1.2 - 2026-06-08

Fixed

  • Fixed Windows source builds against Node.js 26 failing with LINK : fatal error LNK1117: syntax error in option 'opt:lldltojobs=2'. Node 26 was built with clang-cl + lld + ThinLTO (PR nodejs/node#63114, released in v26.3.0), and node-gyp's create-config-gypi.js seeds the addon's config.gypi from process.config of the running Node binary — picking up enable_thin_lto: true and lto_jobs: <n> from how Node itself was built. Node's installed common.gypi then unconditionally appends -flto=thin to MSVC cl.exe's AdditionalOptions and /opt:lldltojobs=<n> to link.exe's. MSVC ignores -flto=thin (warning) but rejects /opt:lldltojobs=<n> because /OPT: only accepts REF/ICF/NOREF/NOICF/LBR/NOLBR. Force them off via npm_config_enable_thin_lto=false + npm_config_enable_lto=false in the Windows build script, which node-gyp forwards as -Denable_thin_lto=false gyp defines (top precedence — binding.gyp variables don't override config.gypi's, they're a separate gyp scope).

5.1.1 - 2026-06-05

Fixed

  • Fixed Windows source builds linking against libidn2 (and its libunistring transitive dep) instead of using the Windows-native WinIDN backed by Normaliz.lib. The vcpkg manifest was requesting both the idn and idn2 curl features, which forced vcpkg's curl port to pull libidn2 in; only idn is needed and lets the port pick WinIDN on Windows. Smaller binary, fewer transitive deps.
  • Fixed Windows source builds failing in deeply-nested consumer paths (typical of pnpm v10 monorepos) with CreateProcessW failed with 206 (The filename or extension is too long). vcpkg's bundled pwsh.exe sits at vcpkg/downloads/tools/powershell-core-<ver>-windows/pwsh.exe — easy to push past Windows' MAX_PATH from inside a deep node_modules/.pnpm/ tree. vcpkg's clone now goes to %LOCALAPPDATA%\node-libcurl-vcpkg\<moduleRootHash>\ regardless of where the package lives, so the toolchain's internal paths stay short.
  • Fixed Windows source builds failing with pkg-config: 'libcrypto'/'zlib' not found while building libssh2 in nested consumer paths. vcpkg_installed was also being written inside the deep module root, and msys2 pkg-config's PKG_CONFIG_PATH parsing tripped over both the path length and the drive-letter colon. vcpkg_installed now goes to %LOCALAPPDATA%\node-libcurl-vcpkg\<hash>-installed via --x-install-root, and vcpkg-get-info.js resolves against that path so binding.gyp still finds the libs.
  • Fixed vcpkg.exe's git clone failing with Filename too long while writing pack .keep files on deep paths. The clone now passes git -c core.longpaths=true.
  • Propagate VCPKG_DISABLE_METRICS=1 to all vcpkg subprocess invocations from scripts/vcpkg-setup.js (it was being set in the env action but lost when the install script spawned vcpkg.exe).

Changed

  • A consumer install of node-libcurl under pnpm v10 now requires opting node-libcurl's lifecycle scripts in via pnpm.onlyBuiltDependencies: ["node-libcurl"] in the consumer's package.json (or pnpm add --allow-build=node-libcurl). pnpm v10's default scripts-off policy otherwise leaves the package installed but non-functional — no vcpkg setup, no native addon build. This isn't a node-libcurl change per se, but is now exercised by the new windows-consumer-install CI workflow so the regression-protected path is documented.

5.1.0 - 2026-05-31

Fixed

  • Fixed Curl.perform() intermittently throwing CurlMultiError: Could not remove easy handle from multi handle.: API function called from within callback (CURLM_RECURSIVE_API_CALL) under concurrent load, particularly visible on Alpine. The regression came from v5.0.0 enabling libcurl 8.17's new CURLMOPT_NOTIFYFUNCTION API, which fires from inside curl_multi_socket_action. The notification resolved the perform-promise synchronously, and the resulting .then() microtask called curl_multi_remove_handle while libcurl was still on its own call stack. The removal is now deferred via setImmediate so libcurl can unwind first. (fixes #439)
  • Fixed macOS x64 prebuilt binary tarballs containing an arm64 binary instead of x86_64. The universal build packaging in scripts/ci/build.sh was extracting both architectures to the same output file before either was packaged, so the second lipo extraction overwrote the first. This affected all macOS releases since v5.0.0. (#446, fixes #445)
  • Fixed CurlMimePart#setDataStream hanging on Linux when libcurl needed a second read callback after the stream emitted its initial data. The mime read callback wasn't tracking CURLPAUSE_SEND state after returning CURL_READFUNC_PAUSE, so isPausedSend stayed false and the test/example unpause callbacks were silent no-ops. The unpause is now also deferred via setImmediate to avoid re-entering libcurl while it's still processing the pause. (#448)
  • Fixed vcpkg build failures when the exact OpenSSL version bundled with Node.js isn't present in the vcpkg registry. The build now resolves to the closest compatible version (preferring a newer patch on the same minor line, falling back to the closest lower patch, then the next minor) with a clear warning about the substitution. (#447)
  • Fixed Alpine CI builds failing with fatal error: ngtcp2/ngtcp2_crypto_quictls.h: No such file or directory after the ngtcp2 1.17.0 + OpenSSL 3.5+ combination switched to the new libngtcp2_crypto_ossl backend. Added the statically-built OpenSSL's pkgconfig dir to PKG_CONFIG_PATH so libcurl's probe for libngtcp2_crypto_ossl can resolve its Requires: libcrypto on systems without system OpenSSL.
  • Fixed Windows CI builds failing with Could not find any Visual Studio installation to use after GitHub started serving Visual Studio 2026 (v145) on the windows-2025 runner ahead of the official 2026-06-15 migration. The build script no longer pins msvs_version=2022, letting node-gyp 12.1.0+ auto-detect whichever supported MSVC toolset is installed.

Added

  • Node.js 26 to the CI matrix. Prebuilt binaries are now published for Node 26 alongside the existing 22, 24, and 25 versions.

Changed

  • Bumped node-gyp from 11.4.2 to 12.3.0 and @mapbox/node-pre-gyp from 2.0.0 to 2.0.3. node-gyp v12.1.0+ adds Visual Studio 2026 detection support. The only node-gyp v12 breaking change (engine range bumped to ^20.17.0 || >=22.9.0) does not affect this project, which already requires Node.js ≥ 22.20.0.
  • Bumped Alpine container image from alpine3.21 to alpine3.22 so the Node.js 26 image variant is available (node:26-alpine3.21 is not published). Musl is 1.2.5 across Alpine 3.20–3.23, so the prebuilt binary remains runtime-compatible on Alpine 3.21.
  • The unpause callback documentation and examples for CurlMimePart#setDataStream and Easy#setMimePost now correctly reference CurlPause.Send instead of CurlPause.Recv. Mime upload data is supplied via the read callback, so pausing affects CURLPAUSE_SEND. (#448)

5.0.2 - 2026-01-15

Fixed

  • Fixed the types on the FileInfo object. With 5.0.0, the properties were changed to be all in lowercase, to follow the libcurl struct more closely.

5.0.1 - 2025-11-13

Fixed

  • Building from source on macOS would not work properly.

5.0.0 - 2025-01-13

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 FileInfo object 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:
    • CurlEasyError
    • CurlMultiError
    • CurlSharedError These classes extends the CurlError class. Previously the addon used to throw only native Javascript errors, such as Error, TypeError, etc. The curly related errors also inherit from the CurlError class, and do not have a isCurlError property anymore. Any caught error thrown from user callbacks will be added as the cause property 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 getCACertificates function. This is done using CURLOPT_CAINFO_BLOB. This is a breaking change if you were passing custom CA certificates before using CAINFO, as CURLOPT_CAINFO_BLOB takes priority over it. If that is the case, you can avoid the default behavior by calling setOpt("CAINFO_BLOB", null) on the Easy handle. The TLS certificate is loaded into memory only once for each JavaScript context.
  • HSTSREADFUNCTION callback now receives an object with the maxHostLengthBytes property, 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.globalCleanup is a no-op now. The addon will automatically call curl_global_cleanup when the process exits. This method will be removed in a future major version.
  • Curl.globalInit is a no-op now. The addon will automatically call curl_global_init when the process starts. This method will be removed in a future major version.

Fixed

  • CurlHttpVersion.V3 not being set to the proper value (was not set to 30)

Added

Changed

  • CurlGlobalInit enum is deprecated and should not be used.
  • Closing a Curl instance is now a no-op if the handle is already closed.
  • Multi.onMessage and Multi.addHandle are now deprecated and will be removed in a future major version. Use Multi.perform instead.

4.1.0 - 2024-12-26

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, which 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.

4.0.0 - 2024-02-11

Breaking Change

  • Mininum supported Node.js version is now Node.js 16.14.
  • The prebuilt binaries are only available on:
    • Node.js 18, 20, and 21
    • Electron 27, 27, and 28
  • NW.js binaries were removed, and may be re-introduced in the future.

3.0.0 - 2022-11-17

Breaking Change

  • The supported engines of Node.js were bumped to: ^14.14 || >=16.
  • The supported versions of Electron now are: v21, v20, v19, v18, and v17.
  • The node-gyp package has been bumped, which means Python 3.0 is now required to build from source.
  • Minimum c++ version your compiler needs to support is now c++17.
  • The minimum macOS version is now Big Sur (11.6)
  • The prebuilt binaries on glibc Linux are now built on Ubuntu 20.04.
  • The prebuilt binaries on musl Linux (Alpine) are now built on Alpine 3.16.
  • The prebuilt binaries on Windows are now built with Visual Studio 2019.
  • There are no prebuilt binaries for NW.js anymore. This is because nw-gyp does not support Python 3 currently.
  • Option types for CURLOPT_FTP_RESPONSE_TIMEOUT has been removed, since libcurl 7.20 it was the same as CURLOPT_SERVER_RESPONSE_TIMEOUT.

Added

Changed

  • Upgraded prebuild binaries to use libcurl 7.86.0. On Windows, OpenSSL 3.0.7 will be used.

2.3.4 - 2022-01-29

Added

  • support curl_blob options #300 by @johnwchadwick
  • added arm64 builds for macOS #312 by @johnwchadwick
  • added most options that were missing up xto libcurl version 7.79.1, including HSTS support.
  • added prebuilt binaries for Node.js v17.

Changed

  • Upgraded prebuild binaries to use libcurl 7.79.1. On Windows, OpenSSL 3.0.0 will be used.
  • The only Electron versions with prebuilt binaries are: 16, 15, 14, 13, 12, and 11.
  • The only Nwjs versions with prebuilt binaries are: 0.58, 0.57, and 0.56.

2.3.3 - 2021-05-09

Fixed

  • Fix support for Node.js v16

2.3.2 - 2021-03-24

Changed

  • The prebuilt binaries are not build with c-ares anymore, for reasoning see issue #280. c-ares was included in the prebuilt binaries starting with 2.3.0.

2.3.1 - 2021-03-09

The yes, curly is still experimental release. 😅

If you are using curly in your project, and you want to share any feedback about it, please post them in our Discord. I would love to read and discuss it!

Fixed

  • Fixed not building zstd lib statically. #274
  • Fixed download streams not working with responses that did not include a body. #271

Added

  • Added prebuilt binaries for: Node.js 15, Electron v11, Electron v12, Nwjs 0.49.2, Nwjs 0.51.2, and Nwjs 0.52.0.

Changed

  • Building the addon from source now requires a C++ compiler with support for c++1z (c++17).

Removed

  • Removed prebuilt binaries for: Node.js 10, Electron v5, Electron v6, Electron v7, Nwjs v0.43, and Nwjs v0.44.

2.3.0 - 2020-11-15

Probably the last release that curly is considered experimental.

Breaking Change

  • curly (and curly.<method>) is now able to automatically parse the response body based on the content-type header of the response. #240
    Default parsers for application/json (calls JSON.parse) and text/* (converts the raw Buffer to a string with utf8 encoding) were added. This means that for responses without a matching content-type the raw Buffer will be returned. This is different from the previous behavior where a string would always be returned. The default parsers can be overwritten by setting curly.defaultResponseBodyParsers to an object with the format:

    {
      'content-type': (data: Buffer, headers: HeaderInfo[]) => any
    }
    

    Where content-type can be one of these:

    • the exact content-type.
    • a pattern using * to match specific parts of the content-type, like text/*.
    • a catch-all pattern: just *.

    You can also override the parsers using the following options:

    • curlyResponseBodyParsers object that will be merged with defaultResponseBodyParsers.
    • curlyResponseBodyParser a parser that will be used for all responses.

    It's also possible to set curlyResponseBodyParser to false and the data returned will always be the raw Buffer.

    Of course, it is still possible to use your own writeFunction (libcurl CURLOPT_WRITEFUNCTION option) to set your own write callback and not rely on this default handling of the response.

As curly is marked as experimental, this allows us to do a breaking change in a minor version bump. This release should make the curly API more stable and provide a better developer experience, however, the API remains experimental.

Fixed

  • Some curly.<method> calls not working correctly, to be more specific, all calls that were not get, post and head.
  • Errors thrown by the internal Curl instance used by curly not being re-thrown correctly.
  • Progress callbacks were not allowing to use default libcurl progress meter (by returning CurlProgressFunc.Continue).

Added

  • Calling curly.create(options) will now return a new curly object that will use the passed options as defaults. #247
  • TypeScript: curly (and curly.<method>) now accepts a generic type parameter which will be the type of the data returned. By default, this is set to any.
  • Added new options to the curly API:
    • curlyBaseUrl: string, if set, their value will always be added as the prefix for the URL.
    • curlyLowerCaseHeaders: boolean, if set to true, headers will be returned in lower case. Defaults to false. #240
  • Added new methods and CurlFeature allowing the use of streams to upload and download data without having to set WRITEFUNCTION and/or READFUNCTION manually. #237
    • Curl.setUploadStream
    • Curl.setStreamProgress
    • Curl.setStreamResponseHighWaterMark
    • CurlFeature.StreamResponse
      New options were also added to the curly API:
    • curlyProgressCallback
    • curlyStreamResponse
    • curlyStreamResponseHighWaterMark
    • curlyStreamUpload
      These new features related to streams are only reliable when using a libcurl version >= 7.69.1.
  • Support libcurl info CURLINFO_CERTINFO. Can be retrieved using getInfo("CERTINFO"). Thanks to @Sergey-Mityukov for most of the work on this.
  • Support libcurl info CURLINFO_EFFECTIVE_METHOD. Requires libcurl >= 7.72.0.
  • Support libcurl info CURLINFO_PROXY_ERROR. Use CurlPx for constants. Requires libcurl >= 7.73.0.
  • Support libcurl option CURLOPT_SSL_EC_CURVES. Requires libcurl >= 7.73.0.
  • Added prebuilt binaries for Electron v10.1
  • The libcurl version being used by prebuilt binaries is now 7.73.0 and it's now built with c-ares.

Changed

  • curly now has 100% code coverage.

Removed

  • Removed prebuilt binaries for: Electron v3, Electron v4, Nwjs v0.42, and Nwjs v0.43

2.2.0 - 2020-07-14

Fixed

  • Fix curly.get not working correctly (#230)
  • Fix not resetting CURLOPT_TRAILERDATA when duplicating an Easy instance (7bf3a51)

Added

  • Added initial support to the CURLMOPT_PUSHFUNCTION libcurl multi option. (#232) (b8d0fac)
  • Added private member to the EasyNativeBinding typescript class, you can set this value on the Easy instances to anything, and Typescript should not complain.
  • Adde prebuilt binaries for Electron v9

Changed

  • Improved Typescript types / documentation for some libcurl options. (63a71b7)

2.1.3 - 2020-06-02

Fixed

  • v2.1.2 had a caching issue on during the dist files generation, which caused it to not build some required files.

2.1.2 - 2020-06-01

Fixed

  • Fix curly.post and curly.head using wrong libcurl options to set the HTTP Method.
  • Fix postinstall script not working properly.
  • Setting the HTTPPOST option to nullwould, wrongly, throw an Error.
  • Setting any string option to null would, wrongly, throw an Error.

Added

  • We now have API docs! 🥳 http://jcmais.github.io/node-libcurl/modules/_index_.html Thanks to typedoc
  • Added back prebuilt binaries for:
    • Electron v3, v4 and v5
  • Added isMonitoringSockets boolean readonly property to Easy instances, it is true when monitorSocketEvents has been called on that Easy instance.
  • Added CurlVersion enum to be used with the rawFeatures property returned from Curl.getVersionInfo.

2.1.1 - 2020-04-28

Fixed

  • Remove benchmark folder from the distributed npm package (reducing the package size)

2.1.0 - 2020-04-12

Fixed

  • Fix retrieve-win-deps Windows build script not working correctly
  • Fix context switches between addon callbacks not causing Node.js to drain microtasks - (#177)
  • Fix some curl_off_t getinfo values corrupting the stack
  • WRITEFUNCTION, HEADERFUNCTION and READFUNCTION callbacks now correctly rethrow JS errors thrown inside of them. The return value of both callbacks is now also checked to be an integer, any other type will cause an error. This is considered a fix because previously the return value was being cast to an integer, which means the method would already fail, as there are remote chances (aka impossible) casting something else to an integer would yield the length of the data passed by libcurl.

Added

  • Added missing CURLOPT_SASL_AUTHZID option - libcurl 7.66.0
  • Added missing CURLE_AUTH_ERROR error code added with libcurl 7.66.0
  • Added missing CURLINFO_RETRY_AFTER info field - libcurl 7.66.0
  • Added missing CURL_HTTP_VERSION_3 constant related http version to the CurlHttpVersion enum - libcurl 7.66.0
  • Added missing CURLMOPT_MAX_CONCURRENT_STREAMS option - libcurl 7.67.0
  • Added missing CurlProgressFunc enum to reflect the new CURL_PROGRESSFUNC_CONTINUE constant - libcurl 7.68.0
  • Added missing CurlSslOpt enum member NoPartialChain - libcurl 7.68.0
  • Added missing CURLE_HTTP3 error code - An HTTP/3 layer problem - libcurl 7.68.0
  • Added missing CURLM_WAKEUP_FAILURE error code - wakeup is unavailable or failed - libcurl 7.68.0
  • Added missing CURLM_BAD_FUNCTION_ARGUMENT error code - function called with a bad parameter - libcurl 7.69.0
  • Added missing CURLE_QUIC_CONNECT_ERROR error code - QUIC connection error - libcurl 7.69.0
  • Added missing CURLOPT_MAIL_RCPT_ALLLOWFAILS option - libcurl 7.69.0

Changed

  • Prebuilt binaries are now compiled with libcurl 7.69.1 and, when possible, latest version of other related dependencies:
    • OpenSSL 1.1.1d
    • nghttp2 1.4.0
    • libssh2 1.9.0
  • Added prebuilt binaries for:
    • Electron v8
    • NW.js v0.44, v0.43 and v0.42
  • Dropped prebuilt binaries for:
    • Node.js 8
    • Electron v3, v4 and v5
    • NW.js v0.38 and v0.39
  • Remove dynamic require (#204)
  • The C++ implementation for the previously removed onData and onHeader Curl/Easy instance fields has been removed - If you were still using those internal fields your code is going to break. Use WRITEFUNCTION and HEADERFUNCTION options instead.

2.0.3 - 2019-12-11

Fixed

  • Updated return type of DEBUGFUNCTION (#202)
  • Fixed issues when building with newer versions of v8 (Node.js >= 13 and Electron >= 7) (#203)

Added

  • Type for this added to event listeners callbacks
  • Build on Node.js 13 and Electron 7

2.0.2 - 2019-09-20

Added

  • Build on Electron v6

Changed

  • Improved build scripts
  • bump libssh2 to 1.9.0

2.0.1 - 2019-06-06

Fixed

  • Fixed problem when building with libcurl <= 7.38

2.0.0 - 2019-06-02

Breaking Change

  • Dropped support for Node.js 4 and 6
  • Prebuilt binary is now statically built with brotli, libssh2, nghttp2, OpenSSL and zlib. brotli, OpenSSL, nghttp2 and zlib versions match their respective versions used by Node.js.
  • The minimum libcurl version being tested is now 7.50.0, which itself is almost 3 years old.
    The addon will still try to be compatible with old versions up to 7.32.0, but there are no guarantees.
  • Curl.reset now correctly resets their instance (#141)
  • Previously Curl.code had all Curl codes into a single enum like object, that is, it included properties for each CURLMCode, CURLcode and CURLSHcode libcurl enums.
    Now they are separated, each on their own object:
    CURLMCode -> CurlMultiCode
    CURLcode -> CurlCode
    CURLSHCode -> CurlShareCode
  • DEBUGFUNCTION now receives a Buffer as the data argument, instead of a string.
  • Easy.send and Easy.recv now return an object, { code: CurlCode, bytesSent: number } and { code: CurlCode, bytesReceived: number } respectively.
  • Curl class: removed _ prefix from their private members.
    Only a breaking change in case you were using internal methods.
  • Curl class: methods onData and onHeader renamed to defaultWriteFunction and defaultHeaderFunction.
    Only a breaking change in case you were using internal methods.
  • Curl class: deprecated instance fields onData and onHeader were removed.
    Use options WRITEFUNCTION and HEADERFUNCTION respectively.
  • Curl.dupHandle, argument shouldCopyCallbacks was removed, it was the first one.
    This is not needed anymore because the previously set callbacks (onData and onHeader) can now only be set using their respective libcurl options, which is always copied when duplicating a handle.
  • Curl.multi moved to Multi.option
  • Curl.share moved to Share.option
  • Following members were moved to their own export:
    Curl.auth -> CurlAuth
    Curl.pause -> CurlPause
    Curl.http -> CurlHttpversion
    Curl.feature -> CurlFeature
    Curl.lock -> CurlShareLock
    Curl.header -> CurlHeader
    Curl.info.debug -> CurlInfoDebug
    Curl.netrc -> CurlNetrc
    Curl.chunk -> CurlChunk
    Curl.filetype -> CurlFileType
    Curl.fnmatchfunc -> CurlFnMatchFunc
    Curl.ftpauth -> CurlFtpAuth
    Curl.ftpssl -> CurlFtpSsl
    Curl.ftpmethod -> CurlFtpMethod
    Curl.rtspreq -> CurlRtspRequest
    Curl.ipresolve -> CurlIpResolve
    Curl.proxy -> CurlProxy
    Curl.pipe -> CurlPipe
    Curl.usessl -> CurlUseSsl
    Curl.sslversion -> CurlSslVersion
    Curl.sslversion.max -> CurlSslVersionMax
    Curl.ssh_auth -> CurlSshAuth
    Curl.timecond -> CurlTimeCond
    Easy.socket -> SocketState
    And their fields were changed from SNAKE_CASE to PascalCase.
    The change in casing was to follow Typescript's Enum naming convention.
  • Curl.protocol also moved to their own export CurlProtocol, no changes were made to fields casing in this case.
  • Passing non-integer option value to Multi.setOpt will now throw an error.
    Previously the value was converted to 1 if it was a truthy value, or 0 if otherwise.

Fixed

  • Fix SigAbort caused by calling v8 AsFunction on null value at Easy::SetOpt
  • Fix SegFault during gargage collection after process.exit (#165)
  • Using curl_socket_t without libcurl version guard on Easy::GetInfo

Added

  • Support Node.js 12
  • Added missing options:
    • CURLOPT_DISALLOW_USERNAME_IN_URL
    • CURLOPT_DNS_SHUFFLE_ADDRESSES
    • CURLOPT_DOH_URL
    • CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
    • CURLOPT_HAPROXYPROTOCOL
    • CURLOPT_HTTP09_ALLOWED
    • CURLOPT_REQUEST_TARGET
    • CURLOPT_FTP_FILEMETHOD (#148)
    • CURLOPT_MAXAGE_CONN
    • CURLOPT_PROXY_*
    • CURLOPT_RTSPHEADER
    • CURLOPT_RTSP_REQUEST
    • CURLOPT_SOCKS5_AUTH
    • CURLOPT_SSH_COMPRESSION
    • CURLOPT_TLS13_CIPHERS
    • CURLOPT_TIMEVALUE_LARGE
    • CURLOPT_TRAILERFUNCTION
    • CURLOPT_UPKEEP_INTERVAL_MS
  • Add missing info fields:
    • CURLINFO_*_{DOWNLOAD,UPLOAD}_T
    • CURLINFO_*_TIME_T
    • CURLINFO_FILETIME_T
  • Add Curl.getVersionInfo() which returns an object that represents the struct returned from curl_version_info().
    See their type definition for details: [./lib/types/CurlVersionInfoNativeBinding.ts](./lib/types/
  • Add Curl.getVersionInfoString() which returns a string representation of the above function.
    It should be almost identical to the one returned from curl -V.
  • Add Curl.isVersionGreaterOrEqualThan(x, y, z) to help test if the libcurl version the addon was built against is greater or equal than x.y.z.
  • Add upkeep function to Easy and Curl classes. This is a binding for the curl_easy_upkeep() function.
  • Errors thrown inside callbacks are correctly caught / passed forward (if using multi interface)
  • All Curl instances now set their USERAGENT to node-libcurl/${packageVersion} during creation.
    You change the default user agent string by changing Curl.defaultUserAgent, and disable it by setting their value to null.
  • CurlWriteFunc and CurlReadFunc enums with special return codes for their respective options, WRITEFUNCTION and READFUNCTION.
  • Added experimental curly(url: string, options: {}) / curly.<http-verb>(url: string, options: {}) async api.
    This API can change between minor releases.

Changed

  • Migrated project to Typescript and added type definitions
  • Bumped libcurl version used on Windows to 7.64.1, which has nghttp2 support
  • Added the Curl instance that emitted the event as the last param passed to events, can be useful if using anonymous functions as callback for the events. Example:
      // ...
      curl.on('end', (statusCode, data, headers, curlInstance) => {
         // ...
      })
  • Fix erratic condition when setting option HEADERFUNCTION (#142)
  • macOS libs should be linked against @rpath (#145)

Special Thanks to @koskokos2 for their contributions to this release.

Added

  • Node.js 10 on CI and respective prebuilt binaries

Changed

  • Removed deprecated NAN method calls

1.3.2 - 2018-05-24

Fixed

  • Curl multi integer options being wrongly tested (#126)

1.3.1 - 2018-05-04

Added

  • Changelog file (finally)

Changed

  • Improved code style, started using prettier

1.2.0 - 2017-08-28