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 |
e2847bd to
53dfe09
Compare
|
@cursor review |
|
@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.
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.
…fig, and manifest version
fa32e43 to
e92c53a
Compare
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 ontocreateClient(evaluations, identify/track/flush, flag-change callbacks, TLS, data system modes, hooks, etc.). Local runs useyarn contract-tests/run-contract-tests.sh; CI builds the service and runs the sharedcontract-testsaction withtestharness-suppressions.txt(FDv2 skips live in a separate file for a follow-up PR).Also adds a
hello-node-clientsample 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 >= 20and thenode-clientworkflow 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.