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

update mime dependency to 2.x in order to support newer filetypes like wasm #105 #107

Merged
merged 5 commits into from
May 30, 2018

Conversation

jenweber
Copy link
Contributor

@jenweber jenweber commented May 29, 2018

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 to mime.getType
  • getType returns null if there's not a match, whereas before it returned default_type.
  • default_type is removed entirely. So, now a getType/lookup needs to have a fallback set by us, like contentType = 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 tests
  • Add documentation
  • Prefix documentation-only commits with [DOC]

People

@achambers @ghedamat

@jenweber jenweber changed the title Mister mime update mime dependency to 2.x in order to support newer filetypes like wasm May 29, 2018
@jenweber jenweber changed the title update mime dependency to 2.x in order to support newer filetypes like wasm update mime dependency to 2.x in order to support newer filetypes like wasm #105 May 29, 2018
@jenweber
Copy link
Contributor Author

In other news, I know more about the mime library than I ever wanted to know.

@lukemelia
Copy link
Contributor

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.

@lukemelia
Copy link
Contributor

Test deploy went smoothly 👍

@ghedamat
Copy link
Contributor

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!

@achambers
Copy link
Member

Love your work @jenweber . Thanks a million 😸

@achambers achambers merged commit e6e0f63 into ember-cli-deploy:master May 30, 2018
@lukemelia
Copy link
Contributor

Released as 1.3

@jenweber
Copy link
Contributor Author

Y'all are so fast 🚀 Thanks for your help & the release!

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.

4 participants