react-side-effect: 1.1.4 is broken
Your patch release changed the module exports. react-document-title is now broken
×
TypeError: withSideEffect is not a function
./node_modules/react-document-title/index.js
node_modules/react-document-title/index.js:37
34 | }
35 | };
36 |
> 37 | module.exports = withSideEffect(
38 | reducePropsToState,
39 | handleStateChangeOnClient
40 | )(DocumentTitle);
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 11
- Comments: 43 (1 by maintainers)
Commits related to this issue
- Removes "module" property from package.json, fixes #48 — committed to gaearon/react-side-effect by lourd 6 years ago
- Merge pull request #49 from gaearon/no-module Removes "module" property from package.json, fixes #48 — committed to gaearon/react-side-effect by lourd 6 years ago
- Merge pull request #48 from ai/webpack-fix Avoid webpack to insert setImmediate — committed to TrySound/react-clientside-effect by theKashey 6 years ago
I did submit this anyways, but likely given the context should be a SemVer Major since it is breaking change.
https://github.com/gaearon/react-document-title/issues/55
Bingo. I’m gonna hit up one of the webpack guys to figure this out.
Likewise. This is causing our projects with react-document-title to fail.
Yes, if instead of allowing semver to update security patches they lock down even their transitive dependencies (which
react-document-titledoes not do) they will not be affected. I don’t think you should be using that as a shield though.Ok, I tested it on my build server just to be sure. If
1.1.3is installed everything is fine. If I let1.1.4install transitively it breaks the tests. I don’t have a good explanation for why, but it is broken. Judging by the reactions to the top post I am not alone.Would you consider unpublishing until it gets sorted out?
I think I’ve narrowed it down.
react-document-titledoesn’t use a transpiler, so itsrequire('react-side-effect')is used “bare”, without the_interopRequireDefaultthat most projects seem to use. But as of1.1.4, this project now exposes “module” in it’spackage.json, which uses a default es2015 export.So if you’re using a “module” aware build system, such as
webpack>=2, thenrequire('react-side-effect')will return an object with default as a key.Ok, something is caching something. Maybe webpack. If I install with 1.1.4 then paste in either the unpkg 1.1.3 or 1.1.4 I still get that error.
If I
npm react-side-effect@1.1.3the issue goes away…