Update content-type 1.0.5 → 2.0.0 (major) - #675
Merged
Conversation
content-type@2.0.0 was rewritten in TypeScript and the compiled output sets __esModule: true with only named exports (parse, format). The default import `contentType` now resolves to `undefined`.
canova
approved these changes
May 19, 2026
canova
left a comment
Member
There was a problem hiding this comment.
Updated the import and did some manual testing and it looks like it works well.
It's actually an improvement for us that it's not throwing while parsing anymore, because we never handled that error throw in the first place, so it should give a better error now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ content-type (1.0.5 → 2.0.0) · Repo · Changelog
Release Notes
2.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 19 commits:
2.0.0Only accept first parameter by name (#67)Package consistency cleanup (#66)Update README to use shields (#65)Fix TEXT_REGEXP to use HTAB (#64)Use char codes for faster parser (#63)Null object perf optimization (#62)Add parameters option to parse (#61)Remove API overhead and checks (#59)Refactor to TypeScript (#57)Fix lint (#55)Remove dependabot (#54)Allow HTAB as whitespace (#52)ci: add Node.js 22.x, 23.x, 24.x, 25.x and remvoe Node 0.6 from the CI matrix (#51)chore: add funding to package.json (#42)ci: apply OSSF Scorecard security best practices (#31)fix: use `ubuntu-latest` as ci runner (#30)ci: add ossf scorecard pipeline (#23)build: update Node.js versions and pin dependencies (#22)Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with
@depfu rebase.All Depfu comment commands