JulianMar / nuxt-bugsnag

Bugsnag module for nuxt.js
MIT License
49 stars 18 forks source link

AppVersion is constant #20

Closed jostrander closed 4 years ago

jostrander commented 4 years ago

I've tried every method available of setting the appVersion so that the reported errors match the published release in bugsnag. Unfortunately it appears that these defaults are always set because line 31 always overrides it after the merge.

https://github.com/JulianMar/nuxt-bugsnag/blob/e5d6a624cb2bb24eb6774d42b5b0fa68b262b92c/lib/module.js#L18-L21

https://github.com/JulianMar/nuxt-bugsnag/blob/e5d6a624cb2bb24eb6774d42b5b0fa68b262b92c/lib/module.js#L31

Then the default is referenced here on line 72: https://github.com/JulianMar/nuxt-bugsnag/blob/e5d6a624cb2bb24eb6774d42b5b0fa68b262b92c/lib/module.js#L68-L73

And here (differently) on line 87. https://github.com/JulianMar/nuxt-bugsnag/blob/e5d6a624cb2bb24eb6774d42b5b0fa68b262b92c/lib/module.js#L83-L87

I would submit a PR but there are multiple ways to fix this and I wanted to open it up for discussion first. Thanks!

jostrander commented 4 years ago

After further investigation, I realize that the original hypothesis was incorrect. The config object can be overriden by using the config key in the module options or topLevelOptions. However that is not the documented way of doing it.

jostrander commented 4 years ago

Nevermind. Please ignore. That is definitely how it is documented. I didn't notice it as looking at the first and last example the config key is barely distinguishable.