Shared components for Doc Detective projects.
# Install stable version
npm install doc-detective-common
# Install latest development version
npm install doc-detective-common@devThis package automatically publishes development versions on every commit to the main branch. This enables dependent libraries to consume the latest changes without waiting for formal releases.
- Dev versions follow the pattern:
3.1.0-dev.1,3.1.0-dev.2, etc. - Available via npm:
npm install doc-detective-common@dev - Documentation: See Auto Dev Release Guide
This package exports the following components:
schemas- JSON schemas for validationvalidate- Validation functionsresolvePaths- Path resolution utilitiesreadFile- File reading utilitiestransformToSchemaKey- Schema key transformation
Full TypeScript support with exported types:
import {
validate,
ValidateOptions,
ValidateResult,
resolvePaths,
ResolvePathsOptions
} from 'doc-detective-common';Documentation:
- TypeScript Migration Guide - Complete guide for TypeScript users
- TypeScript Examples - Runnable code examples
Works seamlessly with JavaScript (CommonJS or ESM):
// CommonJS
const { validate, schemas } = require('doc-detective-common');
// ESM
import { validate, schemas } from 'doc-detective-common';# Install dependencies
npm install
# Run tests
npm test
# Build schemas
npm run buildAGPL-3.0-only