Skip to content

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Feb 3, 2026

This is a refactor to move the contract tests to the server-node package.

SDK-1807

Additional changes:

  • removed node server sdk contract test scripts from root package.json
  • tweaked CONTRIBUTING doc to have more general wording around contract tests
  • modified GHA workflow for node to use node server sdk workspace scripts instead of root scripts

Note

Low Risk
Primarily a repo-structure/CI wiring refactor; risk is limited to contract-test execution and TypeScript build/reference correctness rather than runtime SDK behavior.

Overview
Moves the Node Server SDK contract test service into packages/sdk/server-node/contract-tests and registers it as a Yarn workspace, including updating its dependency on @launchdarkly/node-server-sdk to use workspace:^.

Updates the server-node GitHub Actions workflow to build/start the contract-test service via workspace scripts and to reference suppression files from the new location; removes the old root-level contract test scripts and contract-tests workspace entry, and rewires TypeScript project references/exclude rules to the new tsconfig.ref.json path. Documentation is updated to describe contract tests in a package-scoped way and point to the new directory.

Written by Cursor Bugbot for commit 843a0be. This will update automatically on new commits. Configure here.

@joker23 joker23 requested a review from a team as a code owner February 3, 2026 21:48
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25394 bytes
Compressed size limit: 26000
Uncompressed size: 124693 bytes

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 23332 bytes
Compressed size limit: 25000
Uncompressed size: 81071 bytes

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

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

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

"lint:fix": "yarn run lint -- --fix",
"test": "echo Please run tests for individual packages.",
"coverage": "npm run test -- --coverage",
"contract-test-service-build": "yarn workspaces foreach -pR --topological-dev --from 'node-server-sdk-contract-tests' run build",
Copy link

Choose a reason for hiding this comment

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

Orphaned contract-test-harness script is now unused

Low Severity

The contract-test-harness script remains in package.json but is no longer used anywhere. It was previously invoked by the contract-tests script which has been removed. The script is not referenced in any GitHub workflows or other scripts, making it dead code that could confuse future developers.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there can still be some uses for this as reference to run the test harness

This is a refactor to move the contract tests to the server-node package.
@joker23 joker23 force-pushed the skz/refactor-node-contract-tests branch from 76379fa to 7172cdd Compare February 3, 2026 22:02
CONTRIBUTING.md Outdated
For more information [see here](https://github.com/launchdarkly/sdk-test-harness).

Note that not all packages in this monorepo has implemented contract tests. The ones that
have contract tests should have a `contract-test` directory at the root directory of the
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if root of their package or something would be less potentially confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's a good point - I clarified it a bit further by putting the path to the node server contract tests.

joker23 and others added 2 commits February 4, 2026 09:10
Co-authored-by: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
@joker23 joker23 requested a review from kinyoklion February 4, 2026 15:17
@joker23 joker23 merged commit 0ea2f63 into main Feb 4, 2026
37 checks passed
@joker23 joker23 deleted the skz/refactor-node-contract-tests branch February 4, 2026 18:11
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.

2 participants