3rd-Eden / useragent

Useragent parser for Node.js, ported from browserscope.org
MIT License
899 stars 138 forks source link

Does Not Declare yamlparser Dependency Correctly #139

Closed johnnyshankman closed 5 years ago

johnnyshankman commented 5 years ago

In order to use this package I have to manually install yamlparser as if it were an external dependency, which it isn't.

The library src code makes a call to require('yamlparser') therefore it should not be considered a devDependency, but an actual dependency in the package.json. It is required in order to use this library, not just develop on it.

The call: https://github.com/3rd-Eden/useragent/blob/c92567b6b5212436c015bd8b100968e836bf10fe/lib/update.js#L15

The incorrect declaration in package: https://github.com/3rd-Eden/useragent/blob/master/package.json#L41

Should be

"dependencies": {
    "yamlparser": "~0.0.0"
  },
"devDependencies": {
    "assume": "~1.5.0",
    "mocha": "~5.0.0",
    "pre-commit": "~1.2.0",
    "request": "~2.83.0",
    "semver": "~5.5.0"
  },

I've also fixed your version semantics to use ~ in that example, as one would expect. https://docs.npmjs.com/about-semantic-versioning

johnnyshankman commented 5 years ago

Closing, I've realized this is in the README and more so an issue with another NPM package utilizing this one and not declaring yamlparser as a dependency.

https://github.com/rguerreiro/device/issues/33