Open MikeMcC399 opened 10 months ago
Just for information on how tough-cookie wants to deal with this error: https://github.com/salesforce/tough-cookie/issues/324
@AnWeber
Just for information on how tough-cookie wants to deal with this error: salesforce/tough-cookie#324
Thanks for passing this on!
tough-cookie
Summary
When
@cypress/request
is run in a Node.js21.x
or22.x
environment, a deprecation notice is output:punycode
has been deprecated in Node.js sincev7.0.0
. Starting with Node.js21.x
the deprecation is actively announced at run-time (see https://github.com/nodejs/node/pull/47202).The linked deprecation notice contains the text:
"The version of the
punycode
module bundled in Node.js is being deprecated. In a future major version of Node.js this module will be removed."This poses a risk for the future use of
@cypress/request
.Simplest Example to Reproduce
Create the following file as
request_test.js
In a Node.js
22.x
environment, install@cypress/request
and execute withAlternatively execute the following in a clone of this repo:
Expected Behavior
No deprecation warning should be produced when using
@cypress/request
under Node.js22.x
Current Behavior
When Node.js
v21.0.0
is used, then running the test produces a deprecation warning:showing that psl@1.9.0 is the problematic call.
Solution options
The Node.js punycode deprecation notice contains hints on how to update to a supported environment. It seems that this will not be possible to implement for
@cypress/request
without major changes.punycode
is not used directly by@cypress/request
so the issue could only be solved by updating dependencies. Since codecov@3.8.3 is already the latest version andcodecov
has been deprecated. At first glance that would seem to block resolving the issue through simple version update of dependencies.Some dependencies are proposed for update through PR https://github.com/cypress-io/request/pull/45, however this does not solve the issue. It would require quite some effort to dig into each of the dependencies to check their relationship with this issue.
The repo request/request from which
@cypress/request
is forked, was already deprecated on Feb 11, 2020 and therefore there will be no resolution available from the upstream repo.Dependency tree
browserify@13.3.0
browserify current version is
browserify@17.0.0
published 3 years ago.codecov@3.8.3
codecov@3.8.3 is the latest version and the package has been deprecated.
karma-browserify@5.3.0
karma-browserify current version is karma-browserify@8.1.0 published 2 years ago.
Context
https://nodejs.org/dist/latest-v21.x/docs/api/punycode.html#punycode
Since the version of the
punycode
module bundled in Node.js is being deprecated and it will be removed in a future major version of Node.js, there is a risk that at some time in the future@cypress/request
will no longer work.Your Environment
3.0.1
v21.0.0
v22.5.1
10.2.0
10.8.2
Ubuntu 22.04.4 LTS