davidjbradshaw / iframe-resizer

Keep iFrames sized to their content.
https://iframe-resizer.com
Other
6.66k stars 980 forks source link

4.3.5 release breaks package import when used with @types/iframe-resizer package #1140

Closed AKlein920 closed 1 year ago

AKlein920 commented 1 year ago

Describe the bug The 4.3.5 release changed the library's exports.

This release requires a change to the import: import {iframeResize} from 'iframe-resizer';

Prior to this release, we imported the library like this: import {iframeResizer} from 'iframe-resizer';

We also use typescript, and the @types/iframe-resizer package, which exports the iframeResizer function.

The discrepancy in exports (iframeResize vs iframeResizer) makes it seem like this 4.3.5 release should have been labeled as major, rather than minor.

Was this change intended? If so, we can adjust types separately.

davidjbradshaw commented 1 year ago

Bugger, not it wasn't.

davidjbradshaw commented 1 year ago

OK, not sure how that happened, but it now once again supports both. Technically iframeResize() is correct and what all the docs refer to, but I guess changing it in typings outside a major version is a bad idea. For now could you allow both?

AKlein920 commented 1 year ago

Thank you very much for making this change!