posthog-js 1.28.0 → 1.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "posthog-js",
3
+ "version": "1.29.2",
4
+ "description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
5
+ "repository": "https://github.com/PostHog/posthog-js",
6
+ "author": "hey@posthog.com",
7
+ "license": "MIT",
8
+ "scripts": {
9
+ "start": "yarn build-rollup -w",
10
+ "build": "yarn build-rollup && yarn build-react",
11
+ "build-rollup": "yarn build:prepare-types && rollup -c",
12
+ "build-react": "cd react; yarn; yarn build;",
13
+ "build:prepare-types": "yarn build:prepare-types:tsc && yarn build:prepare-types:copy && yarn build:prepare-types:fix && yarn build:prepare-types:rename-1 && yarn build:prepare-types:rename-2 && yarn build:prepare-types:rename-3 && yarn build:prepare-types:rename-4 && yarn build:prepare-types:rename-5 && yarn build:prepare-types:rename-6",
14
+ "build:prepare-types:tsc": "rm -rf lib && tsc -b",
15
+ "build:prepare-types:copy": "rm -rf lib/rrweb && rm -rf lib/rrweb-snapshot && cp -a node_modules/rrweb lib/rrweb; cp -a node_modules/rrweb-snapshot/typings lib/rrweb-snapshot",
16
+ "build:prepare-types:fix": "cd lib/rrweb/typings/replay && cat index.d.ts |grep -v 'styles/style.css' > x && mv x index.d.ts",
17
+ "build:prepare-types:rename-1": "cd lib/rrweb/typings/record && sed 's/rrweb-snapshot/..\\/..\\/..\\/rrweb-snapshot/g' iframe-manager.d.ts > x && mv x iframe-manager.d.ts",
18
+ "build:prepare-types:rename-2": "cd lib/rrweb/typings/replay && sed 's/rrweb-snapshot/..\\/..\\/..\\/rrweb-snapshot/g' virtual-styles.d.ts > x && mv x virtual-styles.d.ts",
19
+ "build:prepare-types:rename-3": "cd lib/rrweb/typings && sed 's/rrweb-snapshot/..\\/..\\/rrweb-snapshot/g' types.d.ts > x && mv x types.d.ts",
20
+ "build:prepare-types:rename-4": "cd lib/rrweb/typings && sed 's/rrweb-snapshot/..\\/..\\/rrweb-snapshot/g' utils.d.ts > x && mv x utils.d.ts",
21
+ "build:prepare-types:rename-5": "cd lib/src/extensions && sed 's/rrweb\\/typings/..\\/..\\/rrweb\\/typings/g' sessionrecording.d.ts > x && mv x sessionrecording.d.ts",
22
+ "build:prepare-types:rename-6": "cd lib/src && sed 's/rrweb-snapshot/..\\/rrweb-snapshot/g' types.d.ts > x && mv x types.d.ts",
23
+ "lint": "eslint ./src/**/*.{ts,js}",
24
+ "prettier": "prettier --write src/**/*",
25
+ "prepublishOnly": "yarn lint && yarn test && yarn build && yarn test-react",
26
+ "test": "jest",
27
+ "test-react": "cd react; yarn test",
28
+ "test-watch": "jest --watch",
29
+ "cypress": "cypress open"
30
+ },
31
+ "main": "dist/module.js",
32
+ "module": "dist/es.js",
33
+ "types": "dist/module.d.ts",
34
+ "files": [
35
+ "lib/*",
36
+ "dist/*",
37
+ "react/dist/*"
38
+ ],
39
+ "dependencies": {
40
+ "@sentry/types": "^7.2.0",
41
+ "fflate": "^0.4.1",
42
+ "rrweb-snapshot": "^1.1.14"
43
+ },
44
+ "devDependencies": {
45
+ "@babel/core": "7.18.9",
46
+ "@babel/preset-env": "7.18.9",
47
+ "@babel/preset-typescript": "^7.18.6",
48
+ "@rollup/plugin-babel": "^5.3.1",
49
+ "@rollup/plugin-json": "^4.1.0",
50
+ "@rollup/plugin-node-resolve": "^13.3.0",
51
+ "@rollup/plugin-typescript": "^8.3.3",
52
+ "@typescript-eslint/eslint-plugin": "^5.30.7",
53
+ "@typescript-eslint/parser": "^5.30.7",
54
+ "babel-eslint": "10.1.0",
55
+ "babel-jest": "^26.6.3",
56
+ "cypress": "10.3.1",
57
+ "eslint": "8.20.0",
58
+ "eslint-config-prettier": "^8.5.0",
59
+ "eslint-plugin-prettier": "^4.2.1",
60
+ "eslint-plugin-react": "^7.30.1",
61
+ "eslint-plugin-react-hooks": "^4.6.0",
62
+ "fast-check": "^2.17.0",
63
+ "given2": "^2.1.7",
64
+ "husky": "^4.2.5",
65
+ "jest": "^27.5.1",
66
+ "jsdom": "16.2.2",
67
+ "jsdom-global": "3.0.2",
68
+ "lint-staged": "^10.2.11",
69
+ "localStorage": "1.0.4",
70
+ "node-fetch": "^2.6.1",
71
+ "posthog-js": "link:.",
72
+ "prettier": "^2.7.1",
73
+ "rollup": "^2.77.0",
74
+ "rollup-plugin-dts": "^4.2.2",
75
+ "rollup-plugin-terser": "^7.0.2",
76
+ "rrweb": "^1.1.3",
77
+ "sinon": "9.0.2",
78
+ "testcafe": "^1.19.0",
79
+ "testcafe-browser-provider-browserstack": "^1.14.0",
80
+ "tslib": "^2.4.0",
81
+ "typescript": "^4.7.4"
82
+ },
83
+ "lint-staged": {
84
+ "*.{ts,tsx,js,json}": "prettier --write",
85
+ "*.js": "eslint --fix",
86
+ "*.{ts,tsx}": [
87
+ "eslint --fix",
88
+ "tsc --noEmit --esModuleInterop --jsx react"
89
+ ]
90
+ }
91
+ }
package/package.json CHANGED
@@ -1,17 +1,25 @@
1
1
  {
2
2
  "name": "posthog-js",
3
- "version": "1.28.0",
3
+ "version": "1.29.2",
4
4
  "description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
5
5
  "repository": "https://github.com/PostHog/posthog-js",
6
6
  "author": "hey@posthog.com",
7
7
  "license": "MIT",
8
8
  "scripts": {
9
- "start": "parcel watch src/loader-globals.ts --out-file dist/array.js",
10
- "serve": "parcel serve src/loader-globals.ts --port 3001 --out-file dist/array.js",
11
- "build": "yarn build-array && yarn build-rollup && yarn build-react",
12
- "build-array": "parcel build src/loader-globals.ts --out-file dist/array.js --public-url=/static",
13
- "build-rollup": "tsc -b && rollup -c",
9
+ "start": "yarn build-rollup -w",
10
+ "build": "yarn build-rollup && yarn build-react",
11
+ "build-rollup": "yarn build:prepare-types && rollup -c",
14
12
  "build-react": "cd react; yarn; yarn build;",
13
+ "build:prepare-types": "yarn build:prepare-types:tsc && yarn build:prepare-types:copy && yarn build:prepare-types:fix && yarn build:prepare-types:rename-1 && yarn build:prepare-types:rename-2 && yarn build:prepare-types:rename-3 && yarn build:prepare-types:rename-4 && yarn build:prepare-types:rename-5 && yarn build:prepare-types:rename-6",
14
+ "build:prepare-types:tsc": "rm -rf lib && tsc -b",
15
+ "build:prepare-types:copy": "rm -rf lib/rrweb && rm -rf lib/rrweb-snapshot && cp -a node_modules/rrweb lib/rrweb; cp -a node_modules/rrweb-snapshot/typings lib/rrweb-snapshot",
16
+ "build:prepare-types:fix": "cd lib/rrweb/typings/replay && cat index.d.ts |grep -v 'styles/style.css' > x && mv x index.d.ts",
17
+ "build:prepare-types:rename-1": "cd lib/rrweb/typings/record && sed 's/rrweb-snapshot/..\\/..\\/..\\/rrweb-snapshot/g' iframe-manager.d.ts > x && mv x iframe-manager.d.ts",
18
+ "build:prepare-types:rename-2": "cd lib/rrweb/typings/replay && sed 's/rrweb-snapshot/..\\/..\\/..\\/rrweb-snapshot/g' virtual-styles.d.ts > x && mv x virtual-styles.d.ts",
19
+ "build:prepare-types:rename-3": "cd lib/rrweb/typings && sed 's/rrweb-snapshot/..\\/..\\/rrweb-snapshot/g' types.d.ts > x && mv x types.d.ts",
20
+ "build:prepare-types:rename-4": "cd lib/rrweb/typings && sed 's/rrweb-snapshot/..\\/..\\/rrweb-snapshot/g' utils.d.ts > x && mv x utils.d.ts",
21
+ "build:prepare-types:rename-5": "cd lib/src/extensions && sed 's/rrweb\\/typings/..\\/..\\/rrweb\\/typings/g' sessionrecording.d.ts > x && mv x sessionrecording.d.ts",
22
+ "build:prepare-types:rename-6": "cd lib/src && sed 's/rrweb-snapshot/..\\/rrweb-snapshot/g' types.d.ts > x && mv x types.d.ts",
15
23
  "lint": "eslint ./src/**/*.{ts,js}",
16
24
  "prettier": "prettier --write src/**/*",
17
25
  "prepublishOnly": "yarn lint && yarn test && yarn build && yarn test-react",
@@ -24,6 +32,7 @@
24
32
  "module": "dist/es.js",
25
33
  "types": "dist/module.d.ts",
26
34
  "files": [
35
+ "lib/*",
27
36
  "dist/*",
28
37
  "react/dist/*"
29
38
  ],
@@ -59,11 +68,11 @@
59
68
  "lint-staged": "^10.2.11",
60
69
  "localStorage": "1.0.4",
61
70
  "node-fetch": "^2.6.1",
62
- "parcel": "1.12.3",
63
71
  "posthog-js": "link:.",
64
72
  "prettier": "^2.7.1",
65
73
  "rollup": "^2.77.0",
66
74
  "rollup-plugin-dts": "^4.2.2",
75
+ "rollup-plugin-terser": "^7.0.2",
67
76
  "rrweb": "^1.1.3",
68
77
  "sinon": "9.0.2",
69
78
  "testcafe": "^1.19.0",
@@ -73,6 +82,7 @@
73
82
  },
74
83
  "lint-staged": {
75
84
  "*.{ts,tsx,js,json}": "prettier --write",
85
+ "*.js": "eslint --fix",
76
86
  "*.{ts,tsx}": [
77
87
  "eslint --fix",
78
88
  "tsc --noEmit --esModuleInterop --jsx react"