@datadog/browser-core
Advanced tools
Comparing version 5.34.0 to 5.34.1
@@ -11,3 +11,3 @@ "use strict"; | ||
var publicApi = (0, polyfills_1.assign)({ | ||
version: "5.34.0", | ||
version: "5.34.1", | ||
// This API method is intentionally not monitored, since the only thing executed is the | ||
@@ -14,0 +14,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and |
@@ -41,3 +41,1 @@ export interface VisualViewportEventMap { | ||
}; | ||
export interface CookieStore extends EventTarget { | ||
} |
@@ -59,3 +59,3 @@ "use strict"; | ||
var retry = _b.retry, encoding = _b.encoding; | ||
var tags = ["sdk_version:".concat("5.34.0"), "api:".concat(api)].concat(configurationTags); | ||
var tags = ["sdk_version:".concat("5.34.1"), "api:".concat(api)].concat(configurationTags); | ||
if (retry) { | ||
@@ -68,3 +68,3 @@ tags.push("retry_count:".concat(retry.count), "retry_after:".concat(retry.lastFailureStatus)); | ||
"dd-api-key=".concat(clientToken), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.34.0")), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.34.1")), | ||
'dd-evp-origin=browser', | ||
@@ -71,0 +71,0 @@ "dd-request-id=".concat((0, stringUtils_1.generateUUID)()), |
@@ -16,3 +16,3 @@ "use strict"; | ||
context = (0, sanitize_1.sanitize)(newContext); | ||
customerDataTracker && customerDataTracker.updateCustomerData(context); | ||
customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context); | ||
} | ||
@@ -26,3 +26,3 @@ else { | ||
context[key] = (0, sanitize_1.sanitize)(property); | ||
customerDataTracker && customerDataTracker.updateCustomerData(context); | ||
customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context); | ||
changeObservable.notify(); | ||
@@ -32,3 +32,3 @@ }, | ||
delete context[key]; | ||
customerDataTracker && customerDataTracker.updateCustomerData(context); | ||
customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context); | ||
changeObservable.notify(); | ||
@@ -38,3 +38,3 @@ }, | ||
context = {}; | ||
customerDataTracker && customerDataTracker.resetCustomerData(); | ||
customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.resetCustomerData(); | ||
changeObservable.notify(); | ||
@@ -41,0 +41,0 @@ }, |
@@ -65,3 +65,3 @@ "use strict"; | ||
function isError(error) { | ||
return Object.prototype.toString.call(error) === '[object Error]'; | ||
return error instanceof Error || Object.prototype.toString.call(error) === '[object Error]'; | ||
} | ||
@@ -68,0 +68,0 @@ function flattenErrorCauses(error, parentSource) { |
@@ -73,3 +73,8 @@ "use strict"; | ||
(0, sessionState_1.expandSessionState)(processedSession); | ||
isLockEnabled ? persistWithLock(processedSession) : persistSession(processedSession); | ||
if (isLockEnabled) { | ||
persistWithLock(processedSession); | ||
} | ||
else { | ||
persistSession(processedSession); | ||
} | ||
} | ||
@@ -76,0 +81,0 @@ } |
@@ -18,3 +18,3 @@ "use strict"; | ||
} | ||
catch (e) { | ||
catch (_a) { | ||
return undefined; | ||
@@ -21,0 +21,0 @@ } |
@@ -74,3 +74,3 @@ "use strict"; | ||
service: telemetryService, | ||
version: "5.34.0", | ||
version: "5.34.1", | ||
source: 'browser', | ||
@@ -77,0 +77,0 @@ _dd: { |
@@ -16,5 +16,6 @@ /** | ||
ACTION_NAME_MASKING = "action_name_masking", | ||
CONSISTENT_TRACE_SAMPLING = "consistent_trace_sampling" | ||
CONSISTENT_TRACE_SAMPLING = "consistent_trace_sampling", | ||
DELAY_VIEWPORT_COLLECTION = "delay_viewport_collection" | ||
} | ||
export declare function initFeatureFlags(enableExperimentalFeatures?: string[] | undefined): void; | ||
export declare function initFeatureFlags(enableExperimentalFeatures: string[] | undefined): void; | ||
export declare function addExperimentalFeatures(enabledFeatures: ExperimentalFeature[]): void; | ||
@@ -21,0 +22,0 @@ export declare function isExperimentalFeatureEnabled(featureName: ExperimentalFeature): boolean; |
@@ -30,2 +30,3 @@ "use strict"; | ||
ExperimentalFeature["CONSISTENT_TRACE_SAMPLING"] = "consistent_trace_sampling"; | ||
ExperimentalFeature["DELAY_VIEWPORT_COLLECTION"] = "delay_viewport_collection"; | ||
})(ExperimentalFeature || (exports.ExperimentalFeature = ExperimentalFeature = {})); | ||
@@ -32,0 +33,0 @@ var enabledExperimentalFeatures = new Set(); |
@@ -30,3 +30,3 @@ "use strict"; | ||
} | ||
catch (e) { | ||
catch (_a) { | ||
(0, functionUtils_1.noop)(); | ||
@@ -33,0 +33,0 @@ } |
@@ -12,3 +12,3 @@ "use strict"; | ||
} | ||
catch (e) { | ||
catch (_a) { | ||
// clone can throw if the response has already been used by another instrumentation or is disturbed | ||
@@ -15,0 +15,0 @@ return; |
@@ -7,3 +7,3 @@ import { catchUserErrors } from '../tools/catchUserErrors'; | ||
var publicApi = assign({ | ||
version: "5.34.0", | ||
version: "5.34.1", | ||
// This API method is intentionally not monitored, since the only thing executed is the | ||
@@ -10,0 +10,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and |
@@ -41,3 +41,1 @@ export interface VisualViewportEventMap { | ||
}; | ||
export interface CookieStore extends EventTarget { | ||
} |
@@ -56,3 +56,3 @@ import { timeStampNow } from '../../tools/utils/timeUtils'; | ||
var retry = _b.retry, encoding = _b.encoding; | ||
var tags = ["sdk_version:".concat("5.34.0"), "api:".concat(api)].concat(configurationTags); | ||
var tags = ["sdk_version:".concat("5.34.1"), "api:".concat(api)].concat(configurationTags); | ||
if (retry) { | ||
@@ -65,3 +65,3 @@ tags.push("retry_count:".concat(retry.count), "retry_after:".concat(retry.lastFailureStatus)); | ||
"dd-api-key=".concat(clientToken), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.34.0")), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.34.1")), | ||
'dd-evp-origin=browser', | ||
@@ -68,0 +68,0 @@ "dd-request-id=".concat(generateUUID()), |
@@ -13,3 +13,3 @@ import { deepClone } from '../../tools/mergeInto'; | ||
context = sanitize(newContext); | ||
customerDataTracker && customerDataTracker.updateCustomerData(context); | ||
customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context); | ||
} | ||
@@ -23,3 +23,3 @@ else { | ||
context[key] = sanitize(property); | ||
customerDataTracker && customerDataTracker.updateCustomerData(context); | ||
customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context); | ||
changeObservable.notify(); | ||
@@ -29,3 +29,3 @@ }, | ||
delete context[key]; | ||
customerDataTracker && customerDataTracker.updateCustomerData(context); | ||
customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context); | ||
changeObservable.notify(); | ||
@@ -35,3 +35,3 @@ }, | ||
context = {}; | ||
customerDataTracker && customerDataTracker.resetCustomerData(); | ||
customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.resetCustomerData(); | ||
changeObservable.notify(); | ||
@@ -38,0 +38,0 @@ }, |
@@ -57,3 +57,3 @@ import { sanitize } from '../../tools/serialisation/sanitize'; | ||
export function isError(error) { | ||
return Object.prototype.toString.call(error) === '[object Error]'; | ||
return error instanceof Error || Object.prototype.toString.call(error) === '[object Error]'; | ||
} | ||
@@ -60,0 +60,0 @@ export function flattenErrorCauses(error, parentSource) { |
@@ -69,3 +69,8 @@ import { setTimeout } from '../../tools/timer'; | ||
expandSessionState(processedSession); | ||
isLockEnabled ? persistWithLock(processedSession) : persistSession(processedSession); | ||
if (isLockEnabled) { | ||
persistWithLock(processedSession); | ||
} | ||
else { | ||
persistSession(processedSession); | ||
} | ||
} | ||
@@ -72,0 +77,0 @@ } |
@@ -14,3 +14,3 @@ import { generateUUID } from '../../../tools/utils/stringUtils'; | ||
} | ||
catch (e) { | ||
catch (_a) { | ||
return undefined; | ||
@@ -17,0 +17,0 @@ } |
@@ -61,3 +61,3 @@ import { ConsoleApiName } from '../../tools/display'; | ||
service: telemetryService, | ||
version: "5.34.0", | ||
version: "5.34.1", | ||
source: 'browser', | ||
@@ -64,0 +64,0 @@ _dd: { |
@@ -16,5 +16,6 @@ /** | ||
ACTION_NAME_MASKING = "action_name_masking", | ||
CONSISTENT_TRACE_SAMPLING = "consistent_trace_sampling" | ||
CONSISTENT_TRACE_SAMPLING = "consistent_trace_sampling", | ||
DELAY_VIEWPORT_COLLECTION = "delay_viewport_collection" | ||
} | ||
export declare function initFeatureFlags(enableExperimentalFeatures?: string[] | undefined): void; | ||
export declare function initFeatureFlags(enableExperimentalFeatures: string[] | undefined): void; | ||
export declare function addExperimentalFeatures(enabledFeatures: ExperimentalFeature[]): void; | ||
@@ -21,0 +22,0 @@ export declare function isExperimentalFeatureEnabled(featureName: ExperimentalFeature): boolean; |
@@ -22,2 +22,3 @@ /** | ||
ExperimentalFeature["CONSISTENT_TRACE_SAMPLING"] = "consistent_trace_sampling"; | ||
ExperimentalFeature["DELAY_VIEWPORT_COLLECTION"] = "delay_viewport_collection"; | ||
})(ExperimentalFeature || (ExperimentalFeature = {})); | ||
@@ -24,0 +25,0 @@ var enabledExperimentalFeatures = new Set(); |
@@ -25,3 +25,3 @@ import { callMonitored } from '../monitor'; | ||
} | ||
catch (e) { | ||
catch (_a) { | ||
noop(); | ||
@@ -28,0 +28,0 @@ } |
@@ -8,3 +8,3 @@ export function isServerError(status) { | ||
} | ||
catch (e) { | ||
catch (_a) { | ||
// clone can throw if the response has already been used by another instrumentation or is disturbed | ||
@@ -11,0 +11,0 @@ return; |
{ | ||
"name": "@datadog/browser-core", | ||
"version": "5.34.0", | ||
"version": "5.34.1", | ||
"license": "Apache-2.0", | ||
@@ -26,3 +26,3 @@ "main": "cjs/index.js", | ||
}, | ||
"gitHead": "c6a795a260477e7272fa244f9dcdd751d0048970" | ||
"gitHead": "b5c92a64c7f74c6cb30d5e73c71cc7382738c1b5" | ||
} |
@@ -56,2 +56,3 @@ // Those types come from the official TypeScript DOM library, but are not included in our minimal | ||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
export interface CookieStore extends EventTarget {} | ||
@@ -69,3 +70,1 @@ | ||
} | ||
export interface CookieStore extends EventTarget {} |
@@ -20,3 +20,3 @@ import { deepClone } from '../../tools/mergeInto' | ||
context = sanitize(newContext) | ||
customerDataTracker && customerDataTracker.updateCustomerData(context) | ||
customerDataTracker?.updateCustomerData(context) | ||
} else { | ||
@@ -30,3 +30,3 @@ contextManager.clearContext() | ||
context[key] = sanitize(property) | ||
customerDataTracker && customerDataTracker.updateCustomerData(context) | ||
customerDataTracker?.updateCustomerData(context) | ||
changeObservable.notify() | ||
@@ -37,3 +37,3 @@ }, | ||
delete context[key] | ||
customerDataTracker && customerDataTracker.updateCustomerData(context) | ||
customerDataTracker?.updateCustomerData(context) | ||
changeObservable.notify() | ||
@@ -44,3 +44,3 @@ }, | ||
context = {} | ||
customerDataTracker && customerDataTracker.resetCustomerData() | ||
customerDataTracker?.resetCustomerData() | ||
changeObservable.notify() | ||
@@ -47,0 +47,0 @@ }, |
@@ -91,3 +91,3 @@ import { sanitize } from '../../tools/serialisation/sanitize' | ||
export function isError(error: unknown): error is Error { | ||
return Object.prototype.toString.call(error) === '[object Error]' | ||
return error instanceof Error || Object.prototype.toString.call(error) === '[object Error]' | ||
} | ||
@@ -94,0 +94,0 @@ |
@@ -82,3 +82,7 @@ import { setTimeout } from '../../tools/timer' | ||
expandSessionState(processedSession) | ||
isLockEnabled ? persistWithLock(processedSession) : persistSession(processedSession) | ||
if (isLockEnabled) { | ||
persistWithLock(processedSession) | ||
} else { | ||
persistSession(processedSession) | ||
} | ||
} | ||
@@ -85,0 +89,0 @@ } |
@@ -17,3 +17,3 @@ import { generateUUID } from '../../../tools/utils/stringUtils' | ||
return id === retrievedId ? { type: 'LocalStorage' } : undefined | ||
} catch (e) { | ||
} catch { | ||
return undefined | ||
@@ -20,0 +20,0 @@ } |
@@ -23,2 +23,3 @@ /** | ||
CONSISTENT_TRACE_SAMPLING = 'consistent_trace_sampling', | ||
DELAY_VIEWPORT_COLLECTION = 'delay_viewport_collection', | ||
} | ||
@@ -28,3 +29,3 @@ | ||
export function initFeatureFlags(enableExperimentalFeatures?: string[] | undefined) { | ||
export function initFeatureFlags(enableExperimentalFeatures: string[] | undefined) { | ||
if (Array.isArray(enableExperimentalFeatures)) { | ||
@@ -31,0 +32,0 @@ addExperimentalFeatures( |
@@ -7,3 +7,3 @@ export interface Context { | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
export interface ContextArray extends Array<ContextValue> {} |
@@ -7,3 +7,3 @@ import { display } from '../display' | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type | ||
type PrimitivesAndFunctions = string | number | boolean | undefined | null | symbol | bigint | Function | ||
@@ -10,0 +10,0 @@ type ExtendedContextValue = PrimitivesAndFunctions | object | ExtendedContext | ExtendedContextArray |
@@ -27,3 +27,3 @@ import { callMonitored } from '../monitor' | ||
throw error | ||
} catch (e) { | ||
} catch { | ||
noop() | ||
@@ -30,0 +30,0 @@ } |
@@ -8,3 +8,3 @@ export function isServerError(status: number) { | ||
return response.clone() | ||
} catch (e) { | ||
} catch { | ||
// clone can throw if the response has already been used by another instrumentation or is disturbed | ||
@@ -11,0 +11,0 @@ return |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1158239
20817