-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat!: update dep, TS arg validation, stricter internal TS
* feat: add Typescript hints for the `filepathOrObject` arg * refactor: much stricter internal use of TypeScript * BREAKING CHANGE: this updates [our validation dependency](https://www.npmjs.com/package/openapi-response-validator) by 2 major versions, so validation error messages (and maybe validation rules) are slightly different. For example, `res did not satisfy it because: property1 should be string, property2 should be string` is now `res did not satisfy it because: property1 must be string, property2 must be string` (`should` -> `must`). We expect our users to _read_ these error messages during testing but not assert on them, such that this change shouldn't break anyone's existing tests. Moreover, renaming `should` to `must` does not indicate that the validation rule has changed. **However, it is possible that _other_ validation rules have changed**
- Loading branch information
Richard Waller
authored
Sep 12, 2021
1 parent
f9a9767
commit 04b3d88
Showing
36 changed files
with
782 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { inspect } from 'util'; | ||
|
||
export const stringify = (obj) => | ||
export const stringify = (obj: unknown): string => | ||
inspect(obj, { showHidden: false, depth: null }); | ||
|
||
export const joinWithNewLines = (...lines) => lines.join('\n\n'); | ||
export const joinWithNewLines = (...lines: string[]): string => | ||
lines.join('\n\n'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.