Closed dependabot[bot] closed 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?
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:
import
instead of require
and possibly fix the config importing, regression test (1 PR for all, changes brought into this PR)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?
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.
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!
Superseded by #97.
Bumps node-fetch from 2.6.1 to 3.1.1.
Release notes
Sourced from node-fetch's releases.
... (truncated)
Changelog
Sourced from node-fetch's changelog.
... (truncated)
Commits
36e47e8
3.1.1 release (#1451)5304f3f
Don't change relative location header on manual redirect (#1105)f5d3cf5
fix(Headers): don't forward secure headers to 3th party (#1449)f2c3d56
Create SECURITY.md (#1445)4ae3538
core: Warn when using data (#1421)41f53b9
fix: use more node: protocol imports (#1428)f674875
ci: fix main branch (#1429)1493d04
core: Don't use global buffer (#1422)eb33090
Chore: Fix logical operator priority (regression) to disallow GET/HEAD with n...7ba5bc9
update readme for TS@type/node-fetch
(#1405)Maintainer changes
This version was pushed to npm by endless, a new releaser for node-fetch since your current version.
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).