Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.7.0 breaks legacy module import #475

Closed
kaidjohnson opened this issue Mar 22, 2019 · 11 comments
Closed

v2.7.0 breaks legacy module import #475

kaidjohnson opened this issue Mar 22, 2019 · 11 comments
Labels

Comments

@kaidjohnson
Copy link

kaidjohnson commented Mar 22, 2019

What is the current behavior?

var TransitionGroup = require('react-transition-group/TransitionGroup');

v2.7.0 returns an object { default: <TransitionGroup> }

What is the expected behavior?

v2.6.1 returns the TransitionGroup function directly.

react-transition-group is a ternary transitive dependency from a few depths of our package tree, but I've confirmed that downgrading to 2.6.1 fixes the issue for us, but forces us to surface a ternary transitive dependency in our package.json directly.

@TrySound
Copy link
Contributor

Do you mean transitive dependency?

@TrySound
Copy link
Contributor

@silvenon It's probably should be a major bump.

@silvenon
Copy link
Collaborator

silvenon commented Mar 22, 2019

@TrySound I don't get it, do you know why this is happening and whether it should? I thought CJS build stayed the same and that we just linked to it via a generated package.json.

@silvenon silvenon added the bug label Mar 22, 2019
@silvenon
Copy link
Collaborator

@TrySound if this is expected and necessary behavior, then I'll revert the change in the next patch version and repeat the ESM commit as a breaking change.

@silvenon
Copy link
Collaborator

We'll publish a new patch version within the next few days.

@TrySound
Copy link
Contributor

TrySound commented Mar 22, 2019

The problem is importing esm from cjs. Usually it's not a problem. But it is for example with material-ui which didn't support esm for a long time.

@TrySound
Copy link
Contributor

@kaidjohnson Though there should be interop in that package. Which package depends on react-transition-group?

@kaidjohnson
Copy link
Author

@kaidjohnson
Copy link
Author

😆 Yes, transitive 🙄 Fridays and words don't always mix good.

@silvenon silvenon pinned this issue Mar 23, 2019
@TrySound
Copy link
Contributor

Well, frontend projects written with commonjs is unexpected thing these days.

@jquense
Copy link
Collaborator

jquense commented Mar 25, 2019

🎉 This issue has been resolved in version 2.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants