Files
insights-js/packages/node/package.json
zooqueen a93e642791 chore: complete posthog->insights rebrand (zero @posthog/* identity)
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.
2026-06-19 18:44:26 -07:00

111 lines
3.4 KiB
JSON

{
"name": "@hanzo/insights-node",
"version": "5.26.2",
"description": "Hanzo Insights Node.js SDK for server-side analytics and feature flags.",
"repository": {
"type": "git",
"url": "git+https://github.com/hanzoinsights/insights-js.git",
"directory": "packages/node"
},
"scripts": {
"clean": "rimraf dist coverage",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test:unit": "jest",
"test:edge-compat": "jest --env @edge-runtime/jest-environment --no-coverage",
"prebuild": "node -p \"'export const version = \\'' + require('./package.json').version + '\\''\" > src/version.ts",
"build": "rslib build",
"dev": "rslib build -w",
"prepublishOnly": "pnpm lint && pnpm test:unit && pnpm build",
"package": "pnpm pack --out $PACKAGE_DEST/%s.tgz",
"generate-references": "pnpm build && pnpm exec api-extractor run --config ./api-extractor.jsonc --local && node scripts/generate-docs.mjs"
},
"engines": {
"node": "^20.20.0 || >=22.22.0"
},
"files": [
"src",
"dist",
"!src/__tests__"
],
"license": "MIT",
"author": {
"name": "Hanzo AI",
"email": "[email protected]",
"url": "https://hanzo.ai"
},
"main": "dist/entrypoints/index.node.js",
"module": "dist/entrypoints/index.node.mjs",
"types": "dist/entrypoints/index.node.d.ts",
"dependencies": {
"@hanzo/insights-core": "workspace:*"
},
"devDependencies": {
"@hanzo/insights-tooling-tsconfig-base": "workspace:*",
"@rslib/core": "catalog:",
"@types/express": "^5.0.5",
"@types/jest": "catalog:",
"@types/node": "^20.0.0",
"jest": "catalog:",
"rxjs": "^7.8.0"
},
"peerDependencies": {
"rxjs": "^7.0.0"
},
"peerDependenciesMeta": {
"rxjs": {
"optional": true
}
},
"keywords": [
"hanzo",
"insights",
"analytics",
"feature-flags"
],
"exports": {
".": {
"types": "./dist/entrypoints/index.node.d.ts",
"edge": {
"import": "./dist/entrypoints/index.edge.mjs",
"require": "./dist/entrypoints/index.edge.js",
"default": "./dist/entrypoints/index.edge.js"
},
"node": {
"import": "./dist/entrypoints/index.node.mjs",
"require": "./dist/entrypoints/index.node.js",
"default": "./dist/entrypoints/index.node.js"
},
"edge-light": {
"import": "./dist/entrypoints/index.edge.mjs",
"require": "./dist/entrypoints/index.edge.js",
"default": "./dist/entrypoints/index.edge.js"
},
"workerd": {
"import": "./dist/entrypoints/index.edge.mjs",
"require": "./dist/entrypoints/index.edge.js",
"default": "./dist/entrypoints/index.edge.js"
},
"import": "./dist/entrypoints/index.node.mjs",
"require": "./dist/entrypoints/index.node.js"
},
"./edge": {
"types": "./dist/entrypoints/index.edge.d.ts",
"import": "./dist/entrypoints/index.edge.mjs",
"require": "./dist/entrypoints/index.edge.js",
"default": "./dist/entrypoints/index.edge.js"
},
"./nestjs": {
"types": "./dist/entrypoints/nestjs.d.ts",
"import": "./dist/entrypoints/nestjs.mjs",
"require": "./dist/entrypoints/nestjs.js"
},
"./experimental": {
"types": "./dist/experimental.d.ts",
"import": "./dist/experimental.mjs",
"require": "./dist/experimental.js",
"default": "./dist/experimental.js"
}
}
}