Socket
Socket
Sign inDemoInstall

@datadog/browser-core

Package Overview
Dependencies
Maintainers
1
Versions
256
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/browser-core - npm Package Compare versions

Comparing version 1.9.0 to 1.9.1

1

cjs/oldCookiesMigration.d.ts
import { CookieCache } from './cookie';
export declare const OLD_SESSION_COOKIE_NAME = "_dd";
export declare const OLD_RUM_COOKIE_NAME = "_dd_r";

@@ -3,0 +4,0 @@ export declare const OLD_LOGS_COOKIE_NAME = "_dd_l";

5

cjs/oldCookiesMigration.js

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

var sessionManagement_1 = require("./sessionManagement");
// duplicate values to avoid dependency issues
exports.OLD_SESSION_COOKIE_NAME = '_dd';
exports.OLD_RUM_COOKIE_NAME = '_dd_r';
exports.OLD_LOGS_COOKIE_NAME = '_dd_l';
// duplicate values to avoid dependency issues
exports.RUM_SESSION_KEY = 'rum';

@@ -17,3 +18,3 @@ exports.LOGS_SESSION_KEY = 'logs';

var sessionString = sessionCookie.get();
var oldSessionId = cookie_1.getCookie(sessionManagement_1.OLD_SESSION_COOKIE_NAME);
var oldSessionId = cookie_1.getCookie(exports.OLD_SESSION_COOKIE_NAME);
var oldRumType = cookie_1.getCookie(exports.OLD_RUM_COOKIE_NAME);

@@ -20,0 +21,0 @@ var oldLogsType = cookie_1.getCookie(exports.OLD_LOGS_COOKIE_NAME);

import { CookieCache } from './cookie';
import { Observable } from './observable';
export declare const SESSION_COOKIE_NAME = "_dd_s";
export declare const OLD_SESSION_COOKIE_NAME = "_dd";
export declare const EXPIRATION_DELAY: number;

@@ -17,8 +16,4 @@ export interface Session<T> {

* Limit access to cookie to avoid performance issues
*
* Old cookies are maintained only to allow rollback without compatibility issue
* Since the new version does not update the old cookies,
* pages in both old and new format should live together without issue
*/
export declare function startSessionManagement<Type extends string>(sessionTypeKey: string, oldCookieName: string, computeSessionState: (rawType?: string) => {
export declare function startSessionManagement<Type extends string>(sessionTypeKey: string, computeSessionState: (rawType?: string) => {
type: Type;

@@ -25,0 +20,0 @@ isTracked: boolean;

@@ -9,12 +9,7 @@ "use strict";

exports.SESSION_COOKIE_NAME = '_dd_s';
exports.OLD_SESSION_COOKIE_NAME = '_dd';
exports.EXPIRATION_DELAY = 15 * utils.ONE_MINUTE;
/**
* Limit access to cookie to avoid performance issues
*
* Old cookies are maintained only to allow rollback without compatibility issue
* Since the new version does not update the old cookies,
* pages in both old and new format should live together without issue
*/
function startSessionManagement(sessionTypeKey, oldCookieName, computeSessionState) {
function startSessionManagement(sessionTypeKey, computeSessionState) {
var sessionCookie = cookie_1.cacheCookieAccess(exports.SESSION_COOKIE_NAME);

@@ -24,4 +19,2 @@ oldCookiesMigration_1.tryOldCookiesMigration(sessionCookie);

var currentSessionId = retrieveSession(sessionCookie).id;
var oldSessionId = cookie_1.cacheCookieAccess(exports.OLD_SESSION_COOKIE_NAME);
var oldSessionType = cookie_1.cacheCookieAccess(oldCookieName);
var expandOrRenewSession = utils.throttle(function () {

@@ -36,7 +29,2 @@ var session = retrieveSession(sessionCookie);

persistSession(session, sessionCookie);
// update old cookies
oldSessionType.set(type, exports.EXPIRATION_DELAY);
if (isTracked) {
oldSessionId.set(session.id, exports.EXPIRATION_DELAY);
}
// If the session id has changed, notify that the session has been renewed

@@ -43,0 +31,0 @@ if (isTracked && currentSessionId !== session.id) {

import { CookieCache } from './cookie';
export declare const OLD_SESSION_COOKIE_NAME = "_dd";
export declare const OLD_RUM_COOKIE_NAME = "_dd_r";

@@ -3,0 +4,0 @@ export declare const OLD_LOGS_COOKIE_NAME = "_dd_l";

import { getCookie } from './cookie';
import { OLD_SESSION_COOKIE_NAME, persistSession } from './sessionManagement';
// duplicate values to avoid dependency issues
import { persistSession } from './sessionManagement';
export var OLD_SESSION_COOKIE_NAME = '_dd';
export var OLD_RUM_COOKIE_NAME = '_dd_r';
export var OLD_LOGS_COOKIE_NAME = '_dd_l';
// duplicate values to avoid dependency issues
export var RUM_SESSION_KEY = 'rum';

@@ -7,0 +8,0 @@ export var LOGS_SESSION_KEY = 'logs';

import { CookieCache } from './cookie';
import { Observable } from './observable';
export declare const SESSION_COOKIE_NAME = "_dd_s";
export declare const OLD_SESSION_COOKIE_NAME = "_dd";
export declare const EXPIRATION_DELAY: number;

@@ -17,8 +16,4 @@ export interface Session<T> {

* Limit access to cookie to avoid performance issues
*
* Old cookies are maintained only to allow rollback without compatibility issue
* Since the new version does not update the old cookies,
* pages in both old and new format should live together without issue
*/
export declare function startSessionManagement<Type extends string>(sessionTypeKey: string, oldCookieName: string, computeSessionState: (rawType?: string) => {
export declare function startSessionManagement<Type extends string>(sessionTypeKey: string, computeSessionState: (rawType?: string) => {
type: Type;

@@ -25,0 +20,0 @@ isTracked: boolean;

@@ -6,12 +6,7 @@ import { cacheCookieAccess, COOKIE_ACCESS_DELAY } from './cookie';

export var SESSION_COOKIE_NAME = '_dd_s';
export var OLD_SESSION_COOKIE_NAME = '_dd';
export var EXPIRATION_DELAY = 15 * utils.ONE_MINUTE;
/**
* Limit access to cookie to avoid performance issues
*
* Old cookies are maintained only to allow rollback without compatibility issue
* Since the new version does not update the old cookies,
* pages in both old and new format should live together without issue
*/
export function startSessionManagement(sessionTypeKey, oldCookieName, computeSessionState) {
export function startSessionManagement(sessionTypeKey, computeSessionState) {
var sessionCookie = cacheCookieAccess(SESSION_COOKIE_NAME);

@@ -21,4 +16,2 @@ tryOldCookiesMigration(sessionCookie);

var currentSessionId = retrieveSession(sessionCookie).id;
var oldSessionId = cacheCookieAccess(OLD_SESSION_COOKIE_NAME);
var oldSessionType = cacheCookieAccess(oldCookieName);
var expandOrRenewSession = utils.throttle(function () {

@@ -33,7 +26,2 @@ var session = retrieveSession(sessionCookie);

persistSession(session, sessionCookie);
// update old cookies
oldSessionType.set(type, EXPIRATION_DELAY);
if (isTracked) {
oldSessionId.set(session.id, EXPIRATION_DELAY);
}
// If the session id has changed, notify that the session has been renewed

@@ -40,0 +28,0 @@ if (isTracked && currentSessionId !== session.id) {

{
"name": "@datadog/browser-core",
"version": "1.9.0",
"version": "1.9.1",
"license": "Apache-2.0",

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

},
"gitHead": "ec50e3c9801ddfc3dc55caa8a78a7559adc74339"
"gitHead": "88a6e91a6e5ad395879cea173c0ac9b4abacd608"
}

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