-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upgrading oas-normalize to pull in its new TS typings #564
Conversation
@@ -1,9 +1,8 @@ | |||
import fs from 'fs'; | |||
|
|||
import chalk from 'chalk'; | |||
import ora from 'ora'; | |||
|
|||
import OASNormalize from 'oas-normalize'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't being sorted before ora
before because the sinkhole exclusion was causing the import/order
rule to think that it was a local package.
@@ -69,7 +68,7 @@ export default async function prepareOas(path: string, command: 'openapi' | 'val | |||
let bundledSpec = ''; | |||
|
|||
if (command === 'openapi') { | |||
bundledSpec = await oas.bundle().then((res: Record<string, unknown>) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the type here because OASNormalize.bundle
returns an OpenAPI.Document
now and Record
is incompatible with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:hell-yeah:
@@ -69,7 +68,7 @@ export default async function prepareOas(path: string, command: 'openapi' | 'val | |||
let bundledSpec = ''; | |||
|
|||
if (command === 'openapi') { | |||
bundledSpec = await oas.bundle().then((res: Record<string, unknown>) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:hell-yeah:
🧰 Changes
I rewrote oas-normalize last night in TypeScript (readmeio/oas-normalize#210) so we no longer need to have a typing sinkhole exclusion for it.