node-saucelabs icon indicating copy to clipboard operation
node-saucelabs copied to clipboard

query-string might need to be a dependency instead of a devDependency

Open josueuitzil opened this issue 2 years ago • 0 comments

Hi devs, I noticed that the stringify function of the query-string library is imported and used in the index file: https://github.com/saucelabs/node-saucelabs/blob/7e9c5fba5457ae144f748b2eb70acd25c1661cef/src/index.js#L8

Which results in it being also required in the build: image

Since that library is set only as a devDependency in the package.json, when node-saucelabs is installed in a project, the query-string library is taken from a nested dependency: image

I think this could be problematic if the version of normalize-url gets updated in the future (query-string stopped being required in v3 of normalize-url) or if a project uses npm resolutions. This could also cause unexpected bugs, since development of the package is done using version ^7.0.1 of query-string, while once installed it will use version 5.

I think this could be avoided by having the library as a dependency instead of just a devDependency. What do you think?

josueuitzil avatar Jun 09 '22 16:06 josueuitzil