nuxt-modules / cloudinary

Cloudinary Module for Nuxt
https://cloudinary.nuxtjs.org
MIT License
249 stars 34 forks source link

[Bug] Analytics passing in entire Nuxt package.json #123

Closed colbyfayock closed 1 year ago

colbyfayock commented 1 year ago

The analytics ID isn't currently applying correctly, I noticed 2 things:

Currently:

techVersion: nuxtPkg

Should be:

techVersion: nuxtPkg.version

Version

@nuxtjs/cloudinary 2.0.0-rc.1 nuxt: 3.5.0

colbyfayock commented 1 year ago

i found out there's also a limitation with the techVersion property in that the API only allows a range of 1-10 for minor releases

we can just lock that to major releases and do something along the lines of:

okay - for the techVersion apparently only accepts a minor range of 1-10

so im thinking maybe what we need to do is just limit the techVersion to major

can just use something like this:

`${nuxtPkg.version.split('.')[0]}.0.0`

honestly could do something simiilar with sdkSemver if you think that makes sense

"1.0.0-beta.9".split('-')[0] which would always grab the main bit there

Baroshem commented 1 year ago

Fixed with https://github.com/nuxt-modules/cloudinary/commit/56c35515e89a35618d379a892646d5c115396e8b