posthog-js
Advanced tools
Comparing version 1.152.0 to 1.152.1
@@ -341,3 +341,3 @@ import type { MaskInputOptions, SlimDOMOptions } from 'rrweb-snapshot'; | ||
get: (name: string) => any; | ||
set: (name: string, value: any, expire_days?: number | null, cross_subdomain?: boolean, secure?: boolean) => void; | ||
set: (name: string, value: any, expire_days?: number | null, cross_subdomain?: boolean, secure?: boolean, debug?: boolean) => void; | ||
remove: (name: string, cross_subdomain?: boolean) => void; | ||
@@ -344,0 +344,0 @@ } |
{ | ||
"name": "posthog-js", | ||
"version": "1.152.0", | ||
"version": "1.152.1", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
@@ -111,3 +111,3 @@ /* eslint camelcase: "off" */ | ||
} | ||
this.storage.set(this.name, this.props, this.expire_days, this.cross_subdomain, this.secure); | ||
this.storage.set(this.name, this.props, this.expire_days, this.cross_subdomain, this.secure, this.config.debug); | ||
}; | ||
@@ -114,0 +114,0 @@ PostHogPersistence.prototype.remove = function () { |
@@ -121,3 +121,3 @@ var __assign = (this && this.__assign) || function () { | ||
}, | ||
set: function (name, value, days, cross_subdomain, is_secure) { | ||
set: function (name, value, days, cross_subdomain, is_secure, debug) { | ||
if (!document) { | ||
@@ -148,2 +148,5 @@ return; | ||
} | ||
if (debug) { | ||
logger.info('cookie set', new_cookie_val); | ||
} | ||
document.cookie = new_cookie_val; | ||
@@ -215,4 +218,7 @@ return new_cookie_val; | ||
}, | ||
set: function (name, value) { | ||
set: function (name, value, _days, _cross_subdomain, _secure, debug) { | ||
try { | ||
if (debug) { | ||
logger.info('localStorage set', name, value); | ||
} | ||
window === null || window === void 0 ? void 0 : window.localStorage.setItem(name, JSON.stringify(value)); | ||
@@ -253,5 +259,5 @@ } | ||
return null; | ||
}, set: function (name, value, days, cross_subdomain, is_secure) { | ||
}, set: function (name, value, days, cross_subdomain, is_secure, debug) { | ||
try { | ||
localStore.set(name, value); | ||
localStore.set(name, value, undefined, undefined, debug); | ||
var cookiePersistedProperties_1 = {}; | ||
@@ -264,3 +270,3 @@ COOKIE_PERSISTED_PROPERTIES.forEach(function (key) { | ||
if (Object.keys(cookiePersistedProperties_1).length) { | ||
cookieStore.set(name, cookiePersistedProperties_1, days, cross_subdomain, is_secure); | ||
cookieStore.set(name, cookiePersistedProperties_1, days, cross_subdomain, is_secure, debug); | ||
} | ||
@@ -352,4 +358,7 @@ } | ||
}, | ||
set: function (name, value) { | ||
set: function (name, value, _days, _cross_subdomain, _secure, debug) { | ||
try { | ||
if (debug) { | ||
logger.info('sessionStorage set', name, value); | ||
} | ||
window === null || window === void 0 ? void 0 : window.sessionStorage.setItem(name, JSON.stringify(value)); | ||
@@ -356,0 +365,0 @@ } |
@@ -341,3 +341,3 @@ import type { MaskInputOptions, SlimDOMOptions } from 'rrweb-snapshot'; | ||
get: (name: string) => any; | ||
set: (name: string, value: any, expire_days?: number | null, cross_subdomain?: boolean, secure?: boolean) => void; | ||
set: (name: string, value: any, expire_days?: number | null, cross_subdomain?: boolean, secure?: boolean, debug?: boolean) => void; | ||
remove: (name: string, cross_subdomain?: boolean) => void; | ||
@@ -344,0 +344,0 @@ } |
{ | ||
"name": "posthog-js", | ||
"version": "1.152.0", | ||
"version": "1.152.1", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7798355
25227
10