bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Deprecation warning about punycode module when running bru CLI

Open EppO opened this issue 10 months ago • 4 comments

Hi,

When running bru CLI, it displays the following warning message:

$ bru run
(node:31248) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Running Folder Recursively

My Test Collection (200 OK) - 391 ms
   ✓ assert: res.status: eq 200
   ✓ assert: res.headers['content-type']: contains text/html

Requests:    1 passed, 1 total
Tests:       0 passed, 0 total
Assertions:  2 passed, 2 total
Ran all requests - 391 ms

I just started using Bruno and I love it! Thanks a lot for your work, really appreciated 🙏

EppO avatar Apr 04 '24 21:04 EppO

What version of the CLI are you using on what OS/Version? I just installed the cli v.1.11.0 and ran bru run in a collection with a couple requests, with scripts and tests and don't see the deprecation warning.

jwetzell avatar Apr 06 '24 01:04 jwetzell

I'm seeing the error on macOS 14.4.1 with bru cli 1.11.0

image

DanaEpp avatar Apr 06 '24 07:04 DanaEpp

That is my exact setup. How did you install bru CLI?

Update: I am now able to reproduce by using a node version of 21.

jwetzell avatar Apr 06 '24 11:04 jwetzell

Besides adding the userland version of punycode and using it in bruno-js's own imports. The chain of dependencies that is going to still spit out that warning is: [email protected] -> [email protected] -> [email protected] -> node:punycode.

But node v21 has the fetch api stable and built-in so hopefully the dependency on node-fetch can be ditched altogether there.

jwetzell avatar Apr 06 '24 12:04 jwetzell