Skip to content

Commit

Permalink
chore: extracted comments into GitHub issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdbd committed Feb 6, 2024
1 parent 6cad321 commit c191c6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 1 addition & 10 deletions src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,7 @@ export const arrayFromZodSchema = <S extends z.AnyZodObject>(schema: S) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const val = value as any

// TODO: it would be cool to add a reference to another Zod schema whenever
// we have a nested object. Something like a footnote or a link to another
// markdown table.
//
// To make it work, I think we need to:
// 1. ask the user an array of ES modules where this library should look for
// Zod schemas;
// 2. import each ESM dynamically;
// 3. find the Zod schema that matches this nested object description (but
// what if the nested object has no description?)
// TODO: https://github.com/jackdbd/zod-to-doc/issues/4
// if (val instanceof z.ZodObject) {
// console.log('=== val._def ===', val._def)
// console.log('=== val.description ===', val.description)
Expand Down
2 changes: 2 additions & 0 deletions test/cli.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import assert from 'node:assert'
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import * as process from 'node:process'
import { execPath as node } from 'node:process'
import { describe, it } from 'node:test'
import { promisify } from 'node:util'
Expand All @@ -14,6 +15,7 @@ const package_json = JSON.parse(readFileSync(resolve('package.json')))

const onGithub = () => (process.env.GITHUB_SHA ? true : false)

// FIXME: https://github.com/jackdbd/zod-to-doc/issues/3
const skip = onGithub()
? `skipped on GitHub because of error: /Users/runner/work/zod-to-doc/zod-to-doc/dist/cli.js EACCES`
: false
Expand Down

0 comments on commit c191c6a

Please sign in to comment.