bash-lsp / bash-language-server

A language server for Bash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Stephen291299 opened this issue · 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!

Thanks! PRs are more than welcome.

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:punycode@1.3.2:
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"

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