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

Remove sourceMappingURL lines from tinymce static files #461

Merged
merged 4 commits into from
Mar 27, 2024

Conversation

marius-mather
Copy link
Contributor

Closes #460 . This is just a workaround, the "ideal" solution is that TinyMCE either ships the .map files in their releases or removes references to them. But probably the easiest fix for now.

@claudep
Copy link
Contributor

claudep commented Mar 25, 2024

Thanks, it's probably the best move for now. Do you think we could add a regression test for that, so we don't forget to reapply this in future lib updates, if the upstream project doesn't fix this issue?

@marius-mather
Copy link
Contributor Author

I've added a test that just tries to run collectstatic with the built-in ManifestStaticFilesStorage - it fails when the source map issue is encountered.

.map files can cause this to fail if the static
files refer to them (GH issue #460)
"""
temp_dir = tempfile.mkdtemp()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the test! Now to be absolutely clean, I think we should delete the temp_dir at the end of the test, something like self.addCleanup(shutil.rmtree, local_path). Or even better use the with tempfile.TemporaryDirectory() as temp_dir context manager.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good point, I've done that now.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.14%. Comparing base (f04e1c8) to head (e0f4b9f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #461   +/-   ##
=======================================
  Coverage   87.14%   87.14%           
=======================================
  Files           6        6           
  Lines         249      249           
  Branches       45       45           
=======================================
  Hits          217      217           
  Misses         15       15           
  Partials       17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@claudep claudep merged commit 54d64ba into jazzband:master Mar 27, 2024
11 checks passed
@claudep
Copy link
Contributor

claudep commented Mar 27, 2024

Thanks!

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

Successfully merging this pull request may close these issues.

Missing .map files causing collectstatic to fail using current master branch (TinyMCE 6)
2 participants