Socket
Socket
Sign inDemoInstall

@datadog/browser-rum-core

Package Overview
Dependencies
Maintainers
1
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/browser-rum-core - npm Package Compare versions

Comparing version 4.32.1 to 4.33.0

9

cjs/domain/assembly.js

@@ -48,3 +48,3 @@ "use strict";

},
browser_sdk_version: (0, browser_core_1.canUseEventBridge)() ? "4.32.1" : undefined,
browser_sdk_version: (0, browser_core_1.canUseEventBridge)() ? "4.33.0" : undefined,
},

@@ -83,9 +83,2 @@ application: {

}
if ((0, browser_core_1.isExperimentalFeatureEnabled)('report_view_document_version')) {
serverRumEvent.context._dd = {
view: {
document_version: viewContext.documentVersion,
},
};
}
if (shouldSend(serverRumEvent, configuration.beforeSend, domainContext, eventRateLimiters)) {

@@ -92,0 +85,0 @@ if ((0, browser_core_1.isEmptyObject)(serverRumEvent.context)) {

@@ -8,3 +8,2 @@ import type { RelativeTime } from '@datadog/browser-core';

id: string;
documentVersion: number;
name?: string;

@@ -11,0 +10,0 @@ }

@@ -11,9 +11,2 @@ "use strict";

});
lifeCycle.subscribe(3 /* VIEW_UPDATED */, function (_a) {
var startClocks = _a.startClocks, documentVersion = _a.documentVersion;
var viewContext = viewContextHistory.find(startClocks.relative);
if (viewContext) {
viewContext.documentVersion = documentVersion;
}
});
lifeCycle.subscribe(4 /* VIEW_ENDED */, function (_a) {

@@ -32,3 +25,2 @@ var endClocks = _a.endClocks;

name: view.name,
documentVersion: view.documentVersion,
};

@@ -35,0 +27,0 @@ }

@@ -32,3 +32,2 @@ import type { Duration, ClocksState, TimeStamp, Observable, RelativeTime } from '@datadog/browser-core';

startClocks: ClocksState;
documentVersion: number;
}

@@ -35,0 +34,0 @@ export interface ViewEndedEvent {

@@ -111,3 +111,2 @@ "use strict";

version: version,
documentVersion: documentVersion,
});

@@ -114,0 +113,0 @@ // Update the view every time the measures are changing

@@ -214,5 +214,2 @@ import type { Context, Duration, ErrorSource, ErrorHandling, ResourceType, ServerDuration, TimeStamp, RawErrorCause } from '@datadog/browser-core';

};
view?: {
document_version: number;
};
browser_sdk_version?: string;

@@ -219,0 +216,0 @@ };

@@ -1,2 +0,2 @@

import { isExperimentalFeatureEnabled, combine, isEmptyObject, limitModification, timeStampNow, currentDrift, display, createEventRateLimiter, canUseEventBridge, } from '@datadog/browser-core';
import { combine, isEmptyObject, limitModification, timeStampNow, currentDrift, display, createEventRateLimiter, canUseEventBridge, } from '@datadog/browser-core';
import { getSyntheticsContext } from './contexts/syntheticsContext';

@@ -45,3 +45,3 @@ import { getCiTestContext } from './contexts/ciTestContext';

},
browser_sdk_version: canUseEventBridge() ? "4.32.1" : undefined,
browser_sdk_version: canUseEventBridge() ? "4.33.0" : undefined,
},

@@ -80,9 +80,2 @@ application: {

}
if (isExperimentalFeatureEnabled('report_view_document_version')) {
serverRumEvent.context._dd = {
view: {
document_version: viewContext.documentVersion,
},
};
}
if (shouldSend(serverRumEvent, configuration.beforeSend, domainContext, eventRateLimiters)) {

@@ -89,0 +82,0 @@ if (isEmptyObject(serverRumEvent.context)) {

@@ -8,3 +8,2 @@ import type { RelativeTime } from '@datadog/browser-core';

id: string;
documentVersion: number;
name?: string;

@@ -11,0 +10,0 @@ }

@@ -8,9 +8,2 @@ import { SESSION_TIME_OUT_DELAY, ContextHistory } from '@datadog/browser-core';

});
lifeCycle.subscribe(3 /* VIEW_UPDATED */, function (_a) {
var startClocks = _a.startClocks, documentVersion = _a.documentVersion;
var viewContext = viewContextHistory.find(startClocks.relative);
if (viewContext) {
viewContext.documentVersion = documentVersion;
}
});
lifeCycle.subscribe(4 /* VIEW_ENDED */, function (_a) {

@@ -29,3 +22,2 @@ var endClocks = _a.endClocks;

name: view.name,
documentVersion: view.documentVersion,
};

@@ -32,0 +24,0 @@ }

@@ -32,3 +32,2 @@ import type { Duration, ClocksState, TimeStamp, Observable, RelativeTime } from '@datadog/browser-core';

startClocks: ClocksState;
documentVersion: number;
}

@@ -35,0 +34,0 @@ export interface ViewEndedEvent {

@@ -107,3 +107,2 @@ import { shallowClone, assign, elapsed, generateUUID, monitor, ONE_MINUTE, throttle, clocksNow, clocksOrigin, timeStampNow, display, looksLikeRelativeTime, } from '@datadog/browser-core';

version: version,
documentVersion: documentVersion,
});

@@ -110,0 +109,0 @@ // Update the view every time the measures are changing

@@ -214,5 +214,2 @@ import type { Context, Duration, ErrorSource, ErrorHandling, ResourceType, ServerDuration, TimeStamp, RawErrorCause } from '@datadog/browser-core';

};
view?: {
document_version: number;
};
browser_sdk_version?: string;

@@ -219,0 +216,0 @@ };

6

package.json
{
"name": "@datadog/browser-rum-core",
"version": "4.32.1",
"version": "4.33.0",
"license": "Apache-2.0",

@@ -15,3 +15,3 @@ "main": "cjs/index.js",

"dependencies": {
"@datadog/browser-core": "4.32.1"
"@datadog/browser-core": "4.33.0"
},

@@ -26,3 +26,3 @@ "devDependencies": {

},
"gitHead": "c9e05c379595bfe664fbc673f2d429b3dee5274a"
"gitHead": "09cba227ece772311f6a00f96fd27705acf5c118"
}
import type { RelativeTime } from '@datadog/browser-core'
import {
updateExperimentalFeatures,
resetExperimentalFeatures,
ErrorSource,
ONE_MINUTE,
display,
} from '@datadog/browser-core'
import { ErrorSource, ONE_MINUTE, display } from '@datadog/browser-core'
import { createRumSessionManagerMock } from '../../test/mockRumSessionManager'

@@ -38,3 +32,2 @@ import { createRawRumEvent } from '../../test/fixtures'

name: 'view name',
documentVersion: 42,
})

@@ -456,6 +449,2 @@ reportErrorSpy = jasmine.createSpy('reportError')

describe('view context', () => {
afterEach(() => {
resetExperimentalFeatures()
})
it('should be merged with event attributes', () => {

@@ -473,19 +462,2 @@ const { lifeCycle } = setupBuilder.build()

})
it('should include the view document version in global context', () => {
updateExperimentalFeatures(['report_view_document_version'])
const { lifeCycle } = setupBuilder.build()
notifyRawRumEvent(lifeCycle, {
rawRumEvent: createRawRumEvent(RumEventType.RESOURCE),
})
expect(serverRumEvents[0].context).toEqual(
jasmine.objectContaining({
_dd: {
view: {
document_version: 42,
},
},
})
)
})
})

@@ -510,3 +482,3 @@

const { lifeCycle } = setupBuilder.build()
findView = () => ({ service: 'new service', version: 'new version', id: '1234', documentVersion: 0 })
findView = () => ({ service: 'new service', version: 'new version', id: '1234' })
notifyRawRumEvent(lifeCycle, {

@@ -513,0 +485,0 @@ rawRumEvent: createRawRumEvent(RumEventType.ACTION),

import type { Context, RawError, EventRateLimiter, User } from '@datadog/browser-core'
import {
isExperimentalFeatureEnabled,
combine,

@@ -144,10 +143,2 @@ isEmptyObject,

if (isExperimentalFeatureEnabled('report_view_document_version')) {
serverRumEvent.context._dd = {
view: {
document_version: viewContext.documentVersion,
},
}
}
if (shouldSend(serverRumEvent, configuration.beforeSend, domainContext, eventRateLimiters)) {

@@ -154,0 +145,0 @@ if (isEmptyObject(serverRumEvent.context)) {

@@ -6,3 +6,3 @@ import type { RelativeTime } from '@datadog/browser-core'

import { LifeCycleEventType } from '../lifeCycle'
import type { ViewCreatedEvent, ViewEvent } from '../rumEventsCollection/view/trackViews'
import type { ViewCreatedEvent } from '../rumEventsCollection/view/trackViews'
import type { ViewContexts } from './viewContexts'

@@ -19,3 +19,2 @@ import { startViewContexts, VIEW_CONTEXT_TIME_OUT_DELAY } from './viewContexts'

id: FAKE_ID,
documentVersion: 0,
...partialViewCreatedEvent,

@@ -115,19 +114,2 @@ }

})
it('should update the document version on update', () => {
const { lifeCycle } = setupBuilder.build()
const startClocks = relativeToClocks(0 as RelativeTime)
lifeCycle.notify(LifeCycleEventType.VIEW_CREATED, buildViewCreatedEvent({ startClocks }))
expect(viewContexts.findView()!.documentVersion).toBe(0)
lifeCycle.notify(LifeCycleEventType.VIEW_UPDATED, {
startClocks,
documentVersion: 1,
} as ViewEvent)
expect(viewContexts.findView()!.documentVersion).toBe(1)
})
})

@@ -134,0 +116,0 @@

@@ -13,3 +13,2 @@ import type { RelativeTime } from '@datadog/browser-core'

id: string
documentVersion: number
name?: string

@@ -30,9 +29,2 @@ }

lifeCycle.subscribe(LifeCycleEventType.VIEW_UPDATED, ({ startClocks, documentVersion }) => {
const viewContext = viewContextHistory.find(startClocks.relative)
if (viewContext) {
viewContext.documentVersion = documentVersion
}
})
lifeCycle.subscribe(LifeCycleEventType.VIEW_ENDED, ({ endClocks }) => {

@@ -52,3 +44,2 @@ viewContextHistory.closeActive(endClocks.relative)

name: view.name,
documentVersion: view.documentVersion,
}

@@ -55,0 +46,0 @@ }

@@ -55,3 +55,2 @@ import type { Duration, ClocksState, TimeStamp, Observable, Subscription, RelativeTime } from '@datadog/browser-core'

startClocks: ClocksState
documentVersion: number
}

@@ -217,3 +216,2 @@

version,
documentVersion,
})

@@ -220,0 +218,0 @@

@@ -245,7 +245,4 @@ import type {

}
view?: {
document_version: number
}
browser_sdk_version?: string
}
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc