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

add types, nodenext, upgrade mime #6

Merged
merged 4 commits into from
Jan 12, 2023
Merged

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Jan 12, 2023

It will also upgrade the mime package.

In fastify-static we would need to change this block

https://github.com/fastify/fastify-static/blob/8dab6ec5c4525cbe132ec1b7863d884392288406/index.js#L449

to

function getContentType (path) {
  const type = send.mime.getType(path)
 
  if (!send.isUtf8Mimetype(type)) {
    return type
  }
  return `${type}; charset=UTF-8`
}

Checklist

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3899987296

  • 10 of 11 (90.91%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.3%) to 98.408%

Changes Missing Coverage Covered Lines Changed/Added Lines %
index.js 10 11 90.91%
Totals Coverage Status
Change from base Build 3891979112: -0.3%
Covered Lines: 390
Relevant Lines: 391

💛 - Coveralls

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

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.

None yet

3 participants