launchdarkly / react-client-sdk

LaunchDarkly Client-side SDK for React.js
Other
86 stars 68 forks source link

Version 3.0.5 ships without types #197

Closed michaldudek closed 1 year ago

michaldudek commented 1 year ago

Describe the bug

I just installed version 3.0.5 and it seems the distributed code is missing TS types, or rather they're not configured properly.

To reproduce

VSCode tells me:

Screenshot 2023-04-12 at 20 51 13

Checking the dist code on npm - https://www.npmjs.com/package/launchdarkly-react-client-sdk/v/3.0.5?activeTab=code - it looks like there's now a new folder /dist and it only contains main.js.

However, package.json defines:

"types": "dist/index.d.ts",

This file does not exist.

Expected behavior

TypeScript types should be generated and imported correctly.

SDK version 3.0.5

Language version, developer tools

OS/platform

MacOS 13.3.1

Additional context

It looks like https://github.com/launchdarkly/react-client-sdk/pull/187 broke this.

For now I downgraded to 3.0.4 and it works fine.

yusinto commented 1 year ago

Thanks for reporting this. We are investigating internally and will provide an update soon. Filed internally as 197073.

yusinto commented 1 year ago

We have released 3.0.6 which should fix this issue.

michaldudek commented 1 year ago

Indeed, it has, thank you :)

larsroettig commented 1 year ago

@yusinto rollback is not option why was not invastigated why this dont work ?