Fix Mixpanel analytics review findings FRE-5281

P0: Fix validation bypass - validated properties now override raw properties
P1: Add unit tests for shared-analytics package (3 test files)
P1: Refactor spamshield to use shared-analytics, deprecate duplicate
P2: Normalize phone numbers to E.164 before hashing
P2: Add graceful error handling for missing env vars in config
P3: Add singleton pattern to MixpanelService
P3: Include timestamp in validated properties schema
This commit is contained in:
2026-05-17 15:37:21 -04:00
parent 986941e201
commit 06ca3ec0cf
10 changed files with 494 additions and 32 deletions

View File

@@ -6,7 +6,10 @@
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"lint": "eslint src/"
"lint": "eslint src/",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@segment/analytics-node": "^1.0.0",
@@ -14,6 +17,8 @@
"zod": "^4.3.6"
},
"devDependencies": {
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vitest": "^4.1.5",
"@vitest/coverage-v8": "^4.1.5"
}
}