@rudderstack/analytics-js 3.32.0 → 3.33.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [3.33.1](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.33.0...@rudderstack/analytics-js@3.33.1) (2026-09-15)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `@rudderstack/analytics-js-plugins` updated to version `3.17.0`
10
+
11
+ ## [3.33.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.32.0...@rudderstack/analytics-js@3.33.0) (2026-09-09)
12
+
13
+ ### Dependency Updates
14
+
15
+ * `@rudderstack/analytics-js-cookies` updated to version `0.5.14`
16
+ * `@rudderstack/analytics-js-common` updated to version `3.29.0`
17
+ * `@rudderstack/analytics-js-plugins` updated to version `3.16.0`
18
+
19
+ ### Features
20
+
21
+ * **analytics-js:** batch server-side cookie requests ([#3178](https://github.com/rudderlabs/rudder-sdk-js/issues/3178)) ([201efcb](https://github.com/rudderlabs/rudder-sdk-js/commit/201efcbedf17ee2bd7a835aed275764644375051)), closes [#3176](https://github.com/rudderlabs/rudder-sdk-js/issues/3176)
22
+ * **analytics-js:** deprecate pre-consent storage strategy ([#3188](https://github.com/rudderlabs/rudder-sdk-js/issues/3188)) ([0d92edb](https://github.com/rudderlabs/rudder-sdk-js/commit/0d92edb85c94e55a454aedfd97f66b79eab8bfc2))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **analytics-js:** set log level before attaching effects ([#3193](https://github.com/rudderlabs/rudder-sdk-js/issues/3193)) ([815c166](https://github.com/rudderlabs/rudder-sdk-js/commit/815c166beadb85182eaf3921158aff28e6940f73))
28
+ * **analytics-js:** skip no-op server-side cookie writes ([#3176](https://github.com/rudderlabs/rudder-sdk-js/issues/3176)) ([15e0fc4](https://github.com/rudderlabs/rudder-sdk-js/commit/15e0fc47b3ed79287278659787d67915e6b4e2d0))
29
+ * **analytics-js:** use in-memory session on replay ([#3182](https://github.com/rudderlabs/rudder-sdk-js/issues/3182)) ([cffb90a](https://github.com/rudderlabs/rudder-sdk-js/commit/cffb90a3c13ab0277497f0246893484a55b32fb3))
30
+ * sdk-5425 ignore invalid reset entry values ([#3183](https://github.com/rudderlabs/rudder-sdk-js/issues/3183)) ([4338199](https://github.com/rudderlabs/rudder-sdk-js/commit/4338199dad53fcce91c283b244932547fe5ada6f))
31
+
5
32
  ## [3.32.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.31.8...@rudderstack/analytics-js@3.32.0) (2026-08-24)
6
33
 
7
34
  ### Dependency Updates
package/README.md CHANGED
@@ -2,7 +2,10 @@
2
2
 
3
3
  <p align="center">
4
4
  <a href="https://rudderstack.com/">
5
- <img alt="RudderStack" width="512" src="https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/develop/assets/rs-logo-full-light.jpg">
5
+ <picture>
6
+ <source media="(prefers-color-scheme: dark)" srcset="https://cdn.rudderlabs.com/brand/logo_watermark_dark.png">
7
+ <img alt="RudderStack" width="512" src="https://cdn.rudderlabs.com/brand/logo_watermark_light.png">
8
+ </picture>
6
9
  </a>
7
10
  <br />
8
11
  <caption>The Customer Data Platform for Developers</caption>
@@ -91,8 +94,8 @@ RudderStack JS SDK [service worker](https://www.npmjs.com/package/@rudderstack/a
91
94
 
92
95
  For more details, see:
93
96
 
94
- - [Vercel Edge Usage](https://github.com/rudderlabs/rudder-sdk-js/blob/main/examples/serverless/USAGE.md)
95
- - [Cloudflare Worker Usage](https://github.com/rudderlabs/rudder-sdk-js/blob/main/examples/serverless/USAGE.md)
97
+ - [Vercel Edge Usage](https://github.com/rudderlabs/rudder-sdk-js/blob/main/examples/serverless/USAGE.md#vercel-edge)
98
+ - [Cloudflare Worker Usage](https://github.com/rudderlabs/rudder-sdk-js/blob/main/examples/serverless/USAGE.md#cloudflare-worker)
96
99
 
97
100
  ## License
98
101
 
@@ -276,9 +276,22 @@ type DestinationsQueueOpts = {
276
276
  };
277
277
  type OnLoadedCallback = (analytics: any) => void;
278
278
  type DeliveryType = 'immediate' | 'buffer';
279
+ /**
280
+ * @deprecated Use the `storage` load API option to control what is persisted before consent is given. It will be removed in the next major version.
281
+ */
279
282
  type StorageStrategy = 'none' | 'session' | 'anonymousId';
280
283
  type PreConsentStorageOptions = {
281
- strategy: StorageStrategy;
284
+ /**
285
+ * Applies the `storage` load API option during the pre-consent phase, taking precedence over
286
+ * `strategy`. When it is not enabled, `strategy` decides what is persisted instead, and with
287
+ * neither of them nothing is persisted before consent is given. Defaults to false.
288
+ */
289
+ enabled?: boolean;
290
+ /**
291
+ * Only applies when `enabled` is not set. Defaults to persisting nothing.
292
+ * @deprecated Enable `storage` in the pre-consent options and use the `storage` load API option instead. It will be removed in the next major version.
293
+ */
294
+ strategy?: StorageStrategy;
282
295
  };
283
296
  type PreConsentEventsOptions = {
284
297
  delivery: DeliveryType;
@@ -1048,6 +1061,18 @@ declare class Store implements IStore {
1048
1061
  onError(error: unknown, customMessage?: string, groupingHash?: string): void;
1049
1062
  }
1050
1063
 
1064
+ type StatsCollection = {
1065
+ errors: {
1066
+ enabled: boolean;
1067
+ provider?: string;
1068
+ };
1069
+ metrics: {
1070
+ enabled: boolean;
1071
+ };
1072
+ };
1073
+
1074
+ type CustomContextState = Signal<CustomContext>;
1075
+
1051
1076
  interface IUserSessionManager {
1052
1077
  storeManager?: IStoreManager;
1053
1078
  init(): void;
@@ -1070,16 +1095,6 @@ interface IUserSessionManager {
1070
1095
  setAuthToken(token: Nullable<string>): void;
1071
1096
  }
1072
1097
 
1073
- type StatsCollection = {
1074
- errors: {
1075
- enabled: boolean;
1076
- provider?: string;
1077
- };
1078
- metrics: {
1079
- enabled: boolean;
1080
- };
1081
- };
1082
-
1083
1098
  type DestinationDefinition = {
1084
1099
  name: string;
1085
1100
  displayName: string;
@@ -1175,8 +1190,6 @@ type RudderAnalyticsPreloader = {
1175
1190
  [index: string]: (...args: any[]) => any;
1176
1191
  };
1177
1192
 
1178
- type CustomContextState = Signal<CustomContext>;
1179
-
1180
1193
  declare class CustomContextStore {
1181
1194
  private readonly state;
1182
1195
  private readonly logger;
@@ -276,9 +276,22 @@ type DestinationsQueueOpts = {
276
276
  };
277
277
  type OnLoadedCallback = (analytics: any) => void;
278
278
  type DeliveryType = 'immediate' | 'buffer';
279
+ /**
280
+ * @deprecated Use the `storage` load API option to control what is persisted before consent is given. It will be removed in the next major version.
281
+ */
279
282
  type StorageStrategy = 'none' | 'session' | 'anonymousId';
280
283
  type PreConsentStorageOptions = {
281
- strategy: StorageStrategy;
284
+ /**
285
+ * Applies the `storage` load API option during the pre-consent phase, taking precedence over
286
+ * `strategy`. When it is not enabled, `strategy` decides what is persisted instead, and with
287
+ * neither of them nothing is persisted before consent is given. Defaults to false.
288
+ */
289
+ enabled?: boolean;
290
+ /**
291
+ * Only applies when `enabled` is not set. Defaults to persisting nothing.
292
+ * @deprecated Enable `storage` in the pre-consent options and use the `storage` load API option instead. It will be removed in the next major version.
293
+ */
294
+ strategy?: StorageStrategy;
282
295
  };
283
296
  type PreConsentEventsOptions = {
284
297
  delivery: DeliveryType;
@@ -1048,6 +1061,18 @@ declare class Store implements IStore {
1048
1061
  onError(error: unknown, customMessage?: string, groupingHash?: string): void;
1049
1062
  }
1050
1063
 
1064
+ type StatsCollection = {
1065
+ errors: {
1066
+ enabled: boolean;
1067
+ provider?: string;
1068
+ };
1069
+ metrics: {
1070
+ enabled: boolean;
1071
+ };
1072
+ };
1073
+
1074
+ type CustomContextState = Signal<CustomContext>;
1075
+
1051
1076
  interface IUserSessionManager {
1052
1077
  storeManager?: IStoreManager;
1053
1078
  init(): void;
@@ -1070,16 +1095,6 @@ interface IUserSessionManager {
1070
1095
  setAuthToken(token: Nullable<string>): void;
1071
1096
  }
1072
1097
 
1073
- type StatsCollection = {
1074
- errors: {
1075
- enabled: boolean;
1076
- provider?: string;
1077
- };
1078
- metrics: {
1079
- enabled: boolean;
1080
- };
1081
- };
1082
-
1083
1098
  type DestinationDefinition = {
1084
1099
  name: string;
1085
1100
  displayName: string;
@@ -1175,8 +1190,6 @@ type RudderAnalyticsPreloader = {
1175
1190
  [index: string]: (...args: any[]) => any;
1176
1191
  };
1177
1192
 
1178
- type CustomContextState = Signal<CustomContext>;
1179
-
1180
1193
  declare class CustomContextStore {
1181
1194
  private readonly state;
1182
1195
  private readonly logger;