Socket
Socket
Sign inDemoInstall

@datadog/browser-core

Package Overview
Dependencies
3
Maintainers
1
Versions
249
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.11.2 to 1.11.3

2

cjs/errorCollection.d.ts

@@ -31,3 +31,3 @@ import { Configuration } from './configuration';

export declare type ErrorObservable = Observable<ErrorMessage>;
export declare function startErrorCollection(configuration: Configuration): ErrorObservable;
export declare function startErrorCollection(configuration: Configuration): Observable<ErrorMessage>;
export declare function filterErrors(configuration: Configuration, errorObservable: Observable<ErrorMessage>): Observable<ErrorMessage>;

@@ -34,0 +34,0 @@ export declare function startConsoleTracking(errorObservable: ErrorObservable): void;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var internalMonitoring_1 = require("./internalMonitoring");

@@ -65,3 +64,3 @@ var observable_1 = require("./observable");

}
originalConsoleError.apply(console, tslib_1.__spreadArrays([message], optionalParams));
originalConsoleError.apply(console, [message].concat(optionalParams));
errorObservable.notify({

@@ -73,3 +72,3 @@ context: {

},
message: tslib_1.__spreadArrays(['console error:', message], optionalParams).map(formatConsoleParameters).join(' '),
message: ['console error:', message].concat(optionalParams).map(formatConsoleParameters).join(' '),
startTime: performance.now(),

@@ -76,0 +75,0 @@ });

@@ -13,3 +13,3 @@ import { UserConfiguration } from './configuration';

configuration: import("./configuration").Configuration;
errorObservable: import("./errorCollection").ErrorObservable;
errorObservable: import("./observable").Observable<import("./errorCollection").ErrorMessage>;
internalMonitoring: import("./internalMonitoring").InternalMonitoring;

@@ -16,0 +16,0 @@ };

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

function addErrorToMonitoringBatch(e) {
addToMonitoringBatch(tslib_1.__assign(tslib_1.__assign({}, formatError(e)), { status: StatusType.error }));
addToMonitoringBatch(tslib_1.__assign({}, formatError(e), { status: StatusType.error }));
}

@@ -83,0 +83,0 @@ function addToMonitoringBatch(message) {

@@ -22,3 +22,3 @@ import { Observable } from './observable';

export declare type RequestObservables = [Observable<RequestStartEvent>, Observable<RequestCompleteEvent>];
export declare function startRequestCollection(): RequestObservables;
export declare function startRequestCollection(): [Observable<RequestStartEvent>, Observable<RequestCompleteEvent>];
export declare function trackXhr([requestStartObservable, requestCompleteObservable]: RequestObservables): void;

@@ -25,0 +25,0 @@ export declare function trackFetch([requestStartObservable, requestCompleteObservable]: RequestObservables): void;

@@ -26,4 +26,7 @@ import { Configuration } from './configuration';

instance: any;
getEntryTypes(): any;
fakeEntry(entry: PerformanceEntry, entryType: string): void;
getStub(): PerformanceObserver;
}
export declare function setPageVisibility(visibility: 'visible' | 'hidden'): void;
export declare function restorePageVisibility(): void;

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

return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, resolve(tslib_1.__assign(tslib_1.__assign({}, response), { clone: function () {
return [2 /*return*/, resolve(tslib_1.__assign({}, response, { clone: function () {
var cloned = {

@@ -93,2 +93,6 @@ text: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {

}
PerformanceObserverStubBuilder.prototype.getEntryTypes = function () {
// tslint:disable-next-line: no-unsafe-any
return this.instance.entryTypes;
};
PerformanceObserverStubBuilder.prototype.fakeEntry = function (entry, entryType) {

@@ -118,3 +122,6 @@ var asEntryList = function () { return [entry]; };

class_1.prototype.observe = function (options) {
// do nothing
if (options) {
// tslint:disable-next-line: no-unsafe-any
builder.instance.entryTypes = options.entryTypes;
}
};

@@ -129,2 +136,15 @@ return class_1;

exports.PerformanceObserverStubBuilder = PerformanceObserverStubBuilder;
function setPageVisibility(visibility) {
Object.defineProperty(document, 'visibilityState', {
get: function () {
return visibility;
},
configurable: true,
});
}
exports.setPageVisibility = setPageVisibility;
function restorePageVisibility() {
delete document.visibilityState;
}
exports.restorePageVisibility = restorePageVisibility;
//# sourceMappingURL=specHelper.js.map

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

if (this.bufferMessageCount !== 0) {
var messages = tslib_1.__spreadArrays(this.pushOnlyBuffer, utils_1.objectValues(this.upsertBuffer));
var messages = this.pushOnlyBuffer.concat(utils_1.objectValues(this.upsertBuffer));
this.request.send(messages.join('\n'), this.bufferBytesSize);

@@ -68,0 +68,0 @@ this.pushOnlyBuffer = [];

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

import { __assign } from "tslib";
import * as tslib_1 from "tslib";
import { includes, ONE_KILO_BYTE, ONE_SECOND } from './utils';

@@ -41,3 +41,3 @@ export var DEFAULT_CONFIGURATION = {

: [];
var configuration = __assign({ isEnabled: function (feature) {
var configuration = tslib_1.__assign({ isEnabled: function (feature) {
return includes(enableExperimentalFeatures, feature);

@@ -44,0 +44,0 @@ }, logsEndpoint: getEndpoint('browser', transportConfiguration), rumEndpoint: getEndpoint('rum', transportConfiguration), traceEndpoint: getEndpoint('public-trace', transportConfiguration) }, DEFAULT_CONFIGURATION);

@@ -31,3 +31,3 @@ import { Configuration } from './configuration';

export declare type ErrorObservable = Observable<ErrorMessage>;
export declare function startErrorCollection(configuration: Configuration): ErrorObservable;
export declare function startErrorCollection(configuration: Configuration): Observable<ErrorMessage>;
export declare function filterErrors(configuration: Configuration, errorObservable: Observable<ErrorMessage>): Observable<ErrorMessage>;

@@ -34,0 +34,0 @@ export declare function startConsoleTracking(errorObservable: ErrorObservable): void;

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

import { __spreadArrays } from "tslib";
import { monitor } from './internalMonitoring';

@@ -61,3 +60,3 @@ import { Observable } from './observable';

}
originalConsoleError.apply(console, __spreadArrays([message], optionalParams));
originalConsoleError.apply(console, [message].concat(optionalParams));
errorObservable.notify({

@@ -69,3 +68,3 @@ context: {

},
message: __spreadArrays(['console error:', message], optionalParams).map(formatConsoleParameters).join(' '),
message: ['console error:', message].concat(optionalParams).map(formatConsoleParameters).join(' '),
startTime: performance.now(),

@@ -72,0 +71,0 @@ });

@@ -13,3 +13,3 @@ import { UserConfiguration } from './configuration';

configuration: import("./configuration").Configuration;
errorObservable: import("./errorCollection").ErrorObservable;
errorObservable: import("./observable").Observable<import("./errorCollection").ErrorMessage>;
internalMonitoring: import("./internalMonitoring").InternalMonitoring;

@@ -16,0 +16,0 @@ };

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

import { __assign } from "tslib";
import * as tslib_1 from "tslib";
import { buildConfiguration } from './configuration';

@@ -10,3 +10,3 @@ import { areCookiesAuthorized } from './cookie';

export function makeGlobal(stub) {
var global = __assign({}, stub);
var global = tslib_1.__assign({}, stub);
// Add an "hidden" property to set debug mode. We define it that way to hide it

@@ -13,0 +13,0 @@ // as much as possible but of course it's not a real protection.

// tslint:disable ban-types
import { __assign } from "tslib";
import * as tslib_1 from "tslib";
import lodashAssign from 'lodash.assign';

@@ -73,3 +73,3 @@ import lodashMerge from 'lodash.merge';

function addErrorToMonitoringBatch(e) {
addToMonitoringBatch(__assign(__assign({}, formatError(e)), { status: StatusType.error }));
addToMonitoringBatch(tslib_1.__assign({}, formatError(e), { status: StatusType.error }));
}

@@ -76,0 +76,0 @@ function addToMonitoringBatch(message) {

@@ -22,3 +22,3 @@ import { Observable } from './observable';

export declare type RequestObservables = [Observable<RequestStartEvent>, Observable<RequestCompleteEvent>];
export declare function startRequestCollection(): RequestObservables;
export declare function startRequestCollection(): [Observable<RequestStartEvent>, Observable<RequestCompleteEvent>];
export declare function trackXhr([requestStartObservable, requestCompleteObservable]: RequestObservables): void;

@@ -25,0 +25,0 @@ export declare function trackFetch([requestStartObservable, requestCompleteObservable]: RequestObservables): void;

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

import { __awaiter, __generator } from "tslib";
import * as tslib_1 from "tslib";
import { toStackTraceString } from './errorCollection';

@@ -91,5 +91,5 @@ import { monitor } from './internalMonitoring';

});
var reportFetch = function (response) { return __awaiter(_this, void 0, void 0, function () {
var reportFetch = function (response) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var duration, url, stackTrace, text, e_1;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -96,0 +96,0 @@ case 0:

@@ -26,4 +26,7 @@ import { Configuration } from './configuration';

instance: any;
getEntryTypes(): any;
fakeEntry(entry: PerformanceEntry, entryType: string): void;
getStub(): PerformanceObserver;
}
export declare function setPageVisibility(visibility: 'visible' | 'hidden'): void;
export declare function restorePageVisibility(): void;

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

import { __assign, __awaiter, __generator } from "tslib";
import * as tslib_1 from "tslib";
import { noop } from './utils';

@@ -56,9 +56,9 @@ export var SPEC_ENDPOINTS = {

});
promise.resolveWith = function (response) { return __awaiter(_this, void 0, void 0, function () {
promise.resolveWith = function (response) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
return [2 /*return*/, resolve(__assign(__assign({}, response), { clone: function () {
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, resolve(tslib_1.__assign({}, response, { clone: function () {
var cloned = {
text: function () { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
text: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
if (response.responseTextError) {

@@ -75,3 +75,3 @@ throw response.responseTextError;

}); };
promise.rejectWith = function (error) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
promise.rejectWith = function (error) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, reject(error)];

@@ -88,2 +88,6 @@ }); }); };

}
PerformanceObserverStubBuilder.prototype.getEntryTypes = function () {
// tslint:disable-next-line: no-unsafe-any
return this.instance.entryTypes;
};
PerformanceObserverStubBuilder.prototype.fakeEntry = function (entry, entryType) {

@@ -113,3 +117,6 @@ var asEntryList = function () { return [entry]; };

class_1.prototype.observe = function (options) {
// do nothing
if (options) {
// tslint:disable-next-line: no-unsafe-any
builder.instance.entryTypes = options.entryTypes;
}
};

@@ -124,2 +131,13 @@ return class_1;

export { PerformanceObserverStubBuilder };
export function setPageVisibility(visibility) {
Object.defineProperty(document, 'visibilityState', {
get: function () {
return visibility;
},
configurable: true,
});
}
export function restorePageVisibility() {
delete document.visibilityState;
}
//# sourceMappingURL=specHelper.js.map

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

import { __spreadArrays } from "tslib";
import lodashMerge from 'lodash.merge';

@@ -63,3 +62,3 @@ import { monitor } from './internalMonitoring';

if (this.bufferMessageCount !== 0) {
var messages = __spreadArrays(this.pushOnlyBuffer, objectValues(this.upsertBuffer));
var messages = this.pushOnlyBuffer.concat(objectValues(this.upsertBuffer));
this.request.send(messages.join('\n'), this.bufferBytesSize);

@@ -66,0 +65,0 @@ this.pushOnlyBuffer = [];

{
"name": "@datadog/browser-core",
"version": "1.11.2",
"version": "1.11.3",
"license": "Apache-2.0",

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

},
"gitHead": "b5cff10e609243eebd48c1b916b3af17fe0115d3"
"gitHead": "028354ee47756c0b8d49d0e8f8706dd8d43ef4c7"
}

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc