data-point icon indicating copy to clipboard operation
data-point copied to clipboard

Update url.URL vs url.parse

Open acatl opened this issue 6 years ago • 0 comments

Problem description:

node's url.parse has been deprecated on node 11 and above.

Example of code that needs to be updated:

https://github.com/ViacomInc/data-point/blob/53b51857c5e5bc6d684dfe4c0ec078afc2cb08f8/packages/data-point-express/lib/route-middleware.js#L5-L7

At the moment a eslint-disable-line has been placed to ignore this warning (PR https://github.com/ViacomInc/data-point/pull/351).

NOTE: on a very light test replacing it I had some issues on the unit tests, reason why this issue was created to look at the code on its own PR.

Suggested solution:

update instances to use node's preferred usage of url.URL instead

What happened:

linter complained of deprectated usage

Reproduction:

Remove eslint-disable-line on the instances of url.parse and run yarn lint.

acatl avatar Jul 11 '19 15:07 acatl