-
Notifications
You must be signed in to change notification settings - Fork 237
Expand file tree
/
Copy pathpackage.json
More file actions
169 lines (169 loc) · 7.53 KB
/
package.json
File metadata and controls
169 lines (169 loc) · 7.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
{
"name": "posthog-js",
"version": "1.354.0",
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
"repository": "https://github.com/PostHog/posthog-js",
"author": "hey@posthog.com",
"license": "SEE LICENSE IN LICENSE",
"homepage": "https://posthog.com/docs/libraries/js",
"packageManager": "pnpm@10.12.4",
"scripts": {
"clean": "rimraf lib dist react/dist",
"start": "pnpm build-react && NODE_OPTIONS=\"--max-old-space-size=8192\" pnpm build-rollup -w",
"dev": "tsc -b && NODE_OPTIONS=\"--max-old-space-size=8192\" rollup -cw",
"build": "tsc -b && rollup -c",
"package": "pnpm pack --out $PACKAGE_DEST/%s.tgz",
"lint": "eslint src && eslint playwright",
"lint:fix": "eslint src --fix && eslint playwright --fix",
"prettier": "prettier --write src/ functional_tests/ playwright/",
"prettier:check": "prettier --check src/ functional_tests/ playwright/",
"prepublishOnly": "pnpm check-react",
"check-react": "[ -d 'react/dist' ] || { echo '@posthog/react has not been built'; exit 1; }",
"test": "pnpm test:unit && pnpm test:functional",
"test:unit": "jest src",
"test:unit:surveys": "jest '.*survey.*.test.'",
"test:unit:tours": "jest '.*tours.*.test.'",
"test:functional": "jest functional_tests",
"test-watch": "jest --watch src",
"test:typecheck": "cd src/__tests__ && tsc --noEmit --project tsconfig.json",
"typecheck": "tsc --noEmit --project tsconfig.json",
"playwright": "pnpm exec playwright test --project webkit --project firefox --project chromium",
"playwright:compat": "pnpm exec playwright test --config playwright.config.compat.ts",
"playwright:integration": "pnpm exec playwright test --config playwright.config.integration.ts --project webkit --project firefox --project chromium",
"playwright-ui": "pnpm exec playwright test --ui --project webkit --project firefox --project chromium",
"playwright-webserver": "npx http-server ./ -p 2345",
"playwright:surveys": "pnpm exec playwright test packages/browser/playwright/mocked/surveys/* --project webkit --project firefox --project chromium",
"playwright:surveys:ui": "pnpm exec playwright test packages/browser/playwright/mocked/surveys/* --ui --project webkit --project firefox --project chromium",
"playwright:tours:ui": "pnpm exec playwright test packages/browser/playwright/mocked/product-tours/* --ui --project webkit --project firefox --project chromium",
"prepare": "[ -z \"$VERCEL\" ] && husky install || echo \"Skipping husky install on vercel build\"",
"deprecate-old-versions": "node scripts/deprecate-old-versions.mjs",
"check-testcafe-results": "ts-node testcafe/check-testcafe-results.js",
"run-testcafe-localhost": "node scripts/run-testcafe-localhost.mjs",
"write-mangled-property-names": "WRITE_MANGLED_PROPERTIES=1 pnpm build",
"generate-references": "pnpm exec api-extractor run --config ./api-extractor.json --local && node scripts/generate-docs.js"
},
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/module.d.ts",
"files": [
"lib/*",
"dist/*",
"react/dist/**",
"react/package.json",
"react/surveys/package.json"
],
"exports": {
".": {
"import": "./dist/module.js",
"require": "./dist/main.js",
"types": "./dist/module.d.ts"
},
"./slim": {
"import": "./dist/module.slim.js",
"types": "./dist/module.slim.d.ts"
},
"./extensions": {
"import": "./lib/src/extensions/extension-bundles.js",
"types": "./lib/src/extensions/extension-bundles.d.ts"
},
"./react": {
"import": "./react/dist/esm/index.js",
"require": "./react/dist/umd/index.js",
"types": "./react/dist/types/index.d.ts"
},
"./react/*": {
"import": "./react/dist/esm/*/index.js",
"require": "./react/dist/umd/*/index.js",
"types": "./react/dist/types/*/index.d.ts"
},
"./dist/*": "./dist/*",
"./package.json": "./package.json"
},
"dependencies": {
"@posthog/core": "workspace:*",
"@posthog/types": "workspace:*",
"core-js": "^3.38.1",
"dompurify": "^3.3.1",
"fflate": "^0.4.8",
"preact": "^10.28.2",
"query-selector-shadow-dom": "^1.0.1",
"web-vitals": "^5.1.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/api-logs": "^0.208.0",
"@opentelemetry/exporter-logs-otlp-http": "^0.208.0",
"@opentelemetry/resources": "^2.2.0",
"@opentelemetry/sdk-logs": "^0.208.0"
},
"devDependencies": {
"@babel/core": "catalog:",
"@babel/plugin-syntax-decorators": "catalog:",
"@babel/plugin-transform-exponentiation-operator": "catalog:",
"@babel/plugin-transform-nullish-coalescing-operator": "catalog:",
"@babel/plugin-transform-react-jsx": "catalog:",
"@babel/preset-env": "catalog:",
"@babel/preset-typescript": "catalog:",
"@jest/globals": "^29.7.0",
"@playwright/test": "^1.52.0",
"@posthog-tooling/rollup-utils": "workspace:*",
"@posthog/rrweb-plugin-console-record": "^0.0.42",
"@posthog/rrweb-record": "^0.0.42",
"@posthog/rrweb-types": "^0.0.42",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.4",
"@rrweb/record": "2.0.0-alpha.17",
"@rrweb/rrweb-plugin-console-record": "2.0.0-alpha.17",
"@rrweb/types": "2.0.0-alpha.17",
"@sentry/types": "8.7.0",
"@testing-library/dom": "catalog:",
"@testing-library/jest-dom": "catalog:",
"@testing-library/preact": "catalog:",
"@types/dompurify": "^3.2.0",
"@types/dotenv": "^8.2.3",
"@types/jest": "catalog:",
"@types/node": "^22.5.0",
"@types/query-selector-shadow-dom": "^1.0.4",
"@types/sinon": "^17.0.1",
"@types/web": "^0.0.222",
"babel-jest": "^29.7.0",
"browserslist": "^4.24.5",
"compare-versions": "^6.1.0",
"cssnano": "^7.0.7",
"date-fns": "^3.6.0",
"dotenv": "^17.2.0",
"expect": "^29.7.0",
"fast-check": "^2.17.0",
"http-server": "14.1.1",
"husky": "^8.0.1",
"identity-obj-proxy": "^3.0.0",
"jest": "catalog:",
"jest-environment-jsdom": "catalog:",
"jsdom": "16.7.0",
"jsdom-global": "3.0.2",
"localStorage": "1.0.4",
"msw": "^1.3.3",
"node-fetch": "^2.6.11",
"postcss": "^8.5.3",
"postcss-import": "^16.1.0",
"postcss-nesting": "^13.0.1",
"posthog-js": "link:",
"preact-render-to-string": "^6.3.1",
"rollup": "catalog:",
"rollup-plugin-dts": "^6.2.3",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-visualizer": "^6.0.3",
"sinon": "9.0.2",
"testcafe": "^2.6.2",
"testcafe-browser-provider-browserstack": "^1.15.2",
"ts-node": "^10.9.2",
"tslib": "catalog:",
"typescript": "catalog:",
"yargs": "^17.7.2"
},
"browserslist": [
"> 0.5%, last 2 versions, Firefox ESR, not dead, IE 11"
]
}