Skip to content

build(deps): bump type-is from 2.1.0 to 3.0.0 - #494

Open
dependabot[bot] wants to merge 2 commits into
masterfrom
dependabot/npm_and_yarn/type-is-3.0.0
Open

dependabot[bot] wants to merge 2 commits into
masterfrom
dependabot/npm_and_yarn/type-is-3.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Bumps type-is from 2.1.0 to 3.0.0.

Release notes

Sourced from type-is's releases.

v3.0.0

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

Changed:

  • Publish the package as ESM and bump to node 22 (jshttp/type-is#106)
  • Publishes built-in types using TypeScript (jshttp/type-is#94)
  • Refactors the API shape to a class (jshttp/type-is#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)
    • Returns the original input string not the matched MIME type
      • Previously text/* would return e.g. text/html on match, now it returns the original text/*
    • Returns undefined instead of false on no match
    • Returns undefined when no input types are defined
    • Throws on invalid MIME type used to construct the matcher (e.g. new TypeIs(["invalid"]), it does not error if the header is invalid)
  • Matches return the original input string (jshttp/type-is#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 can help with compatibility for the extension aliases:

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 = function (types) {
const matcher = new TypeIs(types, { lookup });
return matcher.request(this);
};

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for type-is since your current version.

Install script changes

This version adds prepare script that runs during installation. Review the package contents before updating.


@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Sep 25, 2026
Bumps [type-is](https://github.com/jshttp/type-is) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/jshttp/type-is/releases)
- [Commits](jshttp/type-is@v2.1.0...v3.0.0)

---
updated-dependencies:
- dependency-name: type-is
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/type-is-3.0.0 branch from b9a604b to 701583e Compare October 2, 2026 06:33
@jankapunkt

Copy link
Copy Markdown
Member

@dhensby and this is also another ESM conflict https://github.com/jshttp/type-is/releases/tag/v3.0.0
plus they changed their package exports to a breaking new format.

@jankapunkt jankapunkt added the on hold 馃洃 We will look into it at a later time label Oct 2, 2026

This branch has not been deployed

No deployments
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 javascript Pull requests that update Javascript code on hold 馃洃 We will look into it at a later time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant