bash-language-server icon indicating copy to clipboard operation
bash-language-server copied to clipboard

Deprecation Warning with Node.js Versions Above 20.11.1 in bash-language-server

Open Stephen291299 opened this issue 2 years ago • 5 comments

Code editor

No response

Platform

ubuntu

Version

5.1.2

What steps will reproduce the bug?

Steps to Reproduce:

1)Install bash-language-server using npm. 2)Run the binary of bash-language-server in the terminal using Node.js version 21.5.0. 3)Observe the deprecation warning related to the punycode module.

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

Expected Behavior:

The bash-language-server should run without any deprecation warnings with Node.js version 21.5.0.

What do you see instead?

When running the binary of the bash-language-server with Node.js versions above 20.11.1, I expect the following:

1)The bash-language-server should run without any deprecation warnings related to the punycode module. 2)The functionality of the bash-language-server should not be affected by the deprecation warning, ensuring smooth operation and compatibility with newer versions of Node.js. This expected behavior would ensure that developers can use the latest Node.js versions seamlessly with the bash-language-server without encountering deprecation warnings or compatibility issues.

Additional information

Issue Description:

I encountered a deprecation warning related to the punycode module when running the binary of the bash-language-server with Node.js version 21.5.0. The warning message is as follows:

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

Additional Information:

1)Node.js version lower than 20.11.1 works correctly without any deprecation warnings. 2)Node.js version 21.5.0 is produce the deprecation warning related to the punycode module. 3)I think Node versions above 20.11.1 have faced this issue.

This issue seems to be specific to Node.js versions above 20.11.1. Any insights or suggestions on how to resolve this issue would be greatly appreciated. Thank you!

Stephen291299 avatar Mar 19 '24 10:03 Stephen291299

Thanks! PRs are more than welcome.

skovhus avatar Mar 19 '24 10:03 skovhus

Here are the dependencies (direct or not) that still relies on this module:

rg punycode                                                                                                      
node_modules/whatwg-url/lib/url-state-machine.js
2:const punycode = require("punycode");
18:  return punycode.ucs2.decode(str).length;
234:  input = punycode.ucs2.decode(input);
424:  const decoded = punycode.ucs2.decode(input);
555:  this.input = punycode.ucs2.decode(this.input);
1268:  const decoded = punycode.ucs2.decode(username);
1276:  const decoded = punycode.ucs2.decode(password);

node_modules/tr46/index.js
3:var punycode = require("punycode");
102:    label = punycode.toUnicode(label);
159:      return punycode.toASCII(l);

node_modules/fuzzy-search/yarn.lock
4560:    punycode "^1.2.4"
5503:[email protected]:
5505:  resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
5508:punycode@^1.2.4:
5510:  resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
5513:punycode@^2.1.0:
5515:  resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
6710:    punycode "^2.1.0"
6730:    punycode "1.3.2"

Delapouite avatar Apr 24 '24 09:04 Delapouite

I can confirm i have the same issue after installing shellcheck and then bash-language-server in Manjaro. The same warning message within Kate.

image

greatbaracus avatar Apr 26 '24 13:04 greatbaracus

Is there any news for this issue ? Thanks

greatbaracus avatar Jul 13 '24 23:07 greatbaracus

Same problem with:

ArchLinux Kate: 24.12.1 bash-language-server: 5.4.3-1 nodejs: 23.4.0-1

Or with bash bash-language-server start

Marzal avatar Jan 23 '25 17:01 Marzal