storyblok / storyblok-js-client

Universal JavaScript client for Storyblok's API
MIT License
129 stars 87 forks source link

V5: flushCache is documented, but private #360

Closed paulcwatts closed 1 year ago

paulcwatts commented 1 year ago

Expected Behavior

The flushCache function was usable in V4, and is currently documented in the README. If this is documented, I'd expect to be able to continue to use this function.

Current Behavior

In V5 it is marked as 'private' in the code, and therefore cannot be used by TypeScript code.

Notes

Either I'd expect this to not be marked as private in the code, or removed from the documentation and marked as a V5 breaking change. I'd prefer the former, as it's a useful call.

Let me know, I'd be happy to make a PR.

thiagosaife commented 1 year ago

@paulcwatts You're right. I'll fix that. Thanks for the heads up.

thiagosaife commented 1 year ago

@paulcwatts Please take a look at the 5.1.4 version.

paulcwatts commented 1 year ago

Thanks for the quick response! I will take a look.

paulcwatts commented 1 year ago

Another minor issue: in V4, flushCache returns Promise<void>, this version returns void. This is a minor change to remove await from the call site though.

paulcwatts commented 1 year ago

There's another issue when trying to update to this version: somehow the StoryblokBridge typing disappeared. If I use V4 of this library (or v1.8.6 of @storyblok/js), then StoryblokBridge and window.storyblok have proper typing. If I update to this library, the typing is gone.

thiagosaife commented 1 year ago

@paulcwatts We'll have a look on those. Thanks for the heads up.

thiagosaife commented 1 year ago

@paulcwatts Hello, sir. Are you still having problems with this matter?

paulcwatts commented 1 year ago

It looks like it's fixed, thanks! I'll close it out.