Skip to content
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

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

erunion
Copy link
Member

@erunion erunion commented Aug 10, 2022

🧰 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.

@erunion erunion added the enhancement New feature or request label Aug 10, 2022
@@ -1,9 +1,8 @@
import fs from 'fs';

import chalk from 'chalk';
import ora from 'ora';

import OASNormalize from 'oas-normalize';
Copy link
Member Author

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>) => {
Copy link
Member Author

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.

Copy link
Member

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>) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:hell-yeah:

@erunion erunion merged commit 44f96db into main Aug 10, 2022
@erunion erunion deleted the feat/oas-normalize-types branch August 10, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants