Unleash / unleash-client-node

Unleash client SDK for Node.js
https://docs.getunleash.io
Apache License 2.0
210 stars 71 forks source link

feat: automatically generated instanceId #637

Closed nunogois closed 2 months ago

nunogois commented 2 months ago

https://linear.app/unleash/issue/2-2397/make-instance-id-autogenned-node

This makes instanceId an automatically generated property, instead of being set by the user.

Similar to https://github.com/Unleash/unleash-client-ruby/pull/179 Similar to https://github.com/Unleash/unleash-client-dotnet/pull/226

coveralls commented 2 months ago

Coverage Status

coverage: 90.834% (+0.06%) from 90.772% when pulling f474dc8de6434ee2514e6e1b08fc825b9307e0f1 on feat-auto-generated-instanceid into 0198e0adba136c31db9fff12f72283d895ddf23b on main.

alvinometric commented 2 months ago

Not sure it needs a major version because the code will still work if you pass an object with an instanceId

sighphyre commented 2 months ago

Not sure it needs a major version because the code will still work if you pass an object with an instanceId

It matters for TypeScript, sadly (actually strongly mixed feelings?). I thought the same thing so I went and checked and yes the compiler does complain

alvinometric commented 2 months ago

:old-man-yells-at-typescript:

naderghanbari commented 1 month ago

What about Unleash-API-compatible providers like Gitlab Feature Flags, that do require an instanceId? Does this mean the sdks/clients will be incompatible with these providers after this change?