-
Notifications
You must be signed in to change notification settings - Fork 80
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
update mime dependency to 2.x in order to support newer filetypes like wasm #105 #107
Conversation
In other news, I know more about the |
This looks excellent @jenweber! Thanks for the clear PR summary, too. I'll try it out with one of my apps and then we are good to merge from my perspective. |
Test deploy went smoothly 👍 |
Thanks @jenweber ! This looks great to me as well! We'll try to merge and release a new version shortly. Thanks also @lukemelia for jumping in! |
Love your work @jenweber . Thanks a million 😸 |
Released as 1.3 |
Y'all are so fast 🚀 Thanks for your help & the release! |
What Changed & Why
I updated the version of
mime
to^2.3.1
in order to get the correct mime type assigned to wasm files. 2.x had breaking changes, which meant I changed some of the plugin methods.Here are the breaking changes in
[email protected]
that affected this plugin:mime.lookup
was renamed tomime.getType
getType
returns null if there's not a match, whereas before it returneddefault_type
.default_type
is removed entirely. So, now agetType
/lookup
needs to have a fallback set by us, likecontentType = mime.getType(basePathUngzipped) || defaultType;
mime.charsets.lookup
is removed. It was very rudimentary, so I just copied the method into the codebase as_mimeCharsetsLookup
I tested the deploy of my app and
wasm
files have the correct type now. Someone else should do a deploy with their apps just to be safe.Related issues
#105
PR Checklist
Add testsAdd documentationPrefix documentation-only commits with [DOC]People
@achambers @ghedamat