js-sdk icon indicating copy to clipboard operation
js-sdk copied to clipboard

List of breaking 2.0 changes

Open toddbaert opened this issue 1 year ago • 3 comments

Please use this issue to compile a list of small breaking changes for 2.0. These should not require much to absorb should generally be small typing/naming changes.

List so far:

  • [ ] ~https://github.com/open-feature/js-sdk/pull/794~
  • [ ] make it impossible to return an error resolution from providers (force them to throw if something goes wrong)
  • [ ] removing setProviderAndWait and make setProvider async
  • [ ] consider renaming Client interface to something less likely to clash (I'm not sure about this one, but @luizgribeiro wanted to consider it)
  • [ ] ~CommonEventDetails props should all be readonly~

toddbaert avatar Jan 31 '24 14:01 toddbaert

consider renaming Client interface to something less likely to clash (I'm not sure about this one, but @luizgribeiro wanted to consider it)

Giving some context on this, I was working on a project that already had an SFTP dependency that had a exported Client. The idea here is not to be a breaking change, but provide an alias to OF Client (maybe OFClient) in order to prevent this kind of clash. It wouldn't be necessary to deprecate Client though.

luizgribeiro avatar Mar 06 '24 00:03 luizgribeiro

Giving some context on this, I was working on a project that already had an SFTP dependency that had a exported Client. The idea here is not to be a breaking change, but provide an alias to OF Client (maybe OFClient) in order to prevent this kind of clash. It wouldn't be necessary to deprecate Client though.

That sounds like a good idea to me. A ton of libraries export clients and it can even cause issues when IDEs import from the wrong one if you're not careful.

beeme1mr avatar Mar 06 '24 01:03 beeme1mr

I a meeting we decided to not do the 2.0 release yet. The crossed out points will be considered as non breaking and done before a 2.0 release.

lukas-reining avatar Apr 28 '24 10:04 lukas-reining