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 contract-test infrastructure, docs, and an example; the main consumer-facing shift is requiring Node 20+ and the version manifest adjustment.

Overview
Adds SDK test harness coverage for @launchdarkly/node-client-sdk via a new Express contract-test service on port 8000 that advertises client-side capabilities and drives real createClient instances through evaluate, identify, track, flush, and flag-change listener commands. Local runs use yarn contract-tests / run-contract-tests.sh; GitHub Actions now builds that service and runs FDv1 harness tests with testharness-suppressions.txt (plus an FDv2 suppressions file for a follow-up branch).

Introduces the hello-node-client sample app (evaluate a flag, stream change: updates, exit when CI is set) and wires it into the monorepo and release-please so example dependency versions track the SDK.

CI matrix shifts from Node 18 to 20 (with 22), matching a new engines.node >=20 requirement. Package version in manifest is set to 0.0.1 alongside new contract-tests / contract-test-service scripts on the SDK package.

Reviewed by Cursor Bugbot for commit fa32e43. 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 from 02dd1b3 to 582500e Compare June 16, 2026 17:16
joker23 and others added 3 commits June 16, 2026 13:38
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 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

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