-
Notifications
You must be signed in to change notification settings - Fork 43
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// These packages don't have any TS types so we need to declare a module in order to use them. | ||
declare module '@npmcli/ci-detect'; | ||
declare module 'editor'; | ||
declare module 'oas-normalize'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import fs from 'fs'; | ||
|
||
import chalk from 'chalk'; | ||
import ora from 'ora'; | ||
|
||
import OASNormalize from 'oas-normalize'; | ||
import ora from 'ora'; | ||
|
||
import { debug, info, oraOptions } from './logger'; | ||
|
||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Removed the type here because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :hell-yeah: |
||
bundledSpec = await oas.bundle().then(res => { | ||
return JSON.stringify(res); | ||
}); | ||
|
||
|
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 theimport/order
rule to think that it was a local package.