Skip to content

Conversation

Phoscur
Copy link

@Phoscur Phoscur commented Aug 31, 2024

Closes #2027

Did not have much success in easily upgrading the node-fetch dependency here, also I'm not sure how much backward compatible you want to stay..? Breaking with node.js below v18 should be ok.

This is just the easiest step possible forward, and actual upgrade to node-fetch v3 is a lot more effort!
See https://github.com/node-fetch/node-fetch/blob/main/docs/v3-LIMITS.md

@Phoscur
Copy link
Author

Phoscur commented Nov 2, 2024

Dug up this resolution comment (see other resolutions linked in there too): node-fetch/node-fetch#1793 (comment)

Reverted the node-fetch upgrade (@ maintainers, please follow up as you like) in favour of overriding the whatwg-url dependency.
Throwing in an npm audit fix on top ;)

@MKRhere please have a look!

@Phoscur Phoscur changed the title Update node-fetch to v3.3.2 Override whatwg-url to v14, fix punycode deprecation waring Nov 2, 2024
@Phoscur Phoscur changed the title Override whatwg-url to v14, fix punycode deprecation waring Override whatwg-url to v14, fix punycode deprecation warning Nov 2, 2024
@MKRhere
Copy link
Member

MKRhere commented Jan 10, 2025

Telegraf v4 started support with Node 12, and while that's too old now, I'm not sure if we should break compat within a major release. v5 is still a while away and it removes node-fetch completely in favour of native. I wonder if we should just request users to add overrides in newer versions of Node? Or considering Node may break compat in newer versions by removing the deprecated punycode module, perhaps we should break Node <18 compat after all, hmmm...

@Phoscur
Copy link
Author

Phoscur commented Jan 10, 2025

Minor version 4 update dropping node <18 compat seems the way to go imo if v5 is too far away

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.

Punycode deprecation in node.js 21
2 participants