Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings on deprecated libraries and dependencies when installed on Node V12.22.09 #153

Open
juanrcuervo opened this issue Nov 15, 2022 · 1 comment

Comments

@juanrcuervo
Copy link

The following warnings are received when installing node-ari-client on Node version 12.22.9
root@core2:~# npm install ari-client
npm WARN deprecated sprintf@0.1.1: The sprintf package is deprecated in favor of sprintf-js.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated swagger-client@2.0.26: No longer maintained, please upgrade to swagger-client@3.

Seems like a little code rewrite is needed. Any volunteers ? I´d be glad to help

@dioris-moreno
Copy link

I agree, Juan. I'm in.

Regarding uuid

The only function used from this module is v4 in line 84 of resources.js. I use this function in multiple projects, and it wouldn't represent any significant change migrating to the latest version of uuid (9.0.0).

Regarding request

It's only used in line 114 of client.js and only to check if the Asterisk host is reachable before creating the swagger client.

Here we can find a list of Alternative libraries to request #3143.

It seems like node-fetch would be a good option (with the smallest footprint) considering the ari-client needs.

Regarding har-validator

This module is a dependency of request, so migrating request would eliminate this issue.

Regarding sprintf

I found it's a dependency of the shred module, but I have no idea what it's used for. Any thoughts?

Regarding the swagger-client!

Here is a problem: the swagger format. All the ARI definition JSON files are in the test/fixtures folder. These JSON files are part of the Asterisk installation and comply with version 1.1 of swagger. The problem is the format of Swagger 2.0 and above is different, and the maintained versions of the library no longer support the 1.1 formats. Migrating to a newer swagger client implies migrating the ARI definition JSON files, which are part of Asterisk. In other words: upgrading the swagger-client would be impossible.

One option could be to fork the swagger-client 2.x. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants