botkit icon indicating copy to clipboard operation
botkit copied to clipboard

Update dependencies and replace `request` package

Open strmer15 opened this issue 1 year ago • 2 comments

This fixes https://github.com/howdyai/botkit/issues/2238

  • Updates a lot of dependencies, since I couldn't actually install or build anything until I did a lot of these

    • Latest eslint and plugins, so that there weren't peer dependency errors
      • Updated the config files, notably switched @typescript-eslint/ban-ts-ignore to @typescript-eslint/ban-ts-comment
      • eslint-plugin-node has been replaced by eslint-plugin-n
    • Latest typescript and tsdoc, tsdoc 0.22 was giving peer dependency errors about old typescript
      • Fixed the build-docs command, seems like it may have been broken for a while - incorrect options, missing tsconfig
      • Removed typedoc-plugin-external-module-name since it's no longer maintained and doesn't work with newer tsdoc versions
    • Regenerated package-lock.json files, some of them were deleted since they're no longer used
    • Updated to latest lerna and updated the readme
  • Replaced request with cross-fetch in a few different places

    • https://github.com/lquixada/cross-fetch
    • The trickiest part of this is handling the errors and responses - in each case, I'm checking response.ok (for a 2xx response status) and then throwing an Error if it doesn't match. Then, I'm handling the response as plain text or as JSON if it parses correctly.

strmer15 avatar Feb 14 '23 23:02 strmer15