@rudderstack/analytics-js 3.10.1 → 3.11.0
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 +19 -0
- package/dist/npm/index.d.cts +12 -8
- package/dist/npm/index.d.mts +12 -8
- package/dist/npm/legacy/bundled/cjs/index.cjs +96 -61
- package/dist/npm/legacy/bundled/esm/index.mjs +96 -61
- package/dist/npm/legacy/bundled/umd/index.js +96 -61
- package/dist/npm/legacy/cjs/index.cjs +96 -61
- package/dist/npm/legacy/content-script/cjs/index.cjs +96 -61
- package/dist/npm/legacy/content-script/esm/index.mjs +96 -61
- package/dist/npm/legacy/content-script/umd/index.js +96 -61
- package/dist/npm/legacy/esm/index.mjs +96 -61
- package/dist/npm/legacy/umd/index.js +96 -61
- package/dist/npm/modern/bundled/cjs/index.cjs +94 -59
- package/dist/npm/modern/bundled/esm/index.mjs +94 -59
- package/dist/npm/modern/bundled/umd/index.js +94 -59
- package/dist/npm/modern/cjs/index.cjs +103 -68
- package/dist/npm/modern/content-script/cjs/index.cjs +94 -59
- package/dist/npm/modern/content-script/esm/index.mjs +94 -59
- package/dist/npm/modern/content-script/umd/index.js +94 -59
- package/dist/npm/modern/esm/index.mjs +103 -68
- package/dist/npm/modern/umd/index.js +103 -68
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,25 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [3.11.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.10.2...@rudderstack/analytics-js@3.11.0) (2024-11-18)
|
6
|
+
|
7
|
+
### Dependency Updates
|
8
|
+
|
9
|
+
* `@rudderstack/analytics-js-cookies` updated to version `0.4.3`
|
10
|
+
* `@rudderstack/analytics-js-common` updated to version `3.14.0`
|
11
|
+
* `@rudderstack/analytics-js-plugins` updated to version `3.6.3`
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* error handle public apis ([295793a](https://github.com/rudderlabs/rudder-sdk-js/commit/295793a2cc60172b001c3fb1bc2624bb19fa8546))
|
16
|
+
|
17
|
+
## [3.10.2](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.10.1...@rudderstack/analytics-js@3.10.2) (2024-11-18)
|
18
|
+
|
19
|
+
### Dependency Updates
|
20
|
+
|
21
|
+
* `@rudderstack/analytics-js-cookies` updated to version `0.4.2`
|
22
|
+
* `@rudderstack/analytics-js-common` updated to version `3.13.0`
|
23
|
+
* `@rudderstack/analytics-js-plugins` updated to version `3.6.2`
|
5
24
|
## [3.10.1](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.10.0...@rudderstack/analytics-js@3.10.1) (2024-11-12)
|
6
25
|
|
7
26
|
### Dependency Updates
|
package/dist/npm/index.d.cts
CHANGED
@@ -44,7 +44,7 @@ type Nullable<T> = T | null;
|
|
44
44
|
* Use for parameters like properties, traits etc.
|
45
45
|
*/
|
46
46
|
type ApiObject = {
|
47
|
-
[index: string]: string | number | boolean | ApiObject | null | Date | (string | number | boolean | null | Date | ApiObject)[] | undefined;
|
47
|
+
[index: string]: string | number | boolean | ApiObject | null | Date | (string | number | boolean | null | Date | ApiObject | undefined)[] | undefined;
|
48
48
|
};
|
49
49
|
|
50
50
|
type DestinationIntgConfig = boolean | undefined | ApiObject;
|
@@ -418,7 +418,7 @@ interface IRudderAnalytics<T = any> {
|
|
418
418
|
/**
|
419
419
|
* Get the instance of Analytics that is set as default
|
420
420
|
*/
|
421
|
-
getAnalyticsInstance(writeKey?: string): T;
|
421
|
+
getAnalyticsInstance(writeKey?: string): T | undefined;
|
422
422
|
/**
|
423
423
|
* Trigger load event in buffer queue if exists
|
424
424
|
*/
|
@@ -502,7 +502,7 @@ interface IRudderAnalytics<T = any> {
|
|
502
502
|
/**
|
503
503
|
* To fetch the current sessionId
|
504
504
|
*/
|
505
|
-
getSessionId(): Nullable<number
|
505
|
+
getSessionId(): Nullable<number> | undefined;
|
506
506
|
/**
|
507
507
|
* To provide consent
|
508
508
|
* @param options Consent API options
|
@@ -978,9 +978,13 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
|
|
978
978
|
/**
|
979
979
|
* Retrieve an existing analytics instance
|
980
980
|
*/
|
981
|
-
getAnalyticsInstance(writeKey?: string): IAnalytics;
|
981
|
+
getAnalyticsInstance(writeKey?: string): IAnalytics | undefined;
|
982
982
|
/**
|
983
|
-
*
|
983
|
+
* Loads the SDK
|
984
|
+
* @param writeKey Source write key
|
985
|
+
* @param dataPlaneUrl Data plane URL
|
986
|
+
* @param loadOptions Additional options for loading the SDK
|
987
|
+
* @returns none
|
984
988
|
*/
|
985
989
|
load(writeKey: string, dataPlaneUrl: string, loadOptions?: Partial<LoadOptions>): void;
|
986
990
|
/**
|
@@ -1001,14 +1005,14 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
|
|
1001
1005
|
* @param options
|
1002
1006
|
* @param preloadedEventsArray
|
1003
1007
|
*/
|
1004
|
-
|
1008
|
+
trackPageLoadedEvent(events: PageLifecycleEvents[], options: ApiOptions, preloadedEventsArray: PreloadedEventCall[]): void;
|
1005
1009
|
/**
|
1006
1010
|
* Setup page unload tracking if enabled
|
1007
1011
|
* @param events
|
1008
1012
|
* @param useBeacon
|
1009
1013
|
* @param options
|
1010
1014
|
*/
|
1011
|
-
|
1015
|
+
setupPageUnloadTracking(events: PageLifecycleEvents[], useBeacon: boolean | undefined, options: ApiOptions): void;
|
1012
1016
|
/**
|
1013
1017
|
* Trigger load event in buffer queue if exists and stores the
|
1014
1018
|
* remaining preloaded events array in global object
|
@@ -1068,7 +1072,7 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
|
|
1068
1072
|
getGroupTraits(): Nullable<ApiObject> | undefined;
|
1069
1073
|
startSession(sessionId?: number): void;
|
1070
1074
|
endSession(): void;
|
1071
|
-
getSessionId(): Nullable<number
|
1075
|
+
getSessionId(): Nullable<number> | undefined;
|
1072
1076
|
setAuthToken(token: string): void;
|
1073
1077
|
consent(options?: ConsentOptions): void;
|
1074
1078
|
}
|
package/dist/npm/index.d.mts
CHANGED
@@ -44,7 +44,7 @@ type Nullable<T> = T | null;
|
|
44
44
|
* Use for parameters like properties, traits etc.
|
45
45
|
*/
|
46
46
|
type ApiObject = {
|
47
|
-
[index: string]: string | number | boolean | ApiObject | null | Date | (string | number | boolean | null | Date | ApiObject)[] | undefined;
|
47
|
+
[index: string]: string | number | boolean | ApiObject | null | Date | (string | number | boolean | null | Date | ApiObject | undefined)[] | undefined;
|
48
48
|
};
|
49
49
|
|
50
50
|
type DestinationIntgConfig = boolean | undefined | ApiObject;
|
@@ -418,7 +418,7 @@ interface IRudderAnalytics<T = any> {
|
|
418
418
|
/**
|
419
419
|
* Get the instance of Analytics that is set as default
|
420
420
|
*/
|
421
|
-
getAnalyticsInstance(writeKey?: string): T;
|
421
|
+
getAnalyticsInstance(writeKey?: string): T | undefined;
|
422
422
|
/**
|
423
423
|
* Trigger load event in buffer queue if exists
|
424
424
|
*/
|
@@ -502,7 +502,7 @@ interface IRudderAnalytics<T = any> {
|
|
502
502
|
/**
|
503
503
|
* To fetch the current sessionId
|
504
504
|
*/
|
505
|
-
getSessionId(): Nullable<number
|
505
|
+
getSessionId(): Nullable<number> | undefined;
|
506
506
|
/**
|
507
507
|
* To provide consent
|
508
508
|
* @param options Consent API options
|
@@ -978,9 +978,13 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
|
|
978
978
|
/**
|
979
979
|
* Retrieve an existing analytics instance
|
980
980
|
*/
|
981
|
-
getAnalyticsInstance(writeKey?: string): IAnalytics;
|
981
|
+
getAnalyticsInstance(writeKey?: string): IAnalytics | undefined;
|
982
982
|
/**
|
983
|
-
*
|
983
|
+
* Loads the SDK
|
984
|
+
* @param writeKey Source write key
|
985
|
+
* @param dataPlaneUrl Data plane URL
|
986
|
+
* @param loadOptions Additional options for loading the SDK
|
987
|
+
* @returns none
|
984
988
|
*/
|
985
989
|
load(writeKey: string, dataPlaneUrl: string, loadOptions?: Partial<LoadOptions>): void;
|
986
990
|
/**
|
@@ -1001,14 +1005,14 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
|
|
1001
1005
|
* @param options
|
1002
1006
|
* @param preloadedEventsArray
|
1003
1007
|
*/
|
1004
|
-
|
1008
|
+
trackPageLoadedEvent(events: PageLifecycleEvents[], options: ApiOptions, preloadedEventsArray: PreloadedEventCall[]): void;
|
1005
1009
|
/**
|
1006
1010
|
* Setup page unload tracking if enabled
|
1007
1011
|
* @param events
|
1008
1012
|
* @param useBeacon
|
1009
1013
|
* @param options
|
1010
1014
|
*/
|
1011
|
-
|
1015
|
+
setupPageUnloadTracking(events: PageLifecycleEvents[], useBeacon: boolean | undefined, options: ApiOptions): void;
|
1012
1016
|
/**
|
1013
1017
|
* Trigger load event in buffer queue if exists and stores the
|
1014
1018
|
* remaining preloaded events array in global object
|
@@ -1068,7 +1072,7 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
|
|
1068
1072
|
getGroupTraits(): Nullable<ApiObject> | undefined;
|
1069
1073
|
startSession(sessionId?: number): void;
|
1070
1074
|
endSession(): void;
|
1071
|
-
getSessionId(): Nullable<number
|
1075
|
+
getSessionId(): Nullable<number> | undefined;
|
1072
1076
|
setAuthToken(token: string): void;
|
1073
1077
|
consent(options?: ConsentOptions): void;
|
1074
1078
|
}
|