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.
Do you mean transitive dependency?
@silvenon It's probably should be a major bump.
@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.
@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.
We'll publish a new patch version within the next few days.
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.
@kaidjohnson Though there should be interop in that package. Which package depends on react-transition-group?
@TrySound I believe I traced it to https://github.com/google-fabric/velocity-react/blob/master/src/velocity-transition-group.js#L56 v1.4.1 within Storybook v4.1.12
:laughing: Yes, transitive :roll_eyes: Fridays and words don't always mix good.
Well, frontend projects written with commonjs is unexpected thing these days.
:tada: This issue has been resolved in version 2.7.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Most helpful comment
@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.