wix-incubator / mjml-react

React component library to generate the HTML emails on the fly
MIT License
993 stars 50 forks source link

Breaking changes in v2.0.0? #62

Closed oliverlloyd closed 2 years ago

oliverlloyd commented 3 years ago

Hi there 👋

Thanks for all the work on this repo, it's great! Can I just check if the recent major version bump to 2.0.0 has any breaking changes in that we need to be aware of? I can't see any issues but just wanted to be certain.

Thanks

LB22 commented 3 years ago

Well I seem to be getting this one but I'm not sure if it's because of this version or not

TypeError: _interopRequireDefault is not a function
    at Object.<anonymous> (C:\Users\LB\Documents\Programming\WebApps\myapp\node_modules\mjml-core\lib\index.js:66:24)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\LB\Documents\Programming\WebApps\myapp\node_modules\mjml\lib\index.js:12:41)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

Edit:

So I installed the latest @babel/runtime (7.14.6) and now it all works.

Some package needs to bump their @babel/runtime version because I don't want it as my immediate project dependancy...

oliverlloyd commented 3 years ago

As per https://github.com/guardian/gateway/pull/706, https://github.com/mjmlio/mjml/issues/2299#issuecomment-864526891 and @LB22 's comment, this is related to @bable/runtime

o-alexandrov commented 3 years ago

Based on the commits, that's the only change related to the major version bump:

The addition of @babel/runtime as well as the existing dependency on babel-runtime should have been declared in devDependencies instead. Please join the discussion @mastertheblaster , since that's your commit

daliusd commented 2 years ago

I think there is nothing breaking in here. I remember alternative mjml rendering option was added but nothing else serious. Alternetive mjml rendering shouldn't affect anyone.