Forge runtime support for Node.js 22 was announced on 11 December and is recommended according to the documentation.
But the current version (4.1.2) of the @forge/api
package still uses the built-in punycode
module, which entered the runtime deprecation stage in Node.js 21. This means that every time a function is invoked, the following error is logged:
[DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
The reason for this warning is that @forge/api
uses an old version of node-fetch
. One of its dependencies imports the built-in punycode
module instead of using the one published on npm (which has the same name and is not deprecated):
@forge/api@4.1.2
└─┬ node-fetch@2.7.0
└─┬ whatwg-url@5.0.0
└── tr46@0.0.3 <- This one uses `punycode`
The deprecation doesn’t affect the functionality of apps, but it produces a lot of unnecessary log lines.