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

Many updates - soliciting feedback #926

Closed
wants to merge 7 commits into from

Conversation

mdmower
Copy link
Contributor

@mdmower mdmower commented Jun 2, 2024

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.

@mdmower
Copy link
Contributor Author

mdmower commented Jun 3, 2024

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
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant