mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
Decomplect the half-finished fork so the dependency graph has ONE source with no posthog package identity, living under github.com/hanzoinsights. LAYER 1 (package identity): rename straggler package.json names — @posthog/next->@hanzo/insights-next (Next.js SDK; distinct from the existing @hanzo/insights-nextjs config helper), @posthog/mcp->@hanzo/insights-mcp, @posthog/plugin-utils->@hanzo/insights-plugin-utils, @posthog/react-slim->@hanzo/react-slim, @posthog-tooling/release-> @hanzo/insights-tooling-release, and the @posthog/rrweb* family->@hanzo/rrweb* (matching the already-published @hanzo/rrweb*@0.0.47 + minimumReleaseAgeExclude). Repoint every repository.url/homepage/bugs to github.com/hanzoinsights/insights-js and rebrand the PostHog author/description identity to Hanzo AI. LAYER 2 (cross-package imports): rewrite every internal @posthog/* import to its @hanzo/insights*|@hanzo/rrweb* equivalent and the bare module specifiers posthog-js->@hanzo/insights, posthog-node->@hanzo/insights-node, mirrored in package.json deps + the pnpm-lock importer keys. Result: 0 @posthog/* specifiers in packages/tooling/examples/playground source. LAYER 4 (wire protocol) PRESERVED: window.posthog global, ph_* keys, $-prefixed event names, distinct_id, /decide, /e/, /flags, and the __PosthogExtensions__ hook are left unchanged — the Insights server expects them. Also repair pre-existing fork merge damage that blocked compilation (unrelated to naming; identical to origin/main): restore the @hanzo/insights-core ./process subpath (spawn-local/utils, re-matching the published artifact), the lost constructor/var declarations in core + node clients, the mangled external-scripts-loader, the missing TreeShakeable/isPlainError imports, the DeviceId enum member, and stale ../posthog-core-stateless module paths. 26/34 turbo build tasks now pass; remaining failures (browser/react-native and their dependents) are pre-existing fork damage, not rebrand-caused.
152 lines
6.3 KiB
JSON
152 lines
6.3 KiB
JSON
{
|
|
"name": "@hanzo/insights",
|
|
"version": "1.358.1",
|
|
"description": "Hanzo Insights browser SDK for automatic event capture and behavioral analytics.",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/hanzoinsights/insights-js.git",
|
|
"directory": "packages/browser"
|
|
},
|
|
"author": {
|
|
"name": "Hanzo AI",
|
|
"email": "[email protected]",
|
|
"url": "https://hanzo.ai"
|
|
},
|
|
"license": "SEE LICENSE IN LICENSE",
|
|
"homepage": "https://docs.hanzo.ai/insights/js",
|
|
"packageManager": "[email protected]",
|
|
"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 '@hanzo/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"
|
|
],
|
|
"dependencies": {
|
|
"@hanzo/insights-core": "workspace:*",
|
|
"@hanzo/insights-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",
|
|
"@hanzo/insights-tooling-rollup-utils": "workspace:*",
|
|
"@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",
|
|
"@hanzo/insights": "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",
|
|
"@hanzo/rrweb": "workspace:*",
|
|
"@hanzo/rrweb-plugin-console-record": "workspace:*",
|
|
"@hanzo/rrweb-record": "workspace:*",
|
|
"@hanzo/rrweb-types": "workspace:*"
|
|
},
|
|
"browserslist": [
|
|
"> 0.5%, last 2 versions, Firefox ESR, not dead, IE 11"
|
|
]
|
|
}
|