Skip to content

Conversation

@erunion
Copy link
Member

@erunion erunion commented Sep 14, 2023

🧰 Changes

This is mostly prework for the coming ESM support but this updates our Node module imports and requires to use the node: protocol.

I've also fixed few any typings in a number of spots that we missed.

@erunion erunion added the enhancement New feature or request label Sep 14, 2023
@erunion erunion requested a review from kanadgupta September 14, 2023 23:54
@erunion erunion marked this pull request as ready for review September 14, 2023 23:54
@@ -1,7 +1,7 @@
import type { TSGeneratorOptions } from '../../../src/codegen/languages/typescript';

import { promises as fs } from 'fs';
Copy link
Member Author

Choose a reason for hiding this comment

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

no idea why i loaded fs/promises like this. the things you find in small refactors...

}

return fetchHar(har as any, {
return fetchHar(har as Har, {
Copy link
Member Author

Choose a reason for hiding this comment

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

The HAR coming out of @readme/oas-to-har is a HAR but not a full one so we need to cast this.

const responseBody = await response.text();

// eslint-disable-next-line @typescript-eslint/no-explicit-any
let data: any = responseBody;
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm guessing unknown won't fly here?

Copy link
Member Author

Choose a reason for hiding this comment

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

unfort not

@erunion erunion merged commit 8810603 into main Sep 15, 2023
@erunion erunion deleted the feat/node-protocol branch September 15, 2023 17:06
@erunion erunion added this to the v7 milestone Oct 19, 2023
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.

3 participants