za419 / CadenceBot

A Discord bot for Cadence Radio
MIT License
2 stars 1 forks source link

Bump node-fetch from 2.6.1 to 3.1.1 #91

Closed dependabot[bot] closed 2 years ago

dependabot[bot] commented 2 years ago

Bumps node-fetch from 2.6.1 to 3.1.1.

Release notes

Sourced from node-fetch's releases.

v3.1.1

Security patch release

Recommended to upgrade, to not leak sensitive cookie and authentication header information to 3th party host while a redirect occurred

What's Changed

New Contributors

Full Changelog: https://github.com/node-fetch/node-fetch/compare/v3.1.0...v3.1.1

v3.1.0

What's Changed

... (truncated)

Changelog

Sourced from node-fetch's changelog.

Changelog

All notable changes will be recorded here.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

What's Changed

New Contributors

Full Changelog: https://github.com/node-fetch/node-fetch/compare/v3.1.0...v3.1.2

3.1.0

What's Changed

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by endless, a new releaser for node-fetch since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/za419/CadenceBot/network/alerts).
JunhaoSLi commented 2 years ago

It seems like node-fetch has moved to being an ESM only package with the v3 major update. They do suggest sticking with v2 until the project is ready to move to ESM. I'm not entirely sure what this means but what are your thoughts @za419?

za419 commented 2 years ago

Hmm. Okay... Well, I did look at it. ESM-only (ECMAScript Module?) means we can't require it anymore, we'd have to do something like import fetch from 'node-fetch'. Which isn't that bad an idea I suppose.... But still, I'd want to change all the imports, and then the config imports look weird and we might have to explicitly JSON.parse them. Grr..

The only other potential consequence I see from the link is that they bump the version requirement to Node 12.20, which we inherit. But we document support for 12.0+ - That shouldn't be a big deal, it's just a minor version bump and we should run latest anyway - Prod is on 15.14.

So, options:

  1. Bump version, also alter README to show minimum Node version of 12.20 (or greater if we want), change bot.js to use import instead of require and possibly fix the config importing, regression test (1 PR for all, changes brought into this PR)
  2. Kill this PR and bump to the latest 2.x of node-fetch. Again, 1PR and regression test.
  3. Kill this PR, and since we only use fetch in two (nearly identical) cases to fetch nowplaying information, just remove our dependency on it and refactor around request.get to better align with the other APIs we consume (even know nowplaying is weird anyway since @kenellorando chose to use JSONP here and we don't consume it that way).

What do you think?

JunhaoSLi commented 2 years ago

I guess I'll try to see how much of a pain option 1 is and if that doesn't work I'll try option 3. I'm getting the impression that ECM is the future and something that would need to be dealt with at some point possibly? So I'll try option 1 first.

za419 commented 2 years ago

Sounds good to me.

Yeah, ECM is definitely the future, the question is just how much we care about whether we deal with it. Plenty of software does outdated things fine...

But hey, I don't mind using new and better stuff. Go for it!

dependabot[bot] commented 2 years ago

Superseded by #97.