`punycode` deprecated warning under Node 22

Open
#148 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
node.js, typescript
Domain
cli, tooling

Research direction

Start from the caprover-deploy command and run the reported npm ls punycode dependency tree under Node 22. Trace the request-promise usage and evaluate the suggested replacement, including the noted breaking changes; done means the command no longer emits the punycode deprecation warning.

Written by the indexing model from the issue text.

Description

When running caprover-deploy for example, under Node 22, you get this deprecation notice:

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

Dependency tree (npm ls punycode)

[email protected]
+-- [email protected]
| `-- [email protected]
|   `-- [email protected]
|     `-- [email protected]
+-- [email protected]
| `-- [email protected]
|   `-- [email protected]
|     `-- [email protected]
|       `-- [email protected]
|         `-- [email protected]
|           `-- [email protected]
|             `-- [email protected] deduped
`-- [email protected]
  `-- [email protected]
    `-- [email protected]

Investigation

Explanation in this section here: https://www.npmjs.com/package/punycode#installation

Fix

The prod dependency tough-cookie should be updated to v5.0.0 (however it is a sub-dep, of the dep request-promise which will never receive an update)

request-promise should be upgraded to another library like node-fetch, since it has been deprecated 4 years ago.

Dominant language
TypeScript
Stars
78
Forks
43
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from caprover/caprover-cli

All issues in caprover/caprover-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.