Skip to content

Latest commit

 

History

History
185 lines (106 loc) · 10.2 KB

File metadata and controls

185 lines (106 loc) · 10.2 KB

@segment/analytics-node

3.1.0

Minor Changes

  • #1342 65951526 Thanks @MichaelGHSeg! - Unify and harden HTTP response handling and retry behavior across browser and node SDKs.

    • Browser (@segment/analytics-next) - Add config-driven response handling for Segment.io delivery (httpConfig with rate-limit/backoff controls). - Improve batching/dispatcher retry semantics for 429 and transient failures. - Use configured protocol for batching requests when apiHost has no scheme, while preserving compatibility for apiHost values that already include http:// or https://.

    • Node (@segment/analytics-node) - Align publisher retry/status behavior with updated response handling rules. - Add maxTotalBackoffDuration and maxRateLimitDuration settings to control retry ceilings. - Update default retry configuration to increase resilience under transient failures.

    • Core (@segment/analytics-core) - Standardize backoff defaults used by retry queues.

Patch Changes

  • #1365 5eb12a17 Thanks @MichaelGHSeg! - Fix closeAndFlush silently dropping in-flight events on timeout.

    • Cancel pending retry sleeps via AbortController when closeAndFlush times out, instead of silently swallowing the timeout error.
    • Raise default closeAndFlush timeout floor to 75s (was 12.5s) so it survives at least one Retry-After: 60 cycle.
    • Add http_response emitter event for observing API response status codes and headers.
  • Updated dependencies [65951526]:

    • @segment/analytics-core@1.8.3

3.0.0

Major Changes

  • #1348 99cd853b Thanks @MichaelGHSeg! - Remove node-fetch dependency in favor of native globalThis.fetch (available since Node 18, package requires >= 20)

2.3.0

Minor Changes

  • #1307 5ae083f4 Thanks @neelkanth-kaushik! - # Updated Node.js version to ^20 across the repository

    Files modified:

    1. .github/workflows/ci.yml
    2. package.json
    3. packages/node/package.json

Patch Changes

  • Updated dependencies [5b6bdd92]:
    • @segment/analytics-core@1.8.2

2.2.1

Patch Changes

2.2.0

Minor Changes

  • #1156 9ece2726 Thanks @mrmckeb! - Improves support for TypeScript's exactOptionalPropertyTypes by allowing undefined to be passed to optional properties.

Patch Changes

2.1.3

Patch Changes

  • Updated dependencies [5647624c]:
    • @segment/analytics-core@1.7.0

2.1.2

Patch Changes

  • Updated dependencies [e884b61, e884b61]:
    • @segment/analytics-core@1.6.0

2.1.1

Patch Changes

  • Updated dependencies [3c37def, 1635e42]:
    • @segment/analytics-core@1.5.1

2.1.0

Minor Changes

  • #1043 95fd2fd Thanks @silesky! - This ensures backward compatibility with analytics-node by modifying '@segment/analytics-core'. Specifically, the changes prevent the generation of a messageId if it is already set. This adjustment aligns with the behavior outlined in analytics-node's source code here.

    While this is a core release, only the node library is affected, as the browser has its own EventFactory atm.

Patch Changes

  • Updated dependencies [95fd2fd, d212633]:
    • @segment/analytics-core@1.5.0
    • @segment/analytics-generic-utils@1.2.0

2.0.0

Major Changes

  • #935 833ade8 Thanks @MichaelGHSeg! - Support for Segment OAuth2

    OAuth2 must be enabled from the Segment dashboard. You will need a PEM format private/public key pair. Once you've uploaded your public key, you will need the OAuth Client Id, the Key Id, and your private key. You can set these in the new OAuthSettings type and provide it in your Analytics configuration.

    Note: This introduces a breaking change only if you have implemented a custom HTTPClient. HTTPClientRequest data: Record<string, any> has changed to body: string. Processing data into a string now occurs before calls to makeRequest

1.3.0

Minor Changes

1.2.0

Minor Changes

  • #1015 8fbe1a0 Thanks @silesky! - Deprecate maxEventsInBatch in favor of our commonly used: flushAt. The purpose is to establish consistency between our SDKs, regardless of language.

Patch Changes

  • Updated dependencies [7b93e7b]:
    • @segment/analytics-generic-utils@1.1.1
    • @segment/analytics-core@1.4.1

1.1.4

Patch Changes

  • Updated dependencies [d9b47c4, d9b47c4]:
    • @segment/analytics-core@1.4.0
    • @segment/analytics-generic-utils@1.1.0

1.1.3

Patch Changes

  • #974 c879377 Thanks @silesky! - Refactor to get createDeferred from @segment/analytics-generic-utils lib

  • Updated dependencies [c879377]:

    • @segment/analytics-generic-utils@1.0.0

1.1.2

Patch Changes

  • Updated dependencies [897f4cc]:
    • @segment/analytics-core@1.3.2

1.1.1

Patch Changes

1.1.0

Minor Changes

  • #880 5f50363 Thanks @silesky! - Add httpClient setting. This allow users to override default HTTP client with a custom one.

1.0.0

Patch Changes