Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
There was a problem hiding this comment.
should be a ts version of https://github.com/launchdarkly/js-eventsource/blob/main/lib/capacity.js
There was a problem hiding this comment.
should be a ts version of https://github.com/launchdarkly/js-eventsource/blob/main/lib/retry-delay.js
| cert?: string | string[] | Buffer | Buffer[]; | ||
| ca?: string | string[] | Buffer | Buffer[]; | ||
| ciphers?: string; | ||
| rejectUnauthorized?: boolean; |
There was a problem hiding this comment.
NOTE: I decided to take the rejectUnauthorized option out of top level option. This should be fine from an API standpoint as I will update the call sites.
There was a problem hiding this comment.
🔍 Devin Review: 2 flags
Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
Summary
First layer of the eventsource migration stack. Adds the
@launchdarkly/eventsource-nodepackage scaffold: package identity (package.json, tsconfigs, tsup, jest, typedoc, docs), the dependency-freeretryDelayandcapacitymodules with their unit tests, and the public option/event types, which derive from the@launchdarkly/js-sdk-commonplatform contract.src/index.tsis a scaffold that exports only the types; theEventSourceimplementation and its export arrive in the next layer. Also wires the package into the root workspaces and tsconfig references, and adds a build-test CI workflow with a TODO for contract tests (completed later in the stack).Note
Overview
Introduces
@launchdarkly/eventsource-nodeas the first layer of in-repo EventSource work: package metadata, build/test tooling (tsup, Jest, TypeDoc), license/README/changelog, and monorepo wiring (Yarn workspace, roottsconfigproject reference, dedicatedeventsource-node.ymlCI via shared./actions/ci).The public surface is intentionally minimal:
src/index.tsexports only types aligned with@launchdarkly/js-sdk-common(init options, event payloads, Node TLS/proxy options); theEventSourceclient is deferred to a follow-up layer. This PR does land two ported helpers—retryDelay(backoff, jitter, reset interval) andcapacity(buffer growth with a fixed 8192 minimum instead of readingBuffer.poolSize)—each with unit tests; Jest is pinned tomaxWorkers: 1to avoid port collisions from test helpers. Contract tests in CI are left as a TODO.Reviewed by Cursor Bugbot for commit 6cb3662. Bugbot is set up for automated code reviews on this repo. Configure here.