Socket
Socket
Sign inDemoInstall

@datadog/browser-core

Package Overview
Dependencies
0
Maintainers
1
Versions
248
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.42.0 to 4.42.1

2

cjs/boot/init.js

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

var publicApi = (0, polyfills_1.assign)({
version: "4.42.0",
version: "4.42.1",
// This API method is intentionally not monitored, since the only thing executed is the

@@ -12,0 +12,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and

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

var clientToken = _a.clientToken, internalAnalyticsSubdomain = _a.internalAnalyticsSubdomain;
var tags = ["sdk_version:".concat("4.42.0"), "api:".concat(api)].concat(configurationTags);
var tags = ["sdk_version:".concat("4.42.1"), "api:".concat(api)].concat(configurationTags);
if (flushReason && (0, experimentalFeatures_1.isExperimentalFeatureEnabled)(experimentalFeatures_1.ExperimentalFeature.COLLECT_FLUSH_REASON)) {

@@ -81,3 +81,3 @@ tags.push("flush_reason:".concat(flushReason));

"dd-api-key=".concat(clientToken),
"dd-evp-origin-version=".concat(encodeURIComponent("4.42.0")),
"dd-evp-origin-version=".concat(encodeURIComponent("4.42.1")),
'dd-evp-origin=browser',

@@ -84,0 +84,0 @@ "dd-request-id=".concat((0, stringUtils_1.generateUUID)()),

@@ -27,7 +27,6 @@ "use strict";

exports.resetConsoleObservable = resetConsoleObservable;
/* eslint-disable no-console */
function createConsoleObservable(api) {
var observable = new observable_1.Observable(function () {
var originalConsoleApi = console[api];
console[api] = function () {
var originalConsoleApi = display_1.globalConsole[api];
display_1.globalConsole[api] = function () {
var params = [];

@@ -44,3 +43,3 @@ for (var _i = 0; _i < arguments.length; _i++) {

return function () {
console[api] = originalConsoleApi;
display_1.globalConsole[api] = originalConsoleApi;
};

@@ -47,0 +46,0 @@ });

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

service: telemetryService,
version: "4.42.0",
version: "4.42.1",
source: 'browser',

@@ -54,0 +54,0 @@ _dd: {

@@ -25,2 +25,12 @@ /**

export declare const display: Display;
/**
* When building JS bundles, some users might use a plugin[1] or configuration[2] to remove
* "console.*" references. This causes some issue as we expect `console.*` to be defined.
* As a workaround, let's use a variable alias, so those expressions won't be taken into account by
* simple static analysis.
*
* [1]: https://babeljs.io/docs/babel-plugin-transform-remove-console/
* [2]: https://github.com/terser/terser#compress-options (look for drop_console)
*/
export declare const globalConsole: Console;
export {};
"use strict";
/* eslint-disable no-console, local-rules/disallow-side-effects */
/* eslint-disable local-rules/disallow-side-effects */
/**

@@ -11,3 +11,3 @@ * Keep references on console methods to avoid triggering patched behaviors

Object.defineProperty(exports, "__esModule", { value: true });
exports.display = exports.ConsoleApiName = void 0;
exports.globalConsole = exports.display = exports.ConsoleApiName = void 0;
exports.ConsoleApiName = {

@@ -31,7 +31,17 @@ log: 'log',

exports.display = display;
exports.display.debug = console.debug.bind(console);
exports.display.log = console.log.bind(console);
exports.display.info = console.info.bind(console);
exports.display.warn = console.warn.bind(console);
exports.display.error = console.error.bind(console);
/**
* When building JS bundles, some users might use a plugin[1] or configuration[2] to remove
* "console.*" references. This causes some issue as we expect `console.*` to be defined.
* As a workaround, let's use a variable alias, so those expressions won't be taken into account by
* simple static analysis.
*
* [1]: https://babeljs.io/docs/babel-plugin-transform-remove-console/
* [2]: https://github.com/terser/terser#compress-options (look for drop_console)
*/
exports.globalConsole = console;
exports.display.debug = exports.globalConsole.debug.bind(exports.globalConsole);
exports.display.log = exports.globalConsole.log.bind(exports.globalConsole);
exports.display.info = exports.globalConsole.info.bind(exports.globalConsole);
exports.display.warn = exports.globalConsole.warn.bind(exports.globalConsole);
exports.display.error = exports.globalConsole.error.bind(exports.globalConsole);
//# sourceMappingURL=display.js.map

@@ -6,3 +6,3 @@ import { catchUserErrors } from '../tools/catchUserErrors';

var publicApi = assign({
version: "4.42.0",
version: "4.42.1",
// This API method is intentionally not monitored, since the only thing executed is the

@@ -9,0 +9,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and

@@ -65,3 +65,3 @@ import { timeStampNow } from '../../tools/utils/timeUtils';

var clientToken = _a.clientToken, internalAnalyticsSubdomain = _a.internalAnalyticsSubdomain;
var tags = ["sdk_version:".concat("4.42.0"), "api:".concat(api)].concat(configurationTags);
var tags = ["sdk_version:".concat("4.42.1"), "api:".concat(api)].concat(configurationTags);
if (flushReason && isExperimentalFeatureEnabled(ExperimentalFeature.COLLECT_FLUSH_REASON)) {

@@ -77,3 +77,3 @@ tags.push("flush_reason:".concat(flushReason));

"dd-api-key=".concat(clientToken),
"dd-evp-origin-version=".concat(encodeURIComponent("4.42.0")),
"dd-evp-origin-version=".concat(encodeURIComponent("4.42.1")),
'dd-evp-origin=browser',

@@ -80,0 +80,0 @@ "dd-request-id=".concat(generateUUID()),

import { computeStackTrace } from '../tracekit';
import { createHandlingStack, formatErrorMessage, toStackTraceString, tryToGetFingerprint } from '../error/error';
import { mergeObservables, Observable } from '../../tools/observable';
import { ConsoleApiName } from '../../tools/display';
import { ConsoleApiName, globalConsole } from '../../tools/display';
import { callMonitored } from '../../tools/monitor';

@@ -22,7 +22,6 @@ import { sanitize } from '../../tools/serialisation/sanitize';

}
/* eslint-disable no-console */
function createConsoleObservable(api) {
var observable = new Observable(function () {
var originalConsoleApi = console[api];
console[api] = function () {
var originalConsoleApi = globalConsole[api];
globalConsole[api] = function () {
var params = [];

@@ -39,3 +38,3 @@ for (var _i = 0; _i < arguments.length; _i++) {

return function () {
console[api] = originalConsoleApi;
globalConsole[api] = originalConsoleApi;
};

@@ -42,0 +41,0 @@ });

@@ -48,3 +48,3 @@ import { ConsoleApiName } from '../../tools/display';

service: telemetryService,
version: "4.42.0",
version: "4.42.1",
source: 'browser',

@@ -51,0 +51,0 @@ _dd: {

@@ -25,2 +25,12 @@ /**

export declare const display: Display;
/**
* When building JS bundles, some users might use a plugin[1] or configuration[2] to remove
* "console.*" references. This causes some issue as we expect `console.*` to be defined.
* As a workaround, let's use a variable alias, so those expressions won't be taken into account by
* simple static analysis.
*
* [1]: https://babeljs.io/docs/babel-plugin-transform-remove-console/
* [2]: https://github.com/terser/terser#compress-options (look for drop_console)
*/
export declare const globalConsole: Console;
export {};

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

/* eslint-disable no-console, local-rules/disallow-side-effects */
/* eslint-disable local-rules/disallow-side-effects */
/**

@@ -26,7 +26,17 @@ * Keep references on console methods to avoid triggering patched behaviors

};
display.debug = console.debug.bind(console);
display.log = console.log.bind(console);
display.info = console.info.bind(console);
display.warn = console.warn.bind(console);
display.error = console.error.bind(console);
/**
* When building JS bundles, some users might use a plugin[1] or configuration[2] to remove
* "console.*" references. This causes some issue as we expect `console.*` to be defined.
* As a workaround, let's use a variable alias, so those expressions won't be taken into account by
* simple static analysis.
*
* [1]: https://babeljs.io/docs/babel-plugin-transform-remove-console/
* [2]: https://github.com/terser/terser#compress-options (look for drop_console)
*/
export var globalConsole = console;
display.debug = globalConsole.debug.bind(globalConsole);
display.log = globalConsole.log.bind(globalConsole);
display.info = globalConsole.info.bind(globalConsole);
display.warn = globalConsole.warn.bind(globalConsole);
display.error = globalConsole.error.bind(globalConsole);
//# sourceMappingURL=display.js.map
{
"name": "@datadog/browser-core",
"version": "4.42.0",
"version": "4.42.1",
"license": "Apache-2.0",

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

},
"gitHead": "ce3a34d112bb660116de64da3c57590581d62f77"
"gitHead": "bf33aad37a936d2a3ca20a6ea9abbfcb7b032339"
}
import { computeStackTrace } from '../tracekit'
import { createHandlingStack, formatErrorMessage, toStackTraceString, tryToGetFingerprint } from '../error/error'
import { mergeObservables, Observable } from '../../tools/observable'
import { ConsoleApiName } from '../../tools/display'
import { ConsoleApiName, globalConsole } from '../../tools/display'
import { callMonitored } from '../../tools/monitor'

@@ -35,8 +35,7 @@ import { sanitize } from '../../tools/serialisation/sanitize'

/* eslint-disable no-console */
function createConsoleObservable(api: ConsoleApiName) {
const observable = new Observable<ConsoleLog>(() => {
const originalConsoleApi = console[api]
const originalConsoleApi = globalConsole[api]
console[api] = (...params: unknown[]) => {
globalConsole[api] = (...params: unknown[]) => {
originalConsoleApi.apply(console, params)

@@ -51,3 +50,3 @@ const handlingStack = createHandlingStack()

return () => {
console[api] = originalConsoleApi
globalConsole[api] = originalConsoleApi
}

@@ -54,0 +53,0 @@ })

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

/* eslint-disable no-console, local-rules/disallow-side-effects */
/* eslint-disable local-rules/disallow-side-effects */
/**

@@ -36,6 +36,17 @@ * Keep references on console methods to avoid triggering patched behaviors

display.debug = console.debug.bind(console)
display.log = console.log.bind(console)
display.info = console.info.bind(console)
display.warn = console.warn.bind(console)
display.error = console.error.bind(console)
/**
* When building JS bundles, some users might use a plugin[1] or configuration[2] to remove
* "console.*" references. This causes some issue as we expect `console.*` to be defined.
* As a workaround, let's use a variable alias, so those expressions won't be taken into account by
* simple static analysis.
*
* [1]: https://babeljs.io/docs/babel-plugin-transform-remove-console/
* [2]: https://github.com/terser/terser#compress-options (look for drop_console)
*/
export const globalConsole = console
display.debug = globalConsole.debug.bind(globalConsole)
display.log = globalConsole.log.bind(globalConsole)
display.info = globalConsole.info.bind(globalConsole)
display.warn = globalConsole.warn.bind(globalConsole)
display.error = globalConsole.error.bind(globalConsole)

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc