@rudderstack/analytics-js 3.16.1 → 3.17.0-beta.pr.2212.1532120

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,28 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [3.17.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.16.1...@rudderstack/analytics-js@3.17.0) (2025-04-25)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `@rudderstack/analytics-js-cookies` updated to version `0.4.24`
10
+ * `@rudderstack/analytics-js-common` updated to version `3.18.0`
11
+ * `@rudderstack/analytics-js-plugins` updated to version `3.8.1`
12
+
13
+ ### Features
14
+
15
+ * pre-consent event buffering works now for anonymousId pre-consent storage strategy ([#2100](https://github.com/rudderlabs/rudder-sdk-js/issues/2100)) ([6336925](https://github.com/rudderlabs/rudder-sdk-js/commit/6336925ccfdf66623ca98c4a44b7bf0a13ef54dc))
16
+ * remove page loaded event ([#2088](https://github.com/rudderlabs/rudder-sdk-js/issues/2088)) ([ec1d604](https://github.com/rudderlabs/rudder-sdk-js/commit/ec1d604f70d4e476a751f5207df09eef69220be2))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * consent api race condition to load integrations ([#2178](https://github.com/rudderlabs/rudder-sdk-js/issues/2178)) ([30149ad](https://github.com/rudderlabs/rudder-sdk-js/commit/30149adff3eddd628022f511374e9072d087db89))
22
+ * consider local page urls as dev release stage in error reporting ([#2174](https://github.com/rudderlabs/rudder-sdk-js/issues/2174)) ([ae53449](https://github.com/rudderlabs/rudder-sdk-js/commit/ae53449af2289113182c602971340afdad39d13d))
23
+ * recursively migrate persisted entries ([#2187](https://github.com/rudderlabs/rudder-sdk-js/issues/2187)) ([3dd07ea](https://github.com/rudderlabs/rudder-sdk-js/commit/3dd07ea1bde4655124fc02850a022bcb550b8c07))
24
+ * rename view id to visit id ([#2086](https://github.com/rudderlabs/rudder-sdk-js/issues/2086)) ([51c8dd9](https://github.com/rudderlabs/rudder-sdk-js/commit/51c8dd94b2e25f42a116cb72d209d41729c165c0))
25
+ * rename visit duration to time on page ([#2087](https://github.com/rudderlabs/rudder-sdk-js/issues/2087)) ([569846d](https://github.com/rudderlabs/rudder-sdk-js/commit/569846d992fd01105e880e67ca004d1e9f52688a))
26
+
5
27
  ## [3.16.1](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.16.0...@rudderstack/analytics-js@3.16.1) (2025-03-03)
6
28
 
7
29
 
@@ -255,7 +255,6 @@ type PreConsentOptions = {
255
255
  events?: PreConsentEventsOptions;
256
256
  };
257
257
  declare enum PageLifecycleEvents {
258
- LOADED = "Page Loaded",
259
258
  UNLOADED = "Page Unloaded"
260
259
  }
261
260
  type PageLifecycleOptions = {
@@ -544,11 +543,6 @@ interface IRudderAnalytics<T = any> {
544
543
  consent(options?: ConsentOptions): void;
545
544
  }
546
545
 
547
- type PreloadedEventCall = Array<string | any>;
548
- type RudderAnalyticsPreloader = {
549
- [index: string]: (...args: any[]) => any;
550
- };
551
-
552
546
  type SDKError = unknown | Error | ErrorEvent | Event | PromiseRejectionEvent;
553
547
  interface IErrorHandler {
554
548
  httpClient: IHttpClient;
@@ -959,6 +953,11 @@ interface ICapabilitiesManager {
959
953
  onReady(): void;
960
954
  }
961
955
 
956
+ type PreloadedEventCall = Array<string | any>;
957
+ type RudderAnalyticsPreloader = {
958
+ [index: string]: (...args: any[]) => any;
959
+ };
960
+
962
961
  interface IAnalytics {
963
962
  preloadBuffer: BufferQueue<PreloadedEventCall>;
964
963
  initialized: boolean;
@@ -1135,18 +1134,10 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
1135
1134
  load(writeKey: string, dataPlaneUrl: string, loadOptions?: Partial<LoadOptions>): void;
1136
1135
  /**
1137
1136
  * A function to track page lifecycle events like page loaded and page unloaded
1138
- * @param preloadedEventsArray
1139
1137
  * @param loadOptions
1140
1138
  * @returns
1141
1139
  */
1142
- trackPageLifecycleEvents(preloadedEventsArray: PreloadedEventCall[], loadOptions?: Partial<LoadOptions>): void;
1143
- /**
1144
- * Buffer the page loaded event in the preloaded events array
1145
- * @param events
1146
- * @param options
1147
- * @param preloadedEventsArray
1148
- */
1149
- trackPageLoadedEvent(events: PageLifecycleEvents[], options: ApiOptions, preloadedEventsArray: PreloadedEventCall[]): void;
1140
+ trackPageLifecycleEvents(loadOptions?: Partial<LoadOptions>): void;
1150
1141
  /**
1151
1142
  * Setup page unload tracking if enabled
1152
1143
  * @param events
@@ -1226,4 +1217,5 @@ declare global {
1226
1217
  }
1227
1218
  //# sourceMappingURL=index.d.ts.map
1228
1219
 
1229
- export { type AnonymousIdOptions, type ApiCallback, type ApiObject, type ApiOptions, type BeaconQueueOpts, type ConsentOptions, type CookieSameSite, type DestinationsQueueOpts, type IdentifyTraits, type IntegrationOpts, type LoadOptions, type LogLevel, type PluginName, type PreloadedEventCall, type QueueOpts, RudderAnalytics, type RudderAnalyticsPreloader, type SessionOpts, type UaChTrackLevel };
1220
+ export { RudderAnalytics };
1221
+ export type { AnonymousIdOptions, ApiCallback, ApiObject, ApiOptions, BeaconQueueOpts, ConsentOptions, CookieSameSite, DestinationsQueueOpts, IdentifyTraits, IntegrationOpts, LoadOptions, LogLevel, PluginName, PreloadedEventCall, QueueOpts, RudderAnalyticsPreloader, SessionOpts, UaChTrackLevel };
@@ -255,7 +255,6 @@ type PreConsentOptions = {
255
255
  events?: PreConsentEventsOptions;
256
256
  };
257
257
  declare enum PageLifecycleEvents {
258
- LOADED = "Page Loaded",
259
258
  UNLOADED = "Page Unloaded"
260
259
  }
261
260
  type PageLifecycleOptions = {
@@ -544,11 +543,6 @@ interface IRudderAnalytics<T = any> {
544
543
  consent(options?: ConsentOptions): void;
545
544
  }
546
545
 
547
- type PreloadedEventCall = Array<string | any>;
548
- type RudderAnalyticsPreloader = {
549
- [index: string]: (...args: any[]) => any;
550
- };
551
-
552
546
  type SDKError = unknown | Error | ErrorEvent | Event | PromiseRejectionEvent;
553
547
  interface IErrorHandler {
554
548
  httpClient: IHttpClient;
@@ -959,6 +953,11 @@ interface ICapabilitiesManager {
959
953
  onReady(): void;
960
954
  }
961
955
 
956
+ type PreloadedEventCall = Array<string | any>;
957
+ type RudderAnalyticsPreloader = {
958
+ [index: string]: (...args: any[]) => any;
959
+ };
960
+
962
961
  interface IAnalytics {
963
962
  preloadBuffer: BufferQueue<PreloadedEventCall>;
964
963
  initialized: boolean;
@@ -1135,18 +1134,10 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
1135
1134
  load(writeKey: string, dataPlaneUrl: string, loadOptions?: Partial<LoadOptions>): void;
1136
1135
  /**
1137
1136
  * A function to track page lifecycle events like page loaded and page unloaded
1138
- * @param preloadedEventsArray
1139
1137
  * @param loadOptions
1140
1138
  * @returns
1141
1139
  */
1142
- trackPageLifecycleEvents(preloadedEventsArray: PreloadedEventCall[], loadOptions?: Partial<LoadOptions>): void;
1143
- /**
1144
- * Buffer the page loaded event in the preloaded events array
1145
- * @param events
1146
- * @param options
1147
- * @param preloadedEventsArray
1148
- */
1149
- trackPageLoadedEvent(events: PageLifecycleEvents[], options: ApiOptions, preloadedEventsArray: PreloadedEventCall[]): void;
1140
+ trackPageLifecycleEvents(loadOptions?: Partial<LoadOptions>): void;
1150
1141
  /**
1151
1142
  * Setup page unload tracking if enabled
1152
1143
  * @param events
@@ -1226,4 +1217,5 @@ declare global {
1226
1217
  }
1227
1218
  //# sourceMappingURL=index.d.ts.map
1228
1219
 
1229
- export { type AnonymousIdOptions, type ApiCallback, type ApiObject, type ApiOptions, type BeaconQueueOpts, type ConsentOptions, type CookieSameSite, type DestinationsQueueOpts, type IdentifyTraits, type IntegrationOpts, type LoadOptions, type LogLevel, type PluginName, type PreloadedEventCall, type QueueOpts, RudderAnalytics, type RudderAnalyticsPreloader, type SessionOpts, type UaChTrackLevel };
1220
+ export { RudderAnalytics };
1221
+ export type { AnonymousIdOptions, ApiCallback, ApiObject, ApiOptions, BeaconQueueOpts, ConsentOptions, CookieSameSite, DestinationsQueueOpts, IdentifyTraits, IntegrationOpts, LoadOptions, LogLevel, PluginName, PreloadedEventCall, QueueOpts, RudderAnalyticsPreloader, SessionOpts, UaChTrackLevel };