feat: add entity analytics, pluggable cache, and pitfalls docs

- Add Cache interface with MemoryCache and NoopCache implementations
- Make SocialhoseClient accept injectable cache option
- Remove Next.js next.revalidate coupling from transport
- Add entity analytics: getEntityBrief, getEntityStats, getEntityBriefs,
  getCampaignIdByMatch with exact sentiment/platform faceting and
  cumulative-differenced timeline
- Add 23 new tests (29 total) covering entity analytics, cache injection,
  sentiment reconciliation, bounded concurrency, and timeline differencing
- Update README with entity analytics, custom caching, and pitfalls sections
- Fix CI branch: main -> master
This commit is contained in:
Mo Elzubeir
2026-05-29 13:10:05 -05:00
parent e34552ac33
commit 252ea713b1
7 changed files with 836 additions and 30 deletions
+20 -6
View File
@@ -5,7 +5,11 @@
"license": "MIT",
"type": "module",
"sideEffects": false,
"files": ["dist", "README.md", "LICENSE"],
"files": [
"dist",
"README.md",
"LICENSE"
],
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -16,20 +20,30 @@
"require": "./dist/index.cjs"
}
},
"engines": { "node": ">=18" },
"engines": {
"node": ">=18"
},
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --sourcemap --clean",
"test": "vitest run",
"typecheck": "tsc --noEmit",
"prepublishOnly": "pnpm test && pnpm typecheck && pnpm build"
},
"keywords": ["socialhose", "social-listening", "social-media", "public-api", "monitoring"],
"publishConfig": { "access": "public", "provenance": true },
"keywords": [
"socialhose",
"social-listening",
"social-media",
"public-api",
"monitoring"
],
"publishConfig": {
"access": "public",
"provenance": true
},
"devDependencies": {
"@types/node": "20.16.0",
"tsup": "8.3.0",
"typescript": "5.6.2",
"typescript": "^5.6.2",
"vitest": "2.1.1"
}
}