-
Notifications
You must be signed in to change notification settings - Fork 7
feat: promises rewrite and drop support for node 10 #131
Conversation
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.
Just did a pass and changes seem sound! I don't know much about this library and if anything, I'm just weary of all the different ways an OAS file could be invalid lol. Seeing the increase in test coverage is reassuring though!
Also one general question: should all the fixtures you created here exist in @readme/oas-examples
? Or are you limiting that library to only valid files?
"swagger2openapi": "^2.11.16", | ||
"swagger2openapi": "^7.0.6", |
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.
omfg lol
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.
I've been getting pinged by Dependabot about this every month when it tries to update it. 😅
"r2": "^2.0.1", | ||
"@apidevtools/json-schema-ref-parser": "^9.0.7", | ||
"node-fetch": "^2.6.1", |
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
Yeah that library should only have valid examples. |
Late 2019 in rdme we lost the ability to bundle in
$ref
pointers spread across multiple files, and unfortunately with the way that that library is written it's difficult to useoas-normalize
because it's currently based on supplying callbacks. On top of that, theswagger-parser
andswagger2openapi
dependencies thatoas-normalize
have also been rewritten to support promises, leaving this thing in the dust.So I've fully rewritten it to be promise-based. And added full unit test coverage in the process. And removed a handful of dependencies that it didn't really need.
🚀
🧰 What's being changed?