Skip to content

util: add non-throwing MIMEType.parse - #64965

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
jasnell:jasnell/add-mimetype-parse
Aug 5, 2026
Merged

util: add non-throwing MIMEType.parse#64965
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
jasnell:jasnell/add-mimetype-parse

Conversation

@jasnell

@jasnell jasnell commented Aug 2, 2026

Copy link
Copy Markdown
Member

Similar to URL.parse(...), the MIMEType.parse(...) API will return null if the input cannot be parsed as opposed to throwing the way the constructor does.

@jasnell jasnell added the semver-minor PRs that contain new features and should be released in the next minor version. label Aug 2, 2026
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Aug 2, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.30%. Comparing base (31cde9f) to head (a9fa625).
⚠️ Report is 18 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #64965   +/-   ##
=======================================
  Coverage   90.30%   90.30%           
=======================================
  Files         759      759           
  Lines      247621   247627    +6     
  Branches    46672    46678    +6     
=======================================
+ Hits       223603   223621   +18     
+ Misses      15473    15471    -2     
+ Partials     8545     8535   -10     
Files with missing lines Coverage Δ
lib/internal/data_url.js 100.00% <100.00%> (ø)
lib/internal/inspector/network.js 96.73% <100.00%> (+0.77%) ⬆️
lib/internal/mime.js 98.55% <100.00%> (+0.06%) ⬆️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@panva panva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 2, 2026
Comment thread doc/api/util.md
Comment thread lib/internal/mime.js Outdated
jasnell added 2 commits August 4, 2026 06:41
Similar to `URL.parse(...)`, the `MIMEType.parse(...)` API will
return `null` if the input cannot be parsed as opposed to throwing
the way the constructor does.

Signed-off-by: James M Snell <jasnell@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com>
@jasnell
jasnell force-pushed the jasnell/add-mimetype-parse branch from 6dea0a1 to a9fa625 Compare August 4, 2026 13:46
@jasnell jasnell added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Aug 4, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

nodejs-github-bot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

@jasnell jasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 5, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 5, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 9e59c1a into nodejs:main Aug 5, 2026
70 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 9e59c1a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants