posthog-js 1.25.2 → 1.27.0-alpha2

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.
package/package.json CHANGED
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "name": "posthog-js",
3
- "version": "1.25.2",
3
+ "version": "1.27.0-alpha2",
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.js --out-file dist/array.js",
10
- "serve": "parcel serve src/loader-globals.js --port 3001 --out-file dist/array.js",
11
- "build": "yarn build-array && yarn build-module && yarn build-es-module && yarn process-types && yarn build-react",
12
- "build-array": "parcel build src/loader-globals.js --out-file dist/array.js --no-source-maps",
13
- "build-module": "rollup -i src/loader-module.js -f cjs -o dist/module.js -c rollup.config.js",
14
- "build-es-module": "rollup -i src/loader-module.js -f es -o dist/es.js -c rollup.config.js",
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",
15
14
  "build-react": "cd react; yarn; yarn build;",
16
- "process-types": "mkdir -p dist; eslint src --ext .ts -c .eslintrc.ts.js --fix && tsc && cp -f src/*.d.ts dist/",
17
- "lint": "eslint src --fix",
15
+ "lint": "eslint ./src/**/*.{ts,js}",
16
+ "prettier": "prettier --write src/**/*",
18
17
  "prepublishOnly": "yarn lint && yarn test && yarn build && yarn test-react",
19
- "test": "jest src",
18
+ "test": "jest",
20
19
  "test-react": "cd react; yarn test",
21
- "test-watch": "jest --watch src",
20
+ "test-watch": "jest --watch",
22
21
  "cypress": "cypress open"
23
22
  },
24
23
  "main": "dist/module.js",
25
24
  "module": "dist/es.js",
25
+ "types": "dist/module.d.ts",
26
26
  "files": [
27
27
  "dist/*",
28
28
  "react/dist/*"
@@ -33,20 +33,23 @@
33
33
  "rrweb-snapshot": "^1.1.14"
34
34
  },
35
35
  "devDependencies": {
36
- "@babel/core": "7.12.10",
37
- "@babel/preset-env": "7.12.11",
38
- "@rollup/plugin-babel": "^5.2.1",
36
+ "@babel/core": "7.18.9",
37
+ "@babel/preset-env": "7.18.9",
38
+ "@babel/preset-typescript": "^7.18.6",
39
+ "@rollup/plugin-babel": "^5.3.1",
39
40
  "@rollup/plugin-json": "^4.1.0",
40
- "@rollup/plugin-node-resolve": "^8.1.0",
41
- "@typescript-eslint/eslint-plugin": "^3.5.0",
42
- "@typescript-eslint/parser": "^3.5.0",
41
+ "@rollup/plugin-node-resolve": "^13.3.0",
42
+ "@rollup/plugin-typescript": "^8.3.3",
43
+ "@typescript-eslint/eslint-plugin": "^5.30.7",
44
+ "@typescript-eslint/parser": "^5.30.7",
43
45
  "babel-eslint": "10.1.0",
44
46
  "babel-jest": "^26.6.3",
45
- "cypress": "^9.2.0",
46
- "eslint": "7.3.1",
47
- "eslint-plugin-prettier": "^3.1.4",
48
- "eslint-plugin-react": "^7.21.5",
49
- "eslint-plugin-react-hooks": "^4.2.0",
47
+ "cypress": "10.3.1",
48
+ "eslint": "8.20.0",
49
+ "eslint-config-prettier": "^8.5.0",
50
+ "eslint-plugin-prettier": "^4.2.1",
51
+ "eslint-plugin-react": "^7.30.1",
52
+ "eslint-plugin-react-hooks": "^4.6.0",
50
53
  "fast-check": "^2.17.0",
51
54
  "given2": "^2.1.7",
52
55
  "husky": "^4.2.5",
@@ -56,47 +59,23 @@
56
59
  "lint-staged": "^10.2.11",
57
60
  "localStorage": "1.0.4",
58
61
  "node-fetch": "^2.6.1",
59
- "parcel": "^1.12.4",
62
+ "parcel": "1.12.3",
60
63
  "posthog-js": "link:.",
61
- "prettier": "^2.0.5",
62
- "rollup": "^2.18.2",
64
+ "prettier": "^2.7.1",
65
+ "rollup": "^2.77.0",
66
+ "rollup-plugin-dts": "^4.2.2",
63
67
  "rrweb": "^1.1.3",
64
68
  "sinon": "9.0.2",
65
69
  "testcafe": "^1.19.0",
66
70
  "testcafe-browser-provider-browserstack": "^1.14.0",
67
- "typescript": "^3.9.6"
68
- },
69
- "husky": {
70
- "hooks": {
71
- "pre-commit": "lint-staged"
72
- }
71
+ "tslib": "^2.4.0",
72
+ "typescript": "^4.7.4"
73
73
  },
74
74
  "lint-staged": {
75
75
  "*.{ts,tsx,js,json}": "prettier --write",
76
76
  "*.{ts,tsx}": [
77
- "eslint -c .eslintrc.ts.js --fix",
77
+ "eslint --fix",
78
78
  "tsc --noEmit --esModuleInterop --jsx react"
79
79
  ]
80
- },
81
- "jest": {
82
- "testPathIgnorePatterns": [
83
- "/node_modules/",
84
- "/cypress/",
85
- "/react/",
86
- "/test_data/"
87
- ],
88
- "moduleFileExtensions": [
89
- "js",
90
- "json"
91
- ],
92
- "setupFilesAfterEnv": [
93
- "given2/setup",
94
- "./src/__tests__/setup.js"
95
- ],
96
- "modulePathIgnorePatterns": [
97
- "src/__tests__/setup.js"
98
- ],
99
- "clearMocks": true,
100
- "testEnvironment": "jsdom"
101
80
  }
102
81
  }