Many updates - soliciting feedback#926
Closed
mdmower wants to merge 7 commits intocdimascio:masterfrom
Closed
Conversation
Contributor
Author
|
Couple of notes:
UPDATE: Both of these notes have been resolved in the latest push. |
- Update most packages within their major version numbers - Update @types/node to v18 in anticipation of dropping support for deprecated Node.js versions - Add js-yaml to dev dependencies since it is used directly in tests - Replace .safeLoad with .load in test since .safeLoad is deprecated - Type loaded document as OpenAPIV3.Document to fix type error - Update @types/supertest from v2 to v6 to match the lib version
- Ref: https://github.com/mochajs/mocha/releases/tag/v10.0.0 - Breaking changes do not affect this project
- Add npm script "format" to format codebase - Add vscode workspace settings to suggest Prettier extension and to format on save using prettier by default - Apply formatting to all applicable files
- Set min node.js version to 18 - Set lib, target, module, and moduleResolution to recommended settings from https://github.com/tsconfig/bases/blob/main/bases/node18.json - Use default imports where possible
- Make types available for chai, lodash.get, and lodash.clonedeep - Update OpenApiSpecLoader constructor to allow immutable document (now that cloneDeep() correctly passes through the object type)
- Replace many "any" types with narrower types (this isn't comprehensive, but is an improvement) - Fix some asynchronous calls being invoked as "void" in test blocks - Use same server start/stop routine in all tests
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR isn't meant to be code reviewed all at once. It's made available as a full set of commits to solicit feedback on which would be welcome. Separate PRs would be created for each approved commit.
I did a bit of repository maintenance this weekend and am interested to hear whether these commits would be welcome or if they're too heavy-handed. Notably, I thought this would be a good time to drop support for Node.js versions older than 18, allowing for tsconfig updates to use more modern module resolution strategies. For example, the hack in #922 to obscure
await import()wouldn't be needed.See commit descriptions for more details on each. Thanks!
P.S. The prettier formatting across the code base would cause merge conflicts with virtually every open PR. I'd recommend #882 be merged before this series, and then I'd be happy to rebase this series on the current upsteam HEAD.