posthog-js
Version:
Posthog-js allows you to automatically capture usage and send events to PostHog.
96 lines (95 loc) • 5.32 kB
JSON
{
"name": "posthog-js",
"version": "1.438.23",
"bugs": {
"url": "https://github.com/PostHog/posthog-js/issues"
},
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
"repository": "https://github.com/PostHog/posthog-js",
"author": "engineering@posthog.com",
"license": "(Apache-2.0 AND MIT)",
"homepage": "https://posthog.com/docs/libraries/js",
"packageManager": "pnpm@10.33.0",
"scripts": {
"check-types": "pnpm typecheck",
"clean": "rimraf lib dist react/dist",
"start": "pnpm dev",
"dev": "tsc -b && NODE_OPTIONS=\"--max-old-space-size=8192\" pnpm --filter=posthog-js run --parallel \"/^dev:/\"",
"dev:compile": "tsc -b --watch",
"dev:runtime": "pnpm build:runtime --watch",
"dev:types": "pnpm build:types --watch",
"build": "tsc -b && pnpm build:runtime && pnpm build:types",
"build:runtime": "rolldown -c rollup.config.mjs",
"build:types": "BUILD_TYPES_ONLY=1 rolldown -c rollup.config.mjs",
"bundle-size:array": "node scripts/compare-array-bundle-size.mjs",
"benchmark:replay": "node scripts/benchmark-replay.mjs",
"postbuild": "node scripts/strip-lib-package-json.js && node scripts/check-mangled-property-consistency.js && node scripts/check-sourcemap-ignore-list.js",
"prepack": "node scripts/strip-sourcemap-sources-content.js",
"package": "pnpm pack --out $PACKAGE_DEST/%s.tgz",
"lint": "oxlint --report-unused-disable-directives-severity error src && oxlint --report-unused-disable-directives-severity error playwright",
"lint:fix": "oxlint --report-unused-disable-directives-severity error src --fix && oxlint --report-unused-disable-directives-severity error playwright --fix",
"format": "oxfmt --write src/ functional_tests/ playwright/",
"format:check": "oxfmt --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": "vitest run src",
"test:unit:surveys": "vitest run survey",
"test:unit:tours": "vitest run tours",
"test:functional": "POSTHOG_FUNCTIONAL_TESTS=1 vitest run functional_tests",
"test-watch": "vitest 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",
"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",
"compatibility:test": "node playwright/compatibility/cli.mjs check",
"compatibility:update": "node playwright/compatibility/cli.mjs update",
"compatibility:self-test": "node --test playwright/compatibility/*.test.mjs",
"compatibility:controls": "node playwright/compatibility/negative-control.mjs"
},
"main": "dist/main.js",
"module": "dist/module.mjs",
"types": "dist/module.d.ts",
"files": [
"lib/*",
"dist/*",
"test-fixtures/*.json",
"react/dist/**",
"react/package.json",
"react/surveys/package.json",
"react/slim/package.json",
"full/package.json",
"full/no-external/package.json",
"no-external/package.json",
"customizations/package.json",
"rrweb/package.json",
"rrweb-types/package.json",
"rrweb-plugin-console-record/package.json"
],
"peerDependencies": {
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"react": {
"optional": true
}
},
"browserslist": [
"> 0.5%, last 2 versions, Firefox ESR, not dead"
]
}