FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

util: add non-throwing MIMEType.parse by jasnell · Pull Request #64965 · nodejs/node · GitHub

/ node Public

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 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 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 added the needs-ci PRs that need a full CI run. label Aug 2, 2026

This comment was marked as outdated.

This comment was marked as outdated.

codecov Bot commented Aug 2, 2026
edited
Loading

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 added the author ready PRs that have at least one approval, no outstanding review comments, 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 force-pushed the jasnell/add-mimetype-parse branch from 6dea0a1 to a9fa625 Compare August 4, 2026 13:46
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

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

nodejs-github-bot commented Aug 5, 2026
edited by jasnell
Loading

Copy link
Copy Markdown
Collaborator

jasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 5, 2026
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 merged commit 9e59c1a into nodejs:main Aug 5, 2026
70 checks passed

Copy link
Copy Markdown
Collaborator

Landed in 9e59c1a

aduh95 pushed a commit that referenced this pull request Aug 13, 2026
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>
PR-URL: #64965
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
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>
PR-URL: #64965
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
nodejs-github-bot added a commit that referenced this pull request Aug 25, 2026
Notable changes:

benchmark:
  * (SEMVER-MINOR) add --analyze mode to compare.js (James M Snell) #65416
crypto:
  * update root certificates to NSS 3.126 (Node.js GitHub Bot) #65495
  * (SEMVER-MINOR) enable SIV and GCM-SIV modes in Cipher/Decipher APIs (Filip Skokan) #63411
diagnostics_channel:
  * mark TracingChannel as stable (Abdelrahman Awad) #64525
lib,src:
  * (SEMVER-MINOR) improve histogram implementation (James M Snell) #65024
net:
  * (SEMVER-MINOR) improve performance of net.BlockList (James M Snell) #64974
perf_hooks:
  * (SEMVER-MINOR) add statistical hypothesis testing to histogram (James M Snell) #65416
repl:
  * add basic syntax highlighting (Aviv Keller) #64591
sqlite:
  * (SEMVER-MINOR) add StatementSync.prototype.close() (Guilherme Araújo) #64232
  * (SEMVER-MINOR) add StatementSync.prototype[Symbol.dispose]() (Guilherme Araújo) #64232
util:
  * (SEMVER-MINOR) add non-throwing MIMEType.parse (James M Snell) #64965
zlib:
  * (SEMVER-MINOR) add ZipEntry, ZipFile, and ZipBuffer (Philipp Dunkel) #64339

PR-URL: #65551
aduh95 pushed a commit that referenced this pull request Aug 26, 2026
Notable changes:

benchmark:
  * (SEMVER-MINOR) add --analyze mode to compare.js (James M Snell) #65416
crypto:
  * update root certificates to NSS 3.126 (Node.js GitHub Bot) #65495
  * (SEMVER-MINOR) enable SIV and GCM-SIV modes in Cipher/Decipher APIs (Filip Skokan) #63411
diagnostics_channel:
  * mark TracingChannel as stable (Abdelrahman Awad) #64525
lib,src:
  * (SEMVER-MINOR) improve histogram implementation (James M Snell) #65024
net:
  * (SEMVER-MINOR) improve performance of net.BlockList (James M Snell) #64974
perf_hooks:
  * (SEMVER-MINOR) add statistical hypothesis testing to histogram (James M Snell) #65416
repl:
  * add basic syntax highlighting (Aviv Keller) #64591
sqlite:
  * (SEMVER-MINOR) add StatementSync.prototype.close() (Guilherme Araújo) #64232
  * (SEMVER-MINOR) add StatementSync.prototype[Symbol.dispose]() (Guilherme Araújo) #64232
util:
  * (SEMVER-MINOR) add non-throwing MIMEType.parse (James M Snell) #64965
zlib:
  * (SEMVER-MINOR) add ZipEntry, ZipFile, and ZipBuffer (Philipp Dunkel) #64339

PR-URL: #65551
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

Labels

author ready PRs that have at least one approval, no outstanding review comments, 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


Back | FazBrowse Home | New Git URL