-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
window.matchMedia is not a function errors after ugprade to 41.4.1 #16368
window.matchMedia is not a function errors after ugprade to 41.4.1 #16368
Comments
Thanks for reporting. It's indeed a regression. We should not block importing the entire package in an env like Jest. The problem is here: And it should probably be a getter like this one: |
We'll try to publish a hotfix release tomorrow. |
@Reinmar Thank you for the fast response! |
Two questions:
Bonus thing: We should such scenarios this to our E2E tests (and cover as many packages as actually work today). cc @Mgsy @dufiplΒ @alexander-schranz Do you know about any of our packages which would not be importable in Jest already? |
For me it looks like all plugins try to load Stack trace:
|
What about before v41.4.1? Did you have to work around any similar issue in any other package? |
@Reinmar as a workaround I found out I could create in Jest a instance of |
Most similar issue with the jest part was this one I think: #12972 Other packages currently was mostly more issues with using a too new javascript syntax which we mostly then fixed babelify also the node_modules package itself by extend: https://github.com/sulu/sulu/blob/67057da5ca0c7c7c3618a6a2ac22a42f61f9e42a/webpack.config.js#L93 with the different packages. |
@alexander-schranz I'd like to make sure that this is the only error we introduced in this release. Could you please confirm if after mocking |
@scofalik yes the |
Fix (utils): Prevented error thrown when editor files are imported in an environment without `window` global object. Closes #16368.
This issue should be fixed on |
Released in v41.4.2: https://github.com/ckeditor/ckeditor5/releases/tag/v41.4.2 |
π Provide detailed reproduction steps (if any)
window
like Jest (in our Jest 24)βοΈ Expected result
What is the expected result of the above steps?
β Actual result
β Possible solution
For server side renderers and cli best rendering it would be best if the
window.matchMedia
is only access when windowvariable is available.π Other details
If you'd like to see this fixed sooner, add a π reaction to this post.
The text was updated successfully, but these errors were encountered: