googleapis / nodejs-common

🚀🐢 A set of classes and utilities used in Google npm modules.
Apache License 2.0
58 stars 35 forks source link

Package `ent` isn't maintained anymore, and using deprecated `punycode` #812

Closed Drarig29 closed 6 months ago

Drarig29 commented 7 months ago

The ent package is still using the native punycode module which used to be bundled in Node.js < 21.

Starting in Node.js 21, this native module was deprecated (see official Node.js docs), and we now have to use the userland punycode.

And the following warning shows:

(node:1) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. 

Since the latest version of ent is 9-years-old and the repository was removed from GitHub, I think we could replace ent with another heavily-used package, e.g. html-entities.

Environment details

Steps to reproduce

  1. npm install @google-cloud/common
  2. node --trace-deprecation -e "require('@google-cloud/common')" (on Node.js 21)

I'll make a PR.

Drarig29 commented 7 months ago

Solving this will close https://github.com/DataDog/datadog-ci/issues/1283

Drarig29 commented 6 months ago

@sofisl Thanks for merging the PRs! 🙇

Could you publish a patch release of @google-cloud/common? Cheers!