Skip to content

Commit

Permalink
Refactor js-yaml import usage (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sefirost committed Mar 6, 2024
1 parent c8843a2 commit 0748192
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"@rollup/plugin-terser": "^0.2.1",
"@rollup/plugin-typescript": "^10.0.1",
"@types/jest": "^29.0.0",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.3.1",
"@types/service-worker-mock": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.60.0",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ export default defineConfig({
],
}),
],
external: ['itty-router', 'zod', '@asteasolutions/zod-to-openapi'],
external: ['itty-router', 'zod', '@asteasolutions/zod-to-openapi', 'js-yaml'],
})
2 changes: 1 addition & 1 deletion src/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { OpenAPIRegistryMerger } from './zod/registry'
import { z } from 'zod'
import { OpenAPIObject } from 'openapi3-ts/oas31'
import { OpenAPIRoute } from './route'
const yaml = require('js-yaml')
import yaml from 'js-yaml'

export type Route = <
RequestType = IRequest,
Expand Down

0 comments on commit 0748192

Please sign in to comment.