Skip to content

chore: update dependency type-is to v3 - #11805

Draft
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/type-is-3.x
Draft

renovate[bot] wants to merge 1 commit into
masterfrom
renovate/type-is-3.x

Conversation

@renovate

@renovate renovate Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
type-is ^2.1.0^3.0.0 age adoption passing confidence

Release Notes

jshttp/type-is (type-is)

v3.0.0

Compare Source

This version switches the package to ESM and node >= 22.

Changed:

  • Publish the package as ESM and bump to node 22 (#​106)
  • Publishes built-in types using TypeScript (#​94)
  • Refactors the API shape to a class (#​103)
    • 2-4x faster by initializing the class once (instead of every request)
    • 20% faster by initializing inline (e.g. every request)
    • Added support for matching parameters too (e.g. text/html; charset=utf-8)
  • Matches return the original input string (#​109)

Removed:

  • Removes mime-types from the package, only has 3 built in "shortcuts" (e.g. json -> application/json)
    • Pass mime-types.lookup as an option to override

Before:

const isText = typeis(req, ['text/*'])

After:

const isText = new TypeIs(['text/*']).request(req);

If you are upgrading an upstream dependency (e.g. express), and want maximum compatibility, something like this gets ~95% of the way:

import * as mimeTypes from 'mime-types';
import { TypeIs, DEFAULT_LOOKUP } from 'type-is';

function lookup (value) {
  return mimeTypes.lookup(value) || DEFAULT_LOOKUP(value);
}

req.is = (types) => {
  const matcher = new TypeIs(types, { lookup });
  return matcher.request(this);
};

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate Bot added the dependencies Pull requests that update a dependency file label Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants