Skip to content

Migrate repository to TypeScript + Zod targeting ES2022#147

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/migrate-repo-to-typescript-zod
Draft

Migrate repository to TypeScript + Zod targeting ES2022#147
Copilot wants to merge 3 commits intomainfrom
copilot/migrate-repo-to-typescript-zod

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

Converts the codebase from JavaScript to TypeScript with Zod schemas for type inference, targeting ES2022.

TypeScript Migration

  • Added tsconfig.json targeting ES2022 with CommonJS output to /build
  • Converted all source files: files.ts, resolvePaths.ts, validate.ts, index.ts, schemas/index.ts, schemas/dereferenceSchemas.ts
  • Updated package.json: main → build/index.js, added types field, updated build scripts

Zod Schemas

  • Created src/zodSchemas/index.ts with comprehensive Zod schemas for all v3 types
  • Exports both schemas and inferred TypeScript types
import { 
  configV3Schema, 
  stepV3Schema, 
  type ConfigV3, 
  type StepV3 
} from 'doc-detective-common';

const config: ConfigV3 = configV3Schema.parse(myConfigObject);

Dependencies

  • Added: typescript, ts-node, @types/node, @types/uuid (dev)
  • Added: zod@3.24.3, uuid@13 (runtime)

Backward Compatibility

  • AJV remains primary validation engine for JSON schemas
  • All 304 tests pass
  • v2→v3 schema transformations preserved
Original prompt

Migrate the repository to Typescript+Zod. Target ES2022.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits December 2, 2025 06:10
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate repository to TypeScript and Zod targeting ES2022 Migrate repository to TypeScript + Zod targeting ES2022 Dec 2, 2025
Copilot AI requested a review from hawkeyexl December 2, 2025 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments