super-productivity/packages/shared-schema/tsconfig.json
Johannes Millan 615188bf88 fix: address code review findings from last 24 hours
1. Fix race condition in replaceToken (auth.ts)
   - Wrap UPDATE and SELECT in transaction for atomicity

2. Fix mutex memory leak in operation-log-hydrator
   - Add explicit error logging before rethrowing in repair promise

3. Improve global mutable state handling (is-related-model-data-valid.ts)
   - Reset lastValidityError at start of each validation
   - Add documentation warning about the pattern

4. Fix version tracking bug in shared-schema migration
   - Update version inside try block so migratedToVersion reflects
     where we actually stopped, even if operation was dropped

5. Remove unused import validateMigrationRegistry (sync.service.ts)

6. Add array payload rejection test (validate-operation-payload.spec.ts)

7. Add lock service contention tests (lock.service.spec.ts)
   - Tests for corrupted lock formats (no timestamp, NaN, empty string)

Also includes shared-schema ESM configuration:
- Add "type": "module" to package.json for ESM output
- Change module/moduleResolution to NodeNext in tsconfig.json
- Add .js extensions to all relative imports (required by Node.js ESM)
2025-12-12 20:47:47 +01:00

21 lines
519 B
JSON

{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"lib": ["ES2022"],
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"isolatedModules": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "tests"]
}