Skip to content

Refactor codebase, add session options, and update dependencies (v2.2.0)#13

Draft
Sahil1337 wants to merge 2 commits into
mainfrom
sync-native-features
Draft

Refactor codebase, add session options, and update dependencies (v2.2.0)#13
Sahil1337 wants to merge 2 commits into
mainfrom
sync-native-features

Conversation

@Sahil1337

Copy link
Copy Markdown
Owner

This pull request introduces version 2.2.0 of node-tls-client, syncing the wrapper with the native shared library v1.15.1 and adding extensive new features, options, and fixes. The update brings parity with the latest native capabilities, deprecates and replaces some configuration fields, and improves HTTP/3 support. It also ensures the native binary cache refreshes on upgrade, preventing stale binaries. Documentation, examples, and type definitions are updated to reflect these changes.

Major feature and compatibility updates:

  • The default client profile is now chrome_146 (was chrome_131), aligning with the native library. To keep the old fingerprint, explicitly set clientIdentifier: ClientIdentifier.chrome_131.
  • The singular certCompressionAlgo field is deprecated in favor of the new array field certCompressionAlgos. The old key is still accepted for backward compatibility but will be removed in a future major version. [1] [2] [3]
  • The native shared library cache now uses a versioned marker file, ensuring the correct binary is used after upgrades.

New features and options:

  • Added new client profiles (e.g., chrome_130_psk, chrome_146_psk, brave_146_psk, safari_ios_18_5, firefox_148, etc.).
  • Introduced new top-level SessionOptions, including disableHttp3, withProtocolRacing, withoutCookieJar, withCustomCookieJar, certificatePinningHosts, defaultHeaders, and timeoutSeconds. [1] [2] [3]
  • Added new custom-client (ja3string path) options: h3Settings, h3SettingsOrder, h3PseudoHeaderOrder, h3PriorityParam, h3SendGreaseFrames, echCandidatePayloads, echCandidateCipherSuites, recordSizeLimit, streamId, allowHttp, and supportedDelegatedCredentialsAlgorithms. [1] [2]
  • Expanded enum values: KeyShareCurves adds X25519Kyber768Old and X25519MLKEM768; SupportedSignatureAlgorithms adds SHA224_RSA and SHA224_ECDSA.
  • Added a new HTTP/3 usage example in examples/http3.js.

Deprecations and fixes:

  • Removed the dead withDefaultCookieJar payload field; cookie behavior is unchanged. [1] [2]
  • Documentation and the readme.md updated to reflect new/changed options and deprecations. [1] [2] [3]
  • Various bug fixes, including ensuring the native binary refreshes on upgrade and clarifications around cookie jar behavior.

Build and workflow improvements:

  • Added a GitHub Actions workflow for publishing releases, using trusted publishing and OIDC.
  • Updated package.json scripts to ensure the build and docs run before publishing, and updated dev dependencies for Node 24 and TypeScript 6. [1] [2] [3]

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Sahil1337 added 2 commits July 7, 2026 12:17
- Deleted utility files: index.js, logger.js, native.js, request.js, tlsError.js from dist/utils.
- Removed corresponding typings from typings/utils and typings/interface.
- Cleaned up workers/index.js and typings/workers/index.d.ts by removing unused exports.
- Eliminated unnecessary Client, Cookie, Response, Session, and requests typings from typings/lib.
- Streamlined the overall codebase by removing redundant interfaces and types.
feat: add support for multiple certificate compression algorithms
- Changed `certCompressionAlgo` to `certCompressionAlgos` in payload and session interfaces.
- Updated related documentation and examples.

feat: introduce new session options
- Added options for disabling HTTP/3, enabling protocol racing, and using custom cookie jars.
- Added support for certificate pinning hosts and default headers.

fix: update ClientIdentifier enum with new browser versions

refactor: improve library handler to manage native binary versioning
- Added version marker to ensure native binaries are re-downloaded when the wrapper version changes.

chore: remove unused payload smoke test file

build: update TypeScript configuration for better compatibility
- Set root directory and added node types.
@Sahil1337 Sahil1337 marked this pull request as draft July 7, 2026 06:51
@Sahil1337 Sahil1337 changed the title Refactor codebase, add session options, and update dependencies Refactor codebase, add session options, and update dependencies (v2.2.0) Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 09f4cdd1-03cd-40d3-948d-22009f26d88b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant