bundled `normalize-url` giving `node:punycode` deprecation warning

Description:

Since about nodejs 21 there is a deprecation warning that node:punycode is deprecated, which yarn v1 / classic mitigates by redirecting all require('punycode') to node_modules/punycode somehow via webpack, but only via build script build-dist / build-bundle, not in plain build which this package uses.

Additional info:

  • package version(s): 1.22.22-1
  • nodejs package version: 22.2.0-1 (extra/nodejs)
  • config and/or log files:
⠁ (node:69366) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:398:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:337:10)
    at loadBuiltinModule (node:internal/modules/helpers:96:7)
    at Module._load (node:internal/modules/cjs/loader:1037:17)
    at Module.require (node:internal/modules/cjs/loader:1271:19)
    at require (node:internal/modules/helpers:123:16)
    at Object.<anonymous> (/usr/lib/node_modules/yarn/node_modules/normalize-url/index.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1434:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)

Steps to reproduce:

  1. Install yarn from pacman (extra/yarn)
  2. mkdir test && cd $_
  3. NODE_OPTIONS='--trace-deprecation' yarn add uuid
Edited by hasezoey