posthog-js
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -0,1 +1,5 @@ | ||
## 1.7.1 - 2020-11-27 | ||
- Force session recording to use lz64 compression (https://github.com/PostHog/posthog-js/pull/134) | ||
- Bundle module.js in es5 (https://github.com/PostHog/posthog-js/pull/132) | ||
## 1.7.0 - 2020-11-26 | ||
@@ -2,0 +6,0 @@ - Send session recording events to posthog in (short) batches, separate from rest of events to make sure we drop fewer events (#126) |
@@ -103,3 +103,3 @@ // Type definitions for exported methods | ||
*/ | ||
static register_once(properties: posthog.Properties, default_value?: any, days?: number): void | ||
static register_once(properties: posthog.Properties, default_value?: posthog.Property, days?: number): void | ||
@@ -270,3 +270,3 @@ /** | ||
*/ | ||
static get_config(prop_name: string): any | ||
static get_config<T extends keyof posthog.Config>(prop_name: T): posthog.Config[T] | ||
@@ -291,3 +291,3 @@ /** | ||
*/ | ||
static get_property(property_name: string): any | ||
static get_property(property_name: string): posthog.Property | undefined | ||
@@ -449,5 +449,8 @@ /** | ||
declare namespace posthog { | ||
type Properties = { [key: string]: any } | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
type Property = any | ||
type Properties = { [key: string]: Property } | ||
type CaptureResult = { event: string; properties: Properties } | undefined | ||
type CaptureCallback = (response: any, data: any) => void | ||
/* eslint-enable @typescript-eslint/no-explicit-any */ | ||
@@ -488,3 +491,3 @@ interface Config { | ||
request_batching?: boolean | ||
sanitize_properties?: (properties: Record<string, any>, event_name: string) => Record<string, any> | ||
sanitize_properties?: (properties: posthog.Properties, event_name: string) => posthog.Properties | ||
} | ||
@@ -537,3 +540,3 @@ | ||
*/ | ||
static register_once(props: Properties, default_value?: any, days?: number): boolean | ||
static register_once(props: Properties, default_value?: Property, days?: number): boolean | ||
@@ -593,3 +596,7 @@ /** | ||
*/ | ||
static set(prop: posthog.Properties | string, to?: any, callback?: posthog.CaptureCallback): posthog.Properties | ||
static set( | ||
prop: posthog.Properties | string, | ||
to?: posthog.Property, | ||
callback?: posthog.CaptureCallback | ||
): posthog.Properties | ||
@@ -619,3 +626,3 @@ /* | ||
prop: posthog.Properties | string, | ||
to?: any, | ||
to?: posthog.Property, | ||
callback?: posthog.CaptureCallback | ||
@@ -622,0 +629,0 @@ ): posthog.Properties |
{ | ||
"name": "posthog-js", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -12,3 +12,3 @@ "repository": "https://github.com/PostHog/posthog-js", | ||
"build": "parcel build src/loader-globals.js --out-file dist/array.js --no-source-maps", | ||
"build-module": "./node_modules/.bin/rollup -i src/loader-module.js -f cjs -o dist/module.js -c rollup.config.js", | ||
"build-module": "rollup -i src/loader-module.js -f cjs -o dist/module.js -c rollup.config.js", | ||
"process-types": "mkdir -p dist; eslint src --ext .ts -c .eslintrc.ts.js --fix && tsc && cp -f src/*.d.ts dist/", | ||
@@ -29,2 +29,3 @@ "lint": "eslint src --fix", | ||
"@babel/preset-env": "^7.0.0", | ||
"@rollup/plugin-babel": "^5.2.1", | ||
"@rollup/plugin-json": "^4.1.0", | ||
@@ -36,3 +37,3 @@ "@rollup/plugin-node-resolve": "^8.1.0", | ||
"babel-jest": "^26.1.0", | ||
"cypress": "^5.5.0", | ||
"cypress": "^6.0.0", | ||
"eslint": "^7.3.1", | ||
@@ -39,0 +40,0 @@ "eslint-plugin-prettier": "^3.1.4", |
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
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
613883
25
5307