Skip to content

chore(node-client-sdk): Add contract tests and hello example#1749

Open
joker23 wants to merge 5 commits into
mainfrom
skz/sdk-2195/node-client-sdk-next-contract-tests-and-hello-example
Open

chore(node-client-sdk): Add contract tests and hello example#1749
joker23 wants to merge 5 commits into
mainfrom
skz/sdk-2195/node-client-sdk-next-contract-tests-and-hello-example

Conversation

@joker23

@joker23 joker23 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

sdk-2313
sdk-2314

This PR will add an example app and fdv1 contract tests.

FDv2 changes and contract test will be coming in the next PR.


Note

Low Risk
Changes are mostly new test harness plumbing, docs, and an example; the only consumer-facing shift is raising the minimum Node version to 20.

Overview
Adds SDK test harness (FDv1) contract testing for @launchdarkly/node-client-sdk: a new Express contract-test service on port 8000 that advertises client-side capabilities, pools harness-managed clients, and maps harness config/commands onto createClient (evaluations, identify/track/flush, flag-change callbacks, TLS, data system modes, hooks, etc.). Local runs use yarn contract-tests / run-contract-tests.sh; CI builds the service and runs the shared contract-tests action with testharness-suppressions.txt (FDv2 skips live in a separate file for a follow-up PR).

Also adds a hello-node-client sample app (env-based credentials, streaming flag listener, CI one-shot exit) and wires both workspaces into the monorepo and release-please so the example’s SDK dependency stays in sync.

Node support shifts to engines.node >= 20 and the node-client workflow matrix runs 20 and 22 instead of 18 and 22.

Reviewed by Cursor Bugbot for commit e92c53a. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26365 bytes
Compressed size limit: 29000
Uncompressed size: 129044 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31978 bytes
Compressed size limit: 34000
Uncompressed size: 114243 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179579 bytes
Compressed size limit: 200000
Uncompressed size: 831422 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38739 bytes
Compressed size limit: 39000
Uncompressed size: 212244 bytes

@joker23 joker23 force-pushed the skz/sdk-2195/node-client-sdk-next-contract-tests-and-hello-example branch 2 times, most recently from e2847bd to 53dfe09 Compare June 16, 2026 17:39
@joker23

joker23 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot]

This comment was marked as resolved.

@joker23

joker23 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot]

This comment was marked as resolved.

@joker23 joker23 force-pushed the skz/sdk-2195/node-client-sdk-next-contract-tests-and-hello-example branch from 816daff to fa32e43 Compare June 16, 2026 18:59
@joker23

joker23 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit fa32e43. Configure here.

@joker23 joker23 marked this pull request as ready for review June 16, 2026 19:16
@joker23 joker23 requested a review from a team as a code owner June 16, 2026 19:16

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

joker23 and others added 5 commits June 22, 2026 18:40
build:client compiles tsconfig.client.json which already includes dist/index.js
and dist/client.js without pulling in the server-side TestHook that depends on
@launchdarkly/js-server-sdk-common (not built in the node-client CI pipeline).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Node 18 reached end-of-life in April 2025. The electron@40 install script
is incompatible with Node 18 (ERR_REQUIRE_ESM via @electron/get). Server-node
CI already uses [20, 22]. Update engines.node to >=20 to match.
@joker23 joker23 force-pushed the skz/sdk-2195/node-client-sdk-next-contract-tests-and-hello-example branch from fa32e43 to e92c53a Compare June 22, 2026 22:40
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