Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import { hash } from 'ohash'
import openapiTS, { astToString } from 'openapi-typescript'
import { join } from 'pathe'
import { fileURLToPath } from 'node:url';

Check failure on line 19 in src/module.ts

View workflow job for this annotation

GitHub Actions / lint

Extra semicolon

Check failure on line 19 in src/module.ts

View workflow job for this annotation

GitHub Actions / lint

Expected "node:url" (builtin) to come before "pathe" (external)

import { kebabCase, pascalCase } from 'scule'
import { name, version } from '../package.json'
Expand Down Expand Up @@ -349,7 +350,7 @@
await mkdir(cacheDir, { recursive: true })

let fileBody = ''
const filePath = schema instanceof URL ? schema.pathname : schema
const filePath = schema instanceof URL ? fileURLToPath(schema) : schema
if (typeof filePath === 'string' && existsSync(filePath)) {
fileBody = await readFile(filePath, 'utf-8')
}
Expand Down
Loading