chore(node-client-sdk): Add contract tests and hello example#1749
chore(node-client-sdk): Add contract tests and hello example#1749joker23 wants to merge 5 commits into
Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk-common size report |
02dd1b3 to
582500e
Compare
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.
e2847bd to
53dfe09
Compare
|
@cursor review |
…fig, and manifest version
|
@cursor review |
816daff to
fa32e43
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ 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.
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-sdkvia a new Express contract-test service on port 8000 that advertises client-side capabilities and drives realcreateClientinstances through evaluate, identify, track, flush, and flag-change listener commands. Local runs useyarn contract-tests/run-contract-tests.sh; GitHub Actions now builds that service and runs FDv1 harness tests withtestharness-suppressions.txt(plus an FDv2 suppressions file for a follow-up branch).Introduces the
hello-node-clientsample app (evaluate a flag, streamchange:updates, exit whenCIis 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>=20requirement. Package version in manifest is set to 0.0.1 alongside newcontract-tests/contract-test-servicescripts on the SDK package.Reviewed by Cursor Bugbot for commit fa32e43. Bugbot is set up for automated code reviews on this repo. Configure here.