-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/integration-test-opting-out
- Loading branch information
Showing
18 changed files
with
526 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
{ | ||
"presets": ["@babel/preset-env", "@babel/preset-typescript"] | ||
"presets": ["@babel/env", ["@babel/typescript", { "jsxPragma": "h" }]], | ||
"plugins": [ | ||
[ | ||
"@babel/transform-react-jsx", | ||
{ | ||
"pragma": "Preact.h", | ||
"pragmaFrag": "Preact.Fragment" | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "posthog-js", | ||
"version": "1.98.1", | ||
"version": "1.100.0", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
"repository": "https://github.com/PostHog/posthog-js", | ||
"author": "[email protected]", | ||
|
@@ -31,15 +31,18 @@ | |
"react/package.json" | ||
], | ||
"dependencies": { | ||
"fflate": "^0.4.1" | ||
"fflate": "^0.4.1", | ||
"preact": "^10.19.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.18.9", | ||
"@babel/plugin-syntax-decorators": "^7.23.3", | ||
"@babel/plugin-transform-react-jsx": "^7.23.4", | ||
"@babel/preset-env": "7.18.9", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@rollup/plugin-babel": "^5.3.1", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@rollup/plugin-terser": "^0.4.0", | ||
"@rollup/plugin-typescript": "^8.3.3", | ||
"@rrweb/types": "^2.0.0-alpha.11", | ||
|
@@ -50,12 +53,12 @@ | |
"@types/react-dom": "^18.0.10", | ||
"@types/sinon": "^17.0.1", | ||
"@types/uuid": "^9.0.1", | ||
"@typescript-eslint/eslint-plugin": "^6.4.0", | ||
"@typescript-eslint/parser": "^6.4.0", | ||
"@typescript-eslint/eslint-plugin": "^6.19.0", | ||
"@typescript-eslint/parser": "^6.19.0", | ||
"babel-eslint": "10.1.0", | ||
"babel-jest": "^26.6.3", | ||
"cypress": "13.6.3", | ||
"eslint": "8.20.0", | ||
"eslint": "8.56.0", | ||
"eslint-config-posthog-js": "link:./eslint-rules", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-compat": "^4.1.4", | ||
|
@@ -77,7 +80,7 @@ | |
"node-fetch": "^2.6.1", | ||
"posthog-js": "link:.", | ||
"prettier": "^2.7.1", | ||
"rollup": "^2.77.0", | ||
"rollup": "^2.78.0", | ||
"rollup-plugin-dts": "^4.2.2", | ||
"rollup-plugin-visualizer": "^5.9.0", | ||
"rrweb": "2.0.0-alpha.11", | ||
|
@@ -87,7 +90,7 @@ | |
"testcafe": "1.19.0", | ||
"testcafe-browser-provider-browserstack": "1.14.0", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.7.4", | ||
"typescript": "^4.9.0", | ||
"yargs": "^17.7.2" | ||
}, | ||
"lint-staged": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { Html, Head, Main, NextScript } from 'next/document' | ||
import React from 'react' | ||
|
||
export default function Document() { | ||
return ( | ||
<Html lang="en"> | ||
<Head /> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
) | ||
return ( | ||
<Html lang="en"> | ||
<Head /> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import Head from 'next/head' | ||
import Link from 'next/link' | ||
import React, { useEffect } from 'react' | ||
|
||
export default function Home() { | ||
useEffect(() => { | ||
const html = document.querySelector('html') | ||
const body = document.querySelector('body') | ||
const nextRoot = document.querySelector<HTMLDivElement>('div#__next') | ||
if (!html || !body || !nextRoot) return | ||
html.style.height = '100%' | ||
html.style.overflow = 'hidden' | ||
body.style.height = '100%' | ||
nextRoot.style.height = '100%' | ||
return () => { | ||
html.style.height = '' | ||
html.style.overflow = '' | ||
body.style.height = '' | ||
nextRoot.style.height = '' | ||
} | ||
}, []) | ||
|
||
return ( | ||
<> | ||
<Head> | ||
<title>PostHog</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
</Head> | ||
<main | ||
id="scroll_element" | ||
style={{ | ||
height: '100%', | ||
overflow: 'scroll', | ||
margin: 0, | ||
padding: 0, | ||
}} | ||
> | ||
<div | ||
style={{ | ||
height: '4000px', | ||
overflow: 'hidden', | ||
}} | ||
> | ||
<h1>A long page</h1> | ||
<p> | ||
The window itself does not scroll, the <code>main</code> element does. The content is exactly | ||
4000px tall. | ||
</p> | ||
<div className="buttons"> | ||
<Link href="/">Home</Link> | ||
</div> | ||
|
||
{Array.from({ length: 100 }, (_, i) => ( | ||
<p key={i}> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut | ||
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco | ||
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in | ||
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat | ||
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</p> | ||
))} | ||
|
||
<div className="buttons"> | ||
<Link href="/">Home</Link> | ||
</div> | ||
</div> | ||
</main> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.