forked from PostHog/posthog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
359 lines (359 loc) · 15.5 KB
/
package.json
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
{
"name": "posthog",
"description": "",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "https://github.com/posthog/posthog.git"
},
"author": "PostHog Inc.",
"bugs": {
"url": "https://github.com/posthog/posthog/issues"
},
"homepage": "https://github.com/posthog/posthog#readme",
"license": "MIT",
"engines": {
"node": ">=18 <19"
},
"packageManager": "[email protected]",
"scripts": {
"copy-scripts": "mkdir -p frontend/dist/ && ./bin/copy-posthog-js",
"test": "pnpm test:unit && pnpm test:visual",
"test:unit": "jest --testPathPattern=frontend/",
"jest": "jest",
"test:visual": "rm -rf frontend/__snapshots__/__failures__/ && docker compose -f docker-compose.playwright.yml run --rm -it --build playwright pnpm test:visual:update --url http://host.docker.internal:6006",
"test:visual:update": "NODE_OPTIONS=--max-old-space-size=6144 test-storybook -u --browsers chromium webkit --no-index-json",
"test:visual:debug": "PWDEBUG=1 NODE_OPTIONS=--max-old-space-size=6144 test-storybook --browsers chromium webkit --no-index-json",
"test:visual:ci:update": "test-storybook -u --no-index-json --maxWorkers=2",
"test:visual:ci:verify": "test-storybook --ci --no-index-json --maxWorkers=2",
"start": "concurrently -n ESBUILD,TYPEGEN -c yellow,green \"pnpm start-http\" \"pnpm run typegen:watch\"",
"start-http": "pnpm clean && pnpm copy-scripts && node frontend/build.mjs --dev",
"start-docker": "pnpm start-http --host 0.0.0.0",
"clean": "rm -rf frontend/dist && mkdir frontend/dist",
"build": "pnpm copy-scripts && pnpm build:esbuild",
"build:esbuild": "node frontend/build.mjs",
"schema:build": "pnpm run schema:build:json && pnpm run schema:build:python",
"schema:build:json": "ts-node bin/build-schema-json.mjs && prettier --write frontend/src/queries/schema.json",
"schema:build:python": "bash bin/build-schema-python.sh",
"grammar:build": "npm run grammar:build:python && npm run grammar:build:cpp",
"grammar:build:python": "cd posthog/hogql/grammar && antlr -Dlanguage=Python3 HogQLLexer.g4 && antlr -visitor -no-listener -Dlanguage=Python3 HogQLParser.g4",
"grammar:build:cpp": "cd posthog/hogql/grammar && antlr -o ../../../hogql_parser -Dlanguage=Cpp HogQLLexer.g4 && antlr -o ../../../hogql_parser -visitor -no-listener -Dlanguage=Cpp HogQLParser.g4",
"packages:build": "pnpm packages:build:apps-common && pnpm packages:build:lemon-ui",
"packages:build:apps-common": "cd frontend/@posthog/apps-common && pnpm i && pnpm build",
"packages:build:lemon-ui": "cd frontend/@posthog/lemon-ui && pnpm i && pnpm build",
"editor:update-tsd": "pnpm packages:build && node frontend/editor-update-tsd.mjs",
"prettier": "prettier --write \"./**/*.{js,mjs,ts,tsx,json,yaml,yml,css,scss}\"",
"prettier:check": "prettier --check \"frontend/**/*.{js,mjs,ts,tsx,json,yaml,yml,css,scss}\"",
"typescript:check": "tsc --noEmit && echo \"No errors reported by tsc.\"",
"lint:js": "eslint frontend/src",
"lint:css": "stylelint \"frontend/**/*.{css,scss}\"",
"format:backend": "ruff .",
"format:frontend": "pnpm lint:js --fix && pnpm lint:css --fix && pnpm prettier",
"format": "pnpm format:backend && pnpm format:frontend",
"typegen:write": "kea-typegen write --delete --show-ts-errors",
"typegen:check": "kea-typegen check",
"typegen:watch": "kea-typegen watch --delete --show-ts-errors",
"typegen:clean": "find frontend/src -type f -name '*Type.ts' -delete",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"dev:migrate:postgres": "export DEBUG=1 && source env/bin/activate && python manage.py migrate",
"dev:migrate:clickhouse": "export DEBUG=1 && source env/bin/activate && python manage.py migrate_clickhouse",
"prepare": "husky install",
"mobile-replay:web:schema:build:json": "ts-json-schema-generator -f tsconfig.json --path 'node_modules/@rrweb/types/dist/index.d.ts' --type 'eventWithTime' --expose all --no-top-ref --out ee/frontend/mobile-replay/schema/web/rr-web-schema.json && prettier --write ee/frontend/mobile-replay/schema/web/rr-web-schema.json",
"mobile-replay:mobile:schema:build:json": "ts-json-schema-generator -f tsconfig.json --path 'ee/frontend/mobile-replay/mobile.types.ts' --type 'mobileEventWithTime' --expose all --no-top-ref --out ee/frontend/mobile-replay/schema/mobile/rr-mobile-schema.json && prettier --write ee/frontend/mobile-replay/schema/mobile/rr-mobile-schema.json",
"mobile-replay:schema:build:json": "pnpm mobile-replay:web:schema:build:json && pnpm mobile-replay:mobile:schema:build:json",
"visualize-toolbar-bundle": "pnpm exec esbuild-visualizer --metadata ./toolbar-esbuild-meta.json --filename=toolbar-esbuild-bundle-visualization.html"
},
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@babel/runtime": "^7.24.0",
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/modifiers": "^6.0.1",
"@dnd-kit/sortable": "^7.0.2",
"@dnd-kit/utilities": "^3.2.1",
"@floating-ui/react": "^0.26.9",
"@lottiefiles/react-lottie-player": "^3.4.7",
"@medv/finder": "^3.1.0",
"@microlink/react-json-view": "^1.21.3",
"@monaco-editor/react": "4.4.6",
"@posthog/icons": "0.7.0",
"@posthog/plugin-scaffold": "^1.4.4",
"@react-hook/size": "^2.1.2",
"@rrweb/types": "2.0.0-alpha.13",
"@sentry/react": "7.112.1",
"@tailwindcss/container-queries": "^0.1.1",
"@testing-library/dom": ">=7.21.4",
"@tiptap/core": "^2.1.16",
"@tiptap/extension-document": "^2.1.16",
"@tiptap/extension-floating-menu": "^2.1.16",
"@tiptap/extension-placeholder": "^2.1.16",
"@tiptap/extension-task-item": "^2.1.16",
"@tiptap/extension-task-list": "^2.1.16",
"@tiptap/pm": "^2.1.16",
"@tiptap/react": "^2.1.16",
"@tiptap/starter-kit": "^2.1.16",
"@tiptap/suggestion": "^2.1.16",
"@types/md5": "^2.3.0",
"@types/react-transition-group": "^4.4.5",
"@types/react-virtualized": "^9.21.23",
"ajv": "^8.12.0",
"algoliasearch": "^4.22.1",
"antd": "^4.17.1",
"antd-dayjs-webpack-plugin": "^1.0.6",
"autoprefixer": "^10.4.13",
"babel-preset-nano-react-app": "^0.1.0",
"chart.js": "^3.9.1",
"chartjs-adapter-dayjs-3": "^1.2.3",
"chartjs-plugin-annotation": "2.2.1",
"chartjs-plugin-crosshair": "^1.2.0",
"chartjs-plugin-datalabels": "^2.2.0",
"chartjs-plugin-stacked100": "^1.4.0",
"chokidar": "^3.5.3",
"clsx": "^1.1.1",
"core-js": "^3.32.0",
"cors": "^2.8.5",
"cssnano": "^6.0.3",
"d3": "^7.8.2",
"d3-sankey": "^0.12.3",
"dayjs": "^1.10.7",
"dompurify": "^3.0.6",
"esbuild": "^0.19.8",
"esbuild-plugin-less": "^1.3.1",
"esbuild-sass-plugin": "^3.0.0",
"expr-eval": "^2.0.2",
"express": "^4.17.1",
"fast-deep-equal": "^3.1.3",
"fflate": "^0.7.4",
"fs-extra": "^10.0.0",
"fuse.js": "^6.6.2",
"heatmap.js": "^2.0.5",
"husky": "^7.0.4",
"image-blob-reduce": "^4.1.0",
"kea": "^3.1.5",
"kea-forms": "^3.1.3",
"kea-loaders": "^3.0.0",
"kea-localstorage": "^3.1.0",
"kea-router": "^3.1.4",
"kea-subscriptions": "^3.0.1",
"kea-test-utils": "^0.2.4",
"kea-waitfor": "^0.2.1",
"kea-window-values": "^3.0.0",
"maplibre-gl": "^3.5.1",
"md5": "^2.3.0",
"monaco-editor": "^0.39.0",
"natural-orderby": "^3.0.2",
"papaparse": "^5.4.1",
"pmtiles": "^2.11.0",
"postcss": "^8.4.31",
"postcss-preset-env": "^9.3.0",
"posthog-js": "1.139.2",
"posthog-js-lite": "3.0.0",
"prettier": "^2.8.8",
"prop-types": "^15.7.2",
"protomaps-themes-base": "2.0.0-alpha.1",
"query-selector-shadow-dom": "^1.0.0",
"rc-trigger": "^5.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-draggable": "^4.2.0",
"react-grid-layout": "^1.3.0",
"react-instantsearch": "^7.6.0",
"react-intersection-observer": "^9.5.3",
"react-markdown": "^5.0.3",
"react-modal": "^3.15.1",
"react-resizable": "^3.0.5",
"react-shadow": "^20.3.0",
"react-syntax-highlighter": "^15.5.0",
"react-textarea-autosize": "^8.3.3",
"react-toastify": "^8.2.0",
"react-transition-group": "^4.4.5",
"react-virtualized": "^9.22.5",
"resize-observer-polyfill": "^1.5.1",
"rrweb": "2.0.0-alpha.13",
"sass": "^1.26.2",
"tailwind-merge": "^2.2.2",
"tailwindcss": "^3.4.0",
"use-debounce": "^9.0.3",
"use-resize-observer": "^8.0.0",
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"@babel/core": "^7.22.10",
"@babel/plugin-transform-class-properties": "^7.24.7",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
"@babel/plugin-transform-react-jsx": "^7.22.5",
"@babel/plugin-transform-runtime": "^7.22.10",
"@babel/preset-env": "^7.22.10",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@cypress/webpack-preprocessor": "^5.17.1",
"@playwright/test": "1.41.2",
"@sentry/types": "7.112.1",
"@storybook/addon-a11y": "^7.6.4",
"@storybook/addon-actions": "^7.6.4",
"@storybook/addon-essentials": "^7.6.4",
"@storybook/addon-links": "^7.6.4",
"@storybook/addon-storysource": "^7.6.4",
"@storybook/addons": "^7.6.4",
"@storybook/api": "^7.6.4",
"@storybook/blocks": "^7.6.4",
"@storybook/components": "^7.6.4",
"@storybook/core-events": "^7.6.4",
"@storybook/csf": "^0.1.2",
"@storybook/react": "^7.6.4",
"@storybook/react-webpack5": "^7.6.4",
"@storybook/test-runner": "^0.16.0",
"@storybook/theming": "^7.6.4",
"@storybook/types": "^7.6.4",
"@sucrase/jest-plugin": "^3.0.0",
"@testing-library/dom": ">=7.21.4",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^13.4.0",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^13.5.0",
"@types/chartjs-plugin-crosshair": "^1.1.1",
"@types/clone": "^2.1.1",
"@types/d3": "^7.4.0",
"@types/d3-sankey": "^0.12.1",
"@types/dompurify": "^3.0.3",
"@types/heatmap.js": "^2.0.41",
"@types/image-blob-reduce": "^4.1.1",
"@types/jest": "^29.5.12",
"@types/jest-image-snapshot": "^6.1.0",
"@types/md5": "^2.3.0",
"@types/node": "^18.11.9",
"@types/papaparse": "^5.3.8",
"@types/pixelmatch": "^5.2.4",
"@types/pngjs": "^6.0.1",
"@types/query-selector-shadow-dom": "^1.0.0",
"@types/react": "^17.0.39",
"@types/react-dom": "^18.2.8",
"@types/react-grid-layout": "^1.1.2",
"@types/react-modal": "^3.13.1",
"@types/react-resizable": "^3.0.4",
"@types/react-syntax-highlighter": "^15.5.7",
"@types/react-virtualized": "^9.21.23",
"@types/testing-library__jest-dom": "^5.14.5",
"@types/zxcvbn": "^4.4.0",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"axe-core": "^4.4.3",
"babel-loader": "^8.0.6",
"babel-plugin-import": "^1.13.0",
"concurrently": "^5.3.0",
"css-loader": "^3.4.2",
"cypress": "^13.11.0",
"cypress-axe": "^1.5.0",
"cypress-terminal-report": "^6.1.0",
"esbuild-visualizer": "^0.6.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-posthog": "link:./eslint-rules",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-storybook": "^0.6.15",
"eslint-plugin-unused-imports": "^3.1.0",
"file-loader": "^6.1.0",
"givens": "^1.3.6",
"history": "^5.0.1",
"html-webpack-harddisk-plugin": "^2.0.0",
"html-webpack-plugin": "^5.5.3",
"jest": "^29.7.0",
"jest-canvas-mock": "^2.4.0",
"jest-environment-jsdom": "^29.3.1",
"jest-image-snapshot": "^6.1.0",
"kea-typegen": "^3.3.0",
"less": "^3.12.2",
"less-loader": "^7.0.2",
"lint-staged": "~10.2.13",
"mockdate": "^3.0.5",
"monaco-editor-webpack-plugin": "^7.0.1",
"msw": "^0.49.0",
"path-browserify": "^1.0.1",
"pixelmatch": "^5.3.0",
"pngjs": "^6.0.0",
"postcss-loader": "^4.3.0",
"process": "^0.11.10",
"raw-loader": "^4.0.2",
"redis": "^4.6.13",
"safe-stable-stringify": "^2.4.3",
"sass-loader": "^10.0.1",
"storybook": "^7.6.4",
"storybook-addon-pseudo-states": "2.1.2",
"style-loader": "^2.0.0",
"stylelint": "^15.11.0",
"stylelint-config-recess-order": "^4.3.0",
"stylelint-config-standard-scss": "^11.1.0",
"stylelint-order": "^6.0.3",
"sucrase": "^3.29.0",
"timekeeper": "^2.2.0",
"ts-json-schema-generator": "^1.5.0",
"ts-node": "^10.9.1",
"typescript": "~4.9.5",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"whatwg-fetch": "^3.6.2"
},
"optionalDependencies": {
"fsevents": "^2.3.2"
},
"pnpm": {
"overrides": {
"playwright": "1.41.2"
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]"
}
},
"lint-staged": {
"*.{json,yaml,yml}": "prettier --write",
"*.{css,scss}": [
"stylelint --fix",
"prettier --write"
],
"cypress/**/*.{js,jsx,mjs,ts,tsx}": [
"eslint -c .eslintrc.js --fix",
"prettier --write"
],
"frontend/src/**/*.{js,jsx,mjs,ts,tsx}": [
"eslint -c .eslintrc.js --fix",
"prettier --write"
],
"frontend/*.mjs": [
"eslint -c .eslintrc.js --fix",
"prettier --write"
],
"ee/frontend/**/*.{js,jsx,mjs,ts,tsx}": [
"eslint -c .eslintrc.js --fix",
"prettier --write"
],
"plugin-server/**/*.{js,jsx,mjs,ts,tsx}": [
"pnpm --dir plugin-server exec eslint --fix",
"pnpm --dir plugin-server exec prettier --write"
],
"!(posthog/hogql/grammar/*)*.{py,pyi}": [
"ruff check --fix",
"ruff format"
]
},
"browserslist": {
"development": [
"last 2 chrome versions",
"last 2 firefox versions",
"last 2 edge versions"
],
"production": [
"defaults and not not op_mini all"
]
},
"browser": {
"path": "path-browserify"
}
}