Socket
Socket
Sign inDemoInstall

@datadog/browser-rum-core

Package Overview
Dependencies
Maintainers
1
Versions
177
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 2.4.0 to 2.5.0

2

cjs/boot/buildEnv.js

@@ -6,4 +6,4 @@ "use strict";

datacenter: 'us',
sdkVersion: '2.4.0',
sdkVersion: '2.5.0',
};
//# sourceMappingURL=buildEnv.js.map

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

addTiming: function (name, time) {
customTimings[name] = time - startTime;
customTimings[sanitizeTiming(name)] = time - startTime;
},

@@ -252,2 +252,12 @@ updateLocation: function (newLocation) {

}
/**
* Timing name is used as facet path that must contain only letters, digits, or the characters - _ . @ $
*/
function sanitizeTiming(name) {
var sanitized = name.replace(/[^a-zA-Z0-9-_.@$]/g, '_');
if (sanitized !== name) {
console.warn("Invalid timing name: " + name + ", sanitized to: " + sanitized);
}
return sanitized;
}
//# sourceMappingURL=trackViews.js.map
export var buildEnv = {
buildMode: 'release',
datacenter: 'us',
sdkVersion: '2.4.0',
sdkVersion: '2.5.0',
};
//# sourceMappingURL=buildEnv.js.map

@@ -151,3 +151,3 @@ import { __assign } from "tslib";

addTiming: function (name, time) {
customTimings[name] = time - startTime;
customTimings[sanitizeTiming(name)] = time - startTime;
},

@@ -249,2 +249,12 @@ updateLocation: function (newLocation) {

}
/**
* Timing name is used as facet path that must contain only letters, digits, or the characters - _ . @ $
*/
function sanitizeTiming(name) {
var sanitized = name.replace(/[^a-zA-Z0-9-_.@$]/g, '_');
if (sanitized !== name) {
console.warn("Invalid timing name: " + name + ", sanitized to: " + sanitized);
}
return sanitized;
}
//# sourceMappingURL=trackViews.js.map
{
"name": "@datadog/browser-rum-core",
"version": "2.4.0",
"version": "2.5.0",
"license": "Apache-2.0",

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

"dependencies": {
"@datadog/browser-core": "2.4.0",
"@datadog/browser-core": "2.5.0",
"tslib": "^1.10.0"

@@ -27,3 +27,3 @@ },

},
"gitHead": "844d5bf3ed057c99bc381903430226ed4ddb7ac5"
"gitHead": "e137aec8b37a9a855f4930bd6305c389828f0da9"
}

@@ -914,2 +914,14 @@ import { createRawRumEvent } from '../../../../test/fixtures'

})
it('should sanitized timing name', () => {
setupBuilder.build()
const warnSpy = spyOn(console, 'warn')
addTiming('foo bar-qux.@zip_21%$*€👋', 1234)
expect(getViewEvent(1).customTimings).toEqual({
'foo_bar-qux.@zip_21_$____': 1234,
})
expect(warnSpy).toHaveBeenCalled()
})
})

@@ -208,3 +208,3 @@ import { addEventListener, DOM_EVENT, generateUUID, monitor, noop, ONE_MINUTE, throttle } from '@datadog/browser-core'

addTiming(name: string, time: number) {
customTimings[name] = time - startTime
customTimings[sanitizeTiming(name)] = time - startTime
},

@@ -316,1 +316,12 @@ updateLocation(newLocation: Location) {

}
/**
* Timing name is used as facet path that must contain only letters, digits, or the characters - _ . @ $
*/
function sanitizeTiming(name: string) {
const sanitized = name.replace(/[^a-zA-Z0-9-_.@$]/g, '_')
if (sanitized !== name) {
console.warn(`Invalid timing name: ${name}, sanitized to: ${sanitized}`)
}
return sanitized
}

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